|
@@ -55,6 +55,16 @@ public class SiMzFeeService {
|
|
|
this.logDao = logDao;
|
|
|
}
|
|
|
|
|
|
+ private boolean mipSettled(String hisOrdNum) {
|
|
|
+ int count = mzDao.getMipSettleCount(hisOrdNum);
|
|
|
+ return count > 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean inMipSettleProcess(String hisOrdNum) {
|
|
|
+ Integer lockFlag = mzDao.getLockFlag(hisOrdNum);
|
|
|
+ return null != lockFlag && lockFlag == 1;
|
|
|
+ }
|
|
|
+
|
|
|
public ResultVo<String> outpatientRegistration(MzPatientInfo p) {
|
|
|
Regstrtn regstrtn;
|
|
|
if (null != p.getVisitDate() && StringUtil.notBlank(p.getDeptCode())
|
|
@@ -76,6 +86,16 @@ public class SiMzFeeService {
|
|
|
return ResultVoUtil.success("本次就诊已有医保登记[mdtrtId:" + regstrtn.getMdtrtId() + "],请勿重复办理。");
|
|
|
}
|
|
|
|
|
|
+ String hisOrdNum = p.getPatNo() + "_" + p.getTimes() + "_1";
|
|
|
+ if (mipSettled(hisOrdNum)) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR,
|
|
|
+ "患者已完成移动医保支付,请勿重复办理。");
|
|
|
+ }
|
|
|
+ if (inMipSettleProcess(hisOrdNum)) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR,
|
|
|
+ "患者已进入移动医保支付流程,无法办理。");
|
|
|
+ }
|
|
|
+
|
|
|
if (!p.abortBeforeUploadFees()) {
|
|
|
List<String> chargeCodeList = mzDao.selectHisChargeCodes(p.getPatNo(), p.getTimes());
|
|
|
if (chargeCodeList.isEmpty()) {
|