|
@@ -88,6 +88,31 @@ public class SiZyService {
|
|
|
if (null == admDiseinfos || admDiseinfos.isEmpty()) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "请填写医保入院诊断!");
|
|
|
}
|
|
|
+ ReadCardBizType readCardBizType = ReadCardBizType.get(p.getReadCardBizType());
|
|
|
+ if (readCardBizType == ReadCardBizType.ADMISSION) {
|
|
|
+ MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
|
|
|
+ admMdtrtinfo.setMdtrtCertType(mdtrtCertType.getCode());
|
|
|
+ if (mdtrtCertType == MdtrtCertType.SOCIAL_SECURITY_CARD) {
|
|
|
+ String[] out = p.getReadCardResult().split("\\|");
|
|
|
+ if (!p.getName().trim().equals(out[4].trim())) {
|
|
|
+ revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "社保卡姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
+ }
|
|
|
+ admMdtrtinfo.setMdtrtCertNo(out[2]);
|
|
|
+ admMdtrtinfo.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())) {
|
|
|
+ revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
+ }
|
|
|
+ if (!p.getSocialNo().trim().equals(qrinfo.getString("idNo").trim())) {
|
|
|
+ revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证身份证与HIS身份证不一致,请确认是否人证相符。");
|
|
|
+ }
|
|
|
+ admMdtrtinfo.setMdtrtCertNo(qrinfo.getString("ecToken"));
|
|
|
+ }
|
|
|
+ }
|
|
|
admMdtrtinfo.setInsutype(p.getInsutype());
|
|
|
admMdtrtinfo.setAdmDiagDscr(admDiseinfos.get(0).getDiagName());
|
|
|
admMdtrtinfo.setDscgMaindiagCode(admDiseinfos.get(0).getDiagCode());
|
|
@@ -371,18 +396,30 @@ public class SiZyService {
|
|
|
revokeDischarge(p);
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "此患者没有有效的医保在院信息!");
|
|
|
}
|
|
|
- MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
|
|
|
- preSetlmt.setMdtrtCertType(mdtrtCertType.getCode());
|
|
|
- if (mdtrtCertType == MdtrtCertType.SOCIAL_SECURITY_CARD) {
|
|
|
- String[] out = p.getMdtrtCertNo().split("\\|");
|
|
|
- if (!p.getName().trim().equals(out[4].trim())) {
|
|
|
- revokeDischarge(p);
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "社保卡姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
+ ReadCardBizType readCardBizType = ReadCardBizType.get(p.getReadCardBizType());
|
|
|
+ if (readCardBizType == ReadCardBizType.SETTLEMENT) {
|
|
|
+ MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
|
|
|
+ preSetlmt.setMdtrtCertType(mdtrtCertType.getCode());
|
|
|
+ if (mdtrtCertType == MdtrtCertType.SOCIAL_SECURITY_CARD) {
|
|
|
+ String[] out = p.getReadCardResult().split("\\|");
|
|
|
+ if (!p.getName().trim().equals(out[4].trim())) {
|
|
|
+ revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "社保卡姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
+ }
|
|
|
+ preSetlmt.setMdtrtCertNo(out[2]);
|
|
|
+ preSetlmt.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())) {
|
|
|
+ revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证姓名与HIS姓名不一致,请确认是否人证相符。");
|
|
|
+ }
|
|
|
+ if (!p.getSocialNo().trim().equals(qrinfo.getString("idNo").trim())) {
|
|
|
+ revokeDischarge(p);
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证身份证与HIS身份证不一致,请确认是否人证相符。");
|
|
|
+ }
|
|
|
+ preSetlmt.setMdtrtCertNo(qrinfo.getString("ecToken"));
|
|
|
}
|
|
|
- preSetlmt.setMdtrtCertNo(out[2]);
|
|
|
- preSetlmt.setCardSn(out[3]);
|
|
|
- } else if (mdtrtCertType == MdtrtCertType.MEDICAL_INSURANCE_ELECTRONIC_VOUCHER) {
|
|
|
- preSetlmt.setMdtrtCertNo(p.getMdtrtCertNo());
|
|
|
}
|
|
|
preSetlmt.setPsnSetlway(p.getDbg() ? PsnSetlWay.SETTLE_BY_QUOTA.getCode() : PsnSetlWay.SETTLE_BY_ITEMS.getCode());
|
|
|
preSetlmt.setAcctUsedFlag(YesOrNo.NO.getCodeStr());
|