Prechádzať zdrojové kódy

病案首页患者信息优化

lighter 3 rokov pred
rodič
commit
50966b3ef9

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/BasSelectOverviewDao.java

@@ -41,7 +41,7 @@ public interface BasSelectOverviewDao extends BaseMapper<CaseFrontsheetSurgery>
             "dismiss_date as disDate from t_case_frontsheet_main with(nolock) " +
             "where bah=#{bah} and dismiss_date>=#{start} and " +
             "dismiss_date<=#{end} order by admiss_dept,admiss_doctor")
-    List<SheetOverview> selectPatientsForBasByBah2(GetOutSheet param);
+    List<SheetOverview> selectPatientsFromSignedBase(GetOutSheet param);
 
     @Select("select sign_datetime as signDate,bah,times,name,gender as sex,status as fileStatus, " +
             "doctorName=(select rtrim(name) from a_employee_mi with(nolock) where code=apply_staff) " +

+ 3 - 2
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -94,9 +94,10 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "transDept=(select rtrim(name) from zd_unit_code with(nolock) where code=zk_ward)," +
             "rtrim(zk_ward) as dismissDeptCode," +
             "dismissDept=(select rtrim(name) from zd_unit_code with(nolock) where code=isnull(zk_ward,small_dept))," +
-            "dismissWardCode=ward," +
+            "dismissWardCode=ward,admiss_date, " +
             "dismissWard=(select rtrim(name) from zd_unit_code with(nolock) where code=ward)," +
-            "admiss_date, med_type=(select top 1 med_type from t_si_pat_info with(nolock) where pat_no=#{bah} and times=#{times} order by ledger_sn desc), " +
+            "medType=(select top 1 med_type from t_si_pat_info with(nolock) where pat_no=#{bah} and times=#{times} order by ledger_sn desc), " +
+            "insutype=(select top 1 insutype from t_si_pat_info with(nolock) where pat_no=#{bah} and times=#{times} order by ledger_sn desc), " +
             "dismissDate=(select start_time from ${yzTable} with(nolock) where inpatient_no=#{bah} " +
             "and admiss_times=#{times} and status_flag > '1' and isnull (group_no,'00')='00' " +
             "and order_code in ('06025','06026','06027','06053','05973')), " +

+ 12 - 0
src/main/java/thyyxxk/webserver/entity/casefrontsheet/CaseFrontsheetMain.java

@@ -809,6 +809,18 @@ public class CaseFrontsheetMain implements Serializable {
     @TableField(exist = false)
     private List<CaseFrontsheetSurgery> surgeryList;
 
+    /**
+     * 险种类型
+     * */
+    @TableField(exist = false)
+    private String insutype;
+
+    /**
+     * 医疗类别名称
+     */
+    @TableField(exist = false)
+    private String medTypeName;
+
     public List<CaseFrontsheetDisdiag> getDisdiagList() {
         return null == disdiagList ? new ArrayList<>() : disdiagList;
     }

+ 12 - 5
src/main/java/thyyxxk/webserver/service/casefrontsheet/CaseFrontSheetService.java

@@ -7,6 +7,8 @@ import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
+import thyyxxk.webserver.constants.sidicts.Insutype;
+import thyyxxk.webserver.constants.sidicts.MedType;
 import thyyxxk.webserver.dao.his.LoginDao;
 import thyyxxk.webserver.dao.his.casefrontsheet.BasSelectOverviewDao;
 import thyyxxk.webserver.dao.his.casefrontsheet.CaseFrontSheetDao;
@@ -150,13 +152,16 @@ public class CaseFrontSheetService {
         if (StringUtil.notBlank(param.getBah())) {
             if (param.getFileStatus() == 0) {
                 list = basDao.selectPatientsForBasByBah(param);
+                if (list.isEmpty()) {
+                    list = basDao.selectSignApply(param.getBah(), param.getFileStatus());
+                    if (list.isEmpty()) {
+                        return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有找到此患者的未归档病案。");
+                    }
+                }
             } else {
-                list = basDao.selectPatientsForBasByBah2(param);
-            }
-            if (list.isEmpty()) {
-                list = basDao.selectSignApply(param.getBah(), param.getFileStatus());
+                list = basDao.selectPatientsFromSignedBase(param);
                 if (list.isEmpty()) {
-                    return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有此患者的结算信息或归档申请,请联系病房核实。");
+                    return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有找到此患者的已归档病案。");
                 }
             }
             if (param.getLateFlag() != 3) {
@@ -221,6 +226,8 @@ public class CaseFrontSheetService {
                 sheet2.setMedType("42");
             }
         }
+        sheet2.setMedTypeName(MedType.getName(sheet2.getMedType()));
+        sheet2.setInsutype(Insutype.getName(sheet2.getInsutype()));
         final int hasInfant = dao.getInfant(bah, times);
         sheet2.setHasInfant(String.valueOf(hasInfant));
         if (null == sheet2.getDismissDate()) {