Forráskód Böngészése

Merge branch 'master' into 淮海科技

lighter 1 napja
szülő
commit
7ac53af283

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

@@ -82,9 +82,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

@@ -60,4 +60,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;
+    }
 }

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

@@ -66,6 +66,7 @@ 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), " +

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

@@ -77,6 +77,8 @@ 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;

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

@@ -14,10 +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.Insutype;
-import thyyxxk.webserver.constants.sidicts.MedType;
-import thyyxxk.webserver.constants.sidicts.PsnCertType;
-import thyyxxk.webserver.constants.sidicts.PsnIdetType;
+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;
@@ -231,6 +228,7 @@ 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()));