yeguodong 1 неделя назад
Родитель
Сommit
8814ffa782

+ 3 - 3
src/main/java/thyyxxk/webserver/constants/sidicts/PsnIdetType.java

@@ -48,9 +48,9 @@ public enum PsnIdetType {
         if (StringUtil.isBlank(code)) {
             return null;
         }
-        for (PsnIdetType patnCertType : PsnIdetType.values()) {
-            if (code.trim().equals(patnCertType.getCode())) {
-                return patnCertType.getName();
+        for (PsnIdetType psnIdetType : PsnIdetType.values()) {
+            if (code.trim().equals(psnIdetType.getCode())) {
+                return psnIdetType.getName();
             }
         }
         return null;

+ 12 - 0
src/main/java/thyyxxk/webserver/constants/sidicts/PsnType.java

@@ -96,4 +96,16 @@ public enum PsnType {
         }
         return null;
     }
+
+    public static String getName(String code) {
+        if (StringUtil.isBlank(code)) {
+            return null;
+        }
+        for (PsnType psnType : PsnType.values()) {
+            if (code.trim().equals(psnType.getCode())) {
+                return psnType.getName();
+            }
+        }
+        return null;
+    }
 }

+ 8 - 1
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -120,10 +120,17 @@ public class MarkMtFeesController {
     @PassToken
     @PostMapping("/queryInsuinfo")
     public Map<String, Object> queryInsuinfo(@RequestBody SiMzBusinessParams param) {
-        log.info("门诊查询参保信息:{}", JSONObject.toJSON(param));
+        log.info("门诊查询有无参保信息:{}", JSONObject.toJSON(param));
         return mzService.queryInsuinfo(param);
     }
 
+    @PassToken
+    @PostMapping("/queryInsuinfoDetail")
+    public ResultVo<PsnBaseInfo> queryInsuinfoDetail(@RequestBody SiMzBusinessParams param) {
+        log.info("门诊查询参保信息详情:{}", JSONObject.toJSON(param));
+        return mzService.queryInsuinfoDetail(param);
+    }
+
     @PassToken
     @PostMapping("/directRegistration")
     public Map<String, Object> directRegistration(@RequestBody SiMzBusinessParams param) {

+ 6 - 0
src/main/java/thyyxxk/webserver/dao/his/inpatient/PatientDao.java

@@ -66,6 +66,8 @@ public interface PatientDao {
             "admissPhysician=rtrim(a.admiss_physician),b.psn_cert_type, " +
             "insutype=(select top 1 insutype from t_si_pat_info with(nolock) where pat_no=#{inpatientNo} and " +
             "times=a.admiss_times order by ledger_sn desc), " +
+            "psnType=(select max(psn_type) from t_si_pat_info with(nolock) where pat_no=#{inpatientNo} and times=a.admiss_times), " +
+            "psnIdetType=(select max(psn_idet_type) from t_si_pat_info with(nolock) where pat_no=#{inpatientNo} and times=a.admiss_times), " +
             "admissPhysicianName=rtrim((select name FROM a_employee_mi WHERE code = a.admiss_physician)), " +
             "referPhysician=rtrim(a.refer_physician), " +
             "referPhysicianName=rtrim((select name FROM a_employee_mi WHERE code = a.refer_physician)), " +
@@ -107,6 +109,10 @@ public interface PatientDao {
             "</script>")
     Patient getPatientInfo(@Param("inpatientNo") String inpatientNo, @Param("table") String table, @Param("times") Integer times);
 
+    @Select("select max(insuplc_admdvs) from t_si_pat_info where pat_no=#{patNo} " +
+            "and times=#{times} and ledger_sn=#{ledgerSn}")
+    Integer getPatAdmdvs(String patNo, int times, int ledgerSn);
+
     @Select("select parent_code from t_region where code=#{code}")
     Integer selectParentRegion(Integer code);
 

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/inpatient/patient/Patient.java

@@ -77,6 +77,10 @@ public class Patient {
     private String medTypeName;
     private String insutype;
     private String insutypeName;
+    private String psnType;
+    private String psnTypeName;
+    private String psnIdetType;
+    private String psnIdetTypeName;
     private Integer admdvs;
     private Integer[] admdvsCascader;
     private String matnType; // 生育类别

+ 3 - 3
src/main/java/thyyxxk/webserver/service/executeItem/GenerateYzService.java

@@ -76,7 +76,7 @@ public class GenerateYzService {
         return list;
     }
 
-    private long betweenDay(Date beginDate, Date endDate, boolean isReset,boolean isAbs){
+    private static long betweenDay(Date beginDate, Date endDate, boolean isReset,boolean isAbs){
         if (isReset) {
             beginDate = DateUtil.beginOfDay(beginDate);
             endDate = DateUtil.beginOfDay(endDate);
@@ -421,13 +421,13 @@ public class GenerateYzService {
                         }
                         //检查隔日一次
                         if(item.getFrequCode().startsWith("QOD") || item.getFrequCode().startsWith("Q0D") || item.getFrequCode().startsWith("Q2D")){
-                            if(betweenDay(item.getStartTime(),occTimeTemp,true,false) != 2){
+                            if(betweenDay(item.getStartTime(),occTimeTemp,true,false) % 2 != 0){
                                 continue;
                             }
                         }
                         int numQd = getQmDFreCode(item.getFrequCode());
                         if(numQd > 0){
-                            if(betweenDay(item.getStartTime(),occTimeTemp,true,false) != numQd){
+                            if(betweenDay(item.getStartTime(),occTimeTemp,true,false) % numQd != 0 ){
                                 continue;
                             }
                         }

+ 4 - 2
src/main/java/thyyxxk/webserver/service/inpatient/PatientService.java

@@ -14,8 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
 import thyyxxk.webserver.config.exception.BizException;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
-import thyyxxk.webserver.constants.sidicts.MedType;
-import thyyxxk.webserver.constants.sidicts.PsnCertType;
+import thyyxxk.webserver.constants.sidicts.*;
 import thyyxxk.webserver.dao.his.inpatient.PatientDao;
 import thyyxxk.webserver.dao.his.inpatient.Routines;
 import thyyxxk.webserver.dao.his.zhuyuanyisheng.YiZhuLuRuDao;
@@ -228,6 +227,9 @@ public class PatientService {
      */
     private void setExpenseInformation(@NotNull Patient data) {
         data.setMedTypeName(MedType.getName(data.getMedType()));
+        data.setInsutypeName(Insutype.getName(data.getInsutype()));
+        data.setPsnTypeName(PsnType.getName(data.getPsnType()));
+        data.setPsnIdetTypeName(PsnIdetType.getName(data.getPsnIdetType()));
         data.setDutyNurseName(userCache.getEmployeeName(data.getDutyNurse()));
 
         HuanZheFeiYong feiYongZhanBi = yiZhuLuRuDao.feiYongXinXi(data.getInpatientNo(), data.getAdmissTimes(), data.getLedgerSn());

+ 2 - 2
src/main/java/thyyxxk/webserver/service/inpatient/xmlr/XiangMuLuRuService.java

@@ -417,9 +417,9 @@ public class XiangMuLuRuService {
      */
     @Transactional(rollbackFor = Exception.class)
     public ResultVo<String> xiangMuFeiYongShangChuan(ZyDetailCharge param) {
-        if (param.getList().size() > 50) {
+        /*if (param.getList().size() > 50) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "一次性项目录入大于50条");
-        }
+        }*/
         StringBuilder errorStr = new StringBuilder();
         if (StringUtil.isBlank(param.getInpatientNo()) || param.getAdmissTimes() == null) {
             errorStr.append("住院号和住院次数为空<br />");

+ 20 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -524,6 +524,26 @@ public class SiMzService {
         return result;
     }
 
+    public ResultVo<PsnBaseInfo> queryInsuinfoDetail(SiMzBusinessParams param) {
+        QryPsnBsInfo mzptnt = new QryPsnBsInfo();
+        mzptnt.setStaffId(param.getStaffId());
+        mzptnt.setPatNo(param.getPatientId());
+        mzptnt.setMedType(MedType.GENERAL_CLINIC.getCode());
+        mzptnt.setOnlyQry(1);
+        mzptnt.setTimes(-1);
+        if (StringUtil.notBlank(param.getAdmdvs())) {
+            mzptnt.setAdmdvs(param.getAdmdvs());
+        }
+        ResultVo<PsnBaseInfo> baseInfo = qryService.obtainBasicPersonInfo(mzptnt);
+        if (null == baseInfo) {
+            throw new BizException(ExceptionEnum.NETWORK_ERROR);
+        }
+        if (!Objects.equals(baseInfo.getCode(), ExceptionEnum.SUCCESS.getCode())) {
+            throw new BizException(ExceptionEnum.NETWORK_ERROR, baseInfo.getMessage());
+        }
+        return baseInfo;
+    }
+
     private InsuInfo getResidantOrEmployeeInsuInfo(List<InsuInfo> list) {
         for (InsuInfo info : list) {
             Insutype insutype = Insutype.get(info.getInsutype());