医保结算参数优化
This commit is contained in:
parent
26e504232e
commit
789d0d17cb
|
@ -7,7 +7,6 @@ import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.dpkj.common.config.ChsConfig;
|
import com.dpkj.common.config.ChsConfig;
|
||||||
import com.dpkj.common.config.HisConfig;
|
import com.dpkj.common.config.HisConfig;
|
||||||
import com.dpkj.common.utils.IDGenerator;
|
|
||||||
import com.dpkj.common.vo.ResultData;
|
import com.dpkj.common.vo.ResultData;
|
||||||
import com.dpkj.modules.chs.service.IHispayService;
|
import com.dpkj.modules.chs.service.IHispayService;
|
||||||
import com.dpkj.modules.chs.vo.OutpatientBeginModel;
|
import com.dpkj.modules.chs.vo.OutpatientBeginModel;
|
||||||
|
@ -78,9 +77,9 @@ public class HispayServiceImpl implements IHispayService {
|
||||||
*/
|
*/
|
||||||
private String processParameters(JSONObject params, String password) {
|
private String processParameters(JSONObject params, String password) {
|
||||||
JSONObject req = new JSONObject() {{
|
JSONObject req = new JSONObject() {{
|
||||||
put("timestamp", DateUtil.format(DateUtil.date(), "yyyyMMddHHmmss")); // 请求发送时间
|
put("timestamp", ""); // 请求发送时间 DateUtil.format(DateUtil.date(), "yyyyMMddHHmmss")
|
||||||
put("requestid", IDGenerator.getSnowflakeIdToStr()); // 唯一请求id
|
put("requestid", ""); // 唯一请求id IDGenerator.getSnowflakeIdToStr()
|
||||||
put("operid", hisConfig.getOperationId()); // 调用者代码
|
put("operid", ""); // 调用者代码 hisConfig.getOperationId()
|
||||||
put("password", password); // 密码
|
put("password", password); // 密码
|
||||||
put("params", params);
|
put("params", params);
|
||||||
}};
|
}};
|
||||||
|
@ -187,64 +186,6 @@ public class HispayServiceImpl implements IHispayService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// public JSONObject getPatientInfo_old(String type, String content) {
|
|
||||||
// Dispatch dispatch = instanceActive();
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 1、删除保存HIS读卡内容的文件 避免读取到错误信息
|
|
||||||
// */
|
|
||||||
// // 获取HIS-CHS医保库路径
|
|
||||||
// String chsPath = System.getProperty("java.library.path");
|
|
||||||
// String filePath = chsPath + "/" + chsConfig.getFileName();
|
|
||||||
// // 删除文件
|
|
||||||
// FileUtil.del(FileUtil.file(filePath));
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 2、组装参数
|
|
||||||
// */
|
|
||||||
// JSONObject val = new JSONObject()
|
|
||||||
// .fluentPut("cardtype", type) // 1.就诊卡,2.医保卡,5.门诊号,6.患者姓名和电话号码,8.电子健康码/卡,9.医保电子凭证
|
|
||||||
// .fluentPut("cardno", "") // 患者就诊卡号
|
|
||||||
// .fluentPut("sfzh", "") // 身份证号
|
|
||||||
// .fluentPut("hzxm", "") // 患者姓名
|
|
||||||
// .fluentPut("phone", ""); // 患者电话号码
|
|
||||||
// String params = processParameters(val, content);
|
|
||||||
// log.info("[HispayServiceImpl][getPatientInfo][医保读卡] 接口入参:{}", params);
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 3、调用COM函数
|
|
||||||
// */
|
|
||||||
// Variant rest = new Variant();
|
|
||||||
// Variant call = Dispatch.call(dispatch, "fRun", "BMZXX010", params, rest);
|
|
||||||
// log.info("[HispayServiceImpl][getPatientInfo][医保读卡] call返回值:{}", call);
|
|
||||||
//
|
|
||||||
// // 释放资源
|
|
||||||
// releaseActive();
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 4、处理读卡结果
|
|
||||||
// */
|
|
||||||
// // COM函数调用之后会生成新的文件 需要判断
|
|
||||||
// File file = FileUtil.file(filePath);
|
|
||||||
// if (!file.exists()) {
|
|
||||||
// throw new RuntimeException("读卡失败:数据未读取");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 获取读卡结果
|
|
||||||
// FileReader fileReader = new FileReader(file, "GBK");
|
|
||||||
// String data = fileReader.readString();
|
|
||||||
//
|
|
||||||
// JSONObject result;
|
|
||||||
// try {
|
|
||||||
// result = JSONObject.parseObject(data);
|
|
||||||
// log.info("[HispayServiceImpl][getPatientInfo][医保读卡] 读卡值:{}", result);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// throw new RuntimeException("读卡失败:" + data);
|
|
||||||
// }
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
private ResultData outpatientBudget(OutpatientBeginModel data) {
|
private ResultData outpatientBudget(OutpatientBeginModel data) {
|
||||||
// 加载资源
|
// 加载资源
|
||||||
ActiveXComponent dispatch = instanceActive();
|
ActiveXComponent dispatch = instanceActive();
|
||||||
|
@ -253,7 +194,7 @@ public class HispayServiceImpl implements IHispayService {
|
||||||
JSONObject val = new JSONObject()
|
JSONObject val = new JSONObject()
|
||||||
.fluentPut("patid", data.getPatientId()) // 病人ID
|
.fluentPut("patid", data.getPatientId()) // 病人ID
|
||||||
.fluentPut("cfxhhj", data.getPrescriptionNo()) // 划价单据,格式:单据1,单据2,单据3
|
.fluentPut("cfxhhj", data.getPrescriptionNo()) // 划价单据,格式:单据1,单据2,单据3
|
||||||
.fluentPut("czksfbz", "") // 是否扣院内账户,0不使用院内账户,1使用院内账户(默认不使用院内账户)
|
.fluentPut("czksfbz", "0") // 是否扣院内账户,0不使用院内账户,1使用院内账户(默认不使用院内账户)
|
||||||
.fluentPut("zfjsbz", "0") // 是否自费结算,0根据医保代码缴费,1自费结算(默认自费结算)
|
.fluentPut("zfjsbz", "0") // 是否自费结算,0根据医保代码缴费,1自费结算(默认自费结算)
|
||||||
.fluentPut("ybrc", ""); // 医保入参,xml节点
|
.fluentPut("ybrc", ""); // 医保入参,xml节点
|
||||||
String params = processParameters(val, data.getPassword());
|
String params = processParameters(val, data.getPassword());
|
||||||
|
@ -304,11 +245,11 @@ public class HispayServiceImpl implements IHispayService {
|
||||||
String requestTime = DateUtil.now();
|
String requestTime = DateUtil.now();
|
||||||
data.setPaytime(requestTime);
|
data.setPaytime(requestTime);
|
||||||
JSONObject val = ((JSONObject) JSON.toJSON(data))
|
JSONObject val = ((JSONObject) JSON.toJSON(data))
|
||||||
.fluentPut("czksfbz", "") // 是否扣院内账户,与预算保持一致
|
.fluentPut("czksfbz", "0") // 是否扣院内账户,与预算保持一致
|
||||||
.fluentPut("zfjsbz", "0") // 是否自费结算,与预算保持一致,0根据病人医保代码结算,1自费结算
|
.fluentPut("zfjsbz", "0") // 是否自费结算,与预算保持一致,0根据病人医保代码结算,1自费结算
|
||||||
.fluentPut("ybrc", "")
|
.fluentPut("ybrc", "")
|
||||||
.fluentPut("ptlsh", "")
|
.fluentPut("ptlsh", "")
|
||||||
.fluentPut("jysm", "自助机结算");
|
.fluentPut("jysm", "");
|
||||||
String params = processParameters(val, null);
|
String params = processParameters(val, null);
|
||||||
log.info("[HispayServiceImpl][chsCodeAsOutpatientFinal][门诊缴费-结算] 接口入参:{}", params);
|
log.info("[HispayServiceImpl][chsCodeAsOutpatientFinal][门诊缴费-结算] 接口入参:{}", params);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue