|
|
@@ -58,24 +58,16 @@ public class SiMzFeeService {
|
|
|
if (readCardBizType != ReadCardBizType.REGISTRATION && !p.getInsuplcAdmdvs().startsWith("43")) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "省外异地的患者请读社保卡或医保电子凭证登记!");
|
|
|
}
|
|
|
+
|
|
|
if (readCardBizType == ReadCardBizType.REGISTRATION) {
|
|
|
MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
|
|
|
regstrtn.setMdtrtCertType(mdtrtCertType.getCode());
|
|
|
if (mdtrtCertType == MdtrtCertType.SOCIAL_SECURITY_CARD) {
|
|
|
String[] out = p.getReadCardResult().split("\\|");
|
|
|
-// if (!p.getName().trim().equals(out[4].trim())) {
|
|
|
-// return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "社保卡姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
-// }
|
|
|
regstrtn.setMdtrtCertNo(out[2]);
|
|
|
regstrtn.setCardSn(out[3]);
|
|
|
} else if (mdtrtCertType == MdtrtCertType.MEDICAL_INSURANCE_ELECTRONIC_VOUCHER) {
|
|
|
JSONObject qrinfo = JSONObject.parseObject(p.getReadCardResult());
|
|
|
-// if (!p.getName().trim().equals(qrinfo.getString("userName").trim())) {
|
|
|
-// return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
-// }
|
|
|
- if (!p.getSocialNo().trim().equals(qrinfo.getString("idNo").trim())) {
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证身份证与HIS身份证不一致,请确认是否人证相符。");
|
|
|
- }
|
|
|
regstrtn.setMdtrtCertNo(qrinfo.getString("ecToken"));
|
|
|
}
|
|
|
}
|
|
|
@@ -323,9 +315,14 @@ public class SiMzFeeService {
|
|
|
if (null == p.getTimes()) {
|
|
|
p.setTimes(mzDao.selectMaxTimes(p.getPatNo()));
|
|
|
}
|
|
|
- ResultVo<FundDetail> fundDetail1 = getFundDetailResultVo(p);
|
|
|
- if (fundDetail1 != null) return fundDetail1;
|
|
|
+ ResultVo<FundDetail> setlfund = getFundDetailResultVo(p);
|
|
|
+ if (setlfund != null) {
|
|
|
+ return setlfund;
|
|
|
+ }
|
|
|
MzPreSetlmt mzPreSetlmt = mzDao.selectPreSetlmt(p.getPatNo(), p.getTimes());
|
|
|
+ if (null == mzPreSetlmt || null == mzPreSetlmt.getMedfeeSumamt()) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者没有已上传的费用。");
|
|
|
+ }
|
|
|
ReadCardBizType readCardBizType = ReadCardBizType.get(p.getReadCardBizType());
|
|
|
if (readCardBizType == ReadCardBizType.SETTLEMENT) {
|
|
|
MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
|
|
|
@@ -409,8 +406,10 @@ public class SiMzFeeService {
|
|
|
}
|
|
|
|
|
|
public ResultVo<FundDetail> outpatientSettlement(MzPatientInfo p) {
|
|
|
- ResultVo<FundDetail> fundDetail1 = getFundDetailResultVo(p);
|
|
|
- if (fundDetail1 != null) return fundDetail1;
|
|
|
+ ResultVo<FundDetail> setlfund = getFundDetailResultVo(p);
|
|
|
+ if (setlfund != null) {
|
|
|
+ return setlfund;
|
|
|
+ }
|
|
|
Setlmt setlmt = mzDao.selectSetlmt(p.getPatNo(), p.getTimes());
|
|
|
JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.OUTPATIENT_SETTLEMENT,
|
|
|
setlmt.getInsuplcAdmdvs(), p.getStaffId());
|
|
|
@@ -623,7 +622,6 @@ public class SiMzFeeService {
|
|
|
spcChrDiseAcct.setTimes(mzptnt.getTimes());
|
|
|
spcChrDiseAcct.setFromDirectReg(true);
|
|
|
ResultVo<SiPatInfo> upldFeeRes = uploadOutpatientFeeDetails(spcChrDiseAcct);
|
|
|
- log.info("上传医保费用:{}", upldFeeRes);
|
|
|
if (null == upldFeeRes) {
|
|
|
revokeOutpatientRegistration(mzptnt);
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
|