lighter 1 éve
szülő
commit
466f749250

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>12.0.2</version>
+    <version>12.0.3</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 2 - 0
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.controller.medicalinsurance;
 
+import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -108,6 +109,7 @@ public class MarkMtFeesController {
     @PassToken
     @PostMapping("/queryInsuinfo")
     public Map<String, Object> queryInsuinfo(@RequestBody SiMzBusinessParams param) {
+        log.info("门诊查询参保信息:{}", JSONObject.toJSON(param));
         return mzService.queryInsuinfo(param);
     }
 

+ 4 - 2
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -129,11 +129,13 @@ public interface SiMzDao {
     int selectSiMzInfoCount(@Param("patNo") String patNo,
                             @Param("times") int times);
 
-    @Update("update t_si_pat_info set insutype=#{insutype},balc=#{balc} where pat_no=#{patNo} and times=#{times}")
+    @Update("update t_si_pat_info set insutype=#{insutype},balc=#{balc},insuplc_admdvs=#{admdvs} " +
+            "where pat_no=#{patNo} and times=#{times}")
     void updateSiZyInfoPsnNo(@Param("patNo") String patNo,
                              @Param("times") int times,
                              @Param("insutype") String insutype,
-                             @Param("balc") String balc);
+                             @Param("balc") String balc,
+                             @Param("admdvs") String admdvs);
 
     @Select("select top 1 * from t_si_pat_info where pat_no=#{patNo} order by times desc")
     PsnBaseInfo selectLatestPsnInfo(@Param("patNo") String patNo);

+ 4 - 0
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiSettleApplyDao.java

@@ -26,6 +26,10 @@ public interface SiSettleApplyDao {
             "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in ('06026','06053','05973') and status_flag <> '6'  ")
     Date selectActOrderDisDate(@Param("table") String table, @Param("patNo") String patNo, @Param("times") Integer times);
 
+    @Select("select start_time from ${table} with(nolock) where inpatient_no=#{patNo} and admiss_times=#{times} " +
+            "and status_flag > '1' and isnull(group_no, '00')='00' and order_code in ('06026','06053','05973') and status_flag <> '6'  ")
+    List<Date> selectActOrderDisDate2(@Param("table") String table, @Param("patNo") String patNo, @Param("times") Integer times);
+
     @Select("select top 1 status,handle_comment,type,settle_datetime,acct_used_flag,death_flag,sort_no from t_si_settle_apply " +
             "where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledger} and type=#{type} order by sort_no desc")
     SiSettleApply selectSettleApply(@Param("patNo") String patNo,

+ 4 - 8
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -452,12 +452,15 @@ public class SiMzService {
         if (count == 0) {
             psninfo.setMedType(MedType.GENERAL_CLINIC.getCode());
             psninfo.setInsuplc(insuInfo.getInsuplcAdmdvs());
+            psninfo.setLedgerSn(0);
             psninfo.setPsnType(insuInfo.getPsnType());
             psninfo.setEmpName(insuInfo.getEmpName());
+            psninfo.setInsuplc(insuInfo.getInsuplcAdmdvs());
             psninfo.setBalc(insuInfo.getBalc());
             dao.insertSiMzInfoPsnNo(psninfo);
         } else {
-            dao.updateSiZyInfoPsnNo(mzptnt.getPatNo(), mzptnt.getTimes(), psninfo.getInsutype(), insuInfo.getBalc());
+            dao.updateSiZyInfoPsnNo(mzptnt.getPatNo(), mzptnt.getTimes(),
+                    psninfo.getInsutype(), insuInfo.getBalc(), insuInfo.getInsuplcAdmdvs());
         }
         result.put("code", 0);
         result.put("expContentRequired", expContentRequired(insuInfo.getInsuplcAdmdvs()));
@@ -509,13 +512,6 @@ public class SiMzService {
         if (null == psnBaseInfo) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "无法办理,没有找到参保信息。");
         }
-        if (!Objects.equals(psnBaseInfo.getTimes(), param.getTimes())) {
-            int count = dao.selectSiMzInfoCount(param.getPatientId(), param.getTimes());
-            if (count == 0) {
-                psnBaseInfo.setTimes(param.getTimes());
-                dao.insertSiMzInfoPsnNo(psnBaseInfo);
-            }
-        }
         return mzSrvc.directRegistration(siMzFeeUrl, param);
     }
 

+ 8 - 4
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiSettleApplyService.java

@@ -66,13 +66,17 @@ public class SiSettleApplyService {
         int type = p.getMidSetl() ? MIDDLE_SETTLE : REAL_SETTLE;
         Date disdate = null;
         if (type == REAL_SETTLE) {
-            disdate = dao.selectActOrderDisDate("yz_act_order", p.getInpatientNo(), p.getAdmissTimes());
-            if (null == disdate) {
-                disdate = dao.selectActOrderDisDate("yz_inact_order", p.getInpatientNo(), p.getAdmissTimes());
+            List<Date> tempList = dao.selectActOrderDisDate2("yz_act_order", p.getInpatientNo(), p.getAdmissTimes());
+            if (tempList.isEmpty()) {
+                tempList = dao.selectActOrderDisDate2("yz_inact_order", p.getInpatientNo(), p.getAdmissTimes());
             }
-            if (null == disdate) {
+            if (tempList.isEmpty()) {
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者没有出院医嘱,无法申请出院结算!");
             }
+            if (tempList.size() > 1) {
+                return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者有多条出院医嘱,请检查。");
+            }
+            disdate = tempList.get(0);
         }
         SiSettleApply apply = dao.selectSettleApply(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), type);
         if (null == apply) {

+ 3 - 1
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/PatientCriticalValuesService.java

@@ -1,6 +1,7 @@
 package thyyxxk.webserver.service.zhuyuanyisheng;
 
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
@@ -41,7 +42,7 @@ public class PatientCriticalValuesService {
     }
 
     public ResultVo<String> acceptCriticalValues(String message) {
-        log.info("收到危急值消息:{}", message);
+        log.info("收到检验危急值消息:{}", message);
         CriticalValue criticalValue = makeEntityFromMessage(message);
         if (StringUtil.isBlank(criticalValue.getContent())) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "消息体为空。");
@@ -157,6 +158,7 @@ public class PatientCriticalValuesService {
     }
 
     public ResultVo<String> checkTheCriticalValue(CriticalValueFromTest value) {
+        log.info("收到检查危急值消息:{}", JSON.toJSON(value));
         if (null == value.getFlag()) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR,
                     "flag 门诊住院标志不存在 1=住院 2=门诊");