Prechádzať zdrojové kódy

每日通报区分出院与死亡

lighter 3 rokov pred
rodič
commit
20384905be

+ 6 - 2
src/main/java/thyyxxk/webserver/dao/his/scheduled/DailyPatientCountDao.java

@@ -12,9 +12,13 @@ public interface DailyPatientCountDao {
             "isnull(b.group_no,'00' )='00' and b.order_code in ('06026','06053','05973'))), " +
             "admissCount=(select count(1) from zy_actpatient with(nolock) where datediff(day,admiss_date,getdate())=1), " +
             "dismissCount=((select count(1) from yz_act_order with(nolock) where status_flag > '2' and " +
-            "datediff(day,start_time,getdate())=1 and isnull(group_no,'00' )='00' and order_code in ('06026','06053','05973')) " +
+            "datediff(day,start_time,getdate())=1 and isnull(group_no,'00' )='00' and order_code in ('06026','06053')) " +
             "+ (select count(1) from yz_inact_order with(nolock) where status_flag > '2' and " +
-            "datediff(day,start_time,getdate())=1 and isnull(group_no,'00' )='00' and order_code in ('06026','06053','05973'))), " +
+            "datediff(day,start_time,getdate())=1 and isnull(group_no,'00' )='00' and order_code in ('06026','06053'))), " +
+            "deadCount=((select count(1) from yz_act_order with(nolock) where status_flag > '2' and " +
+            "datediff(day,start_time,getdate())=1 and isnull(group_no,'00' )='00' and order_code='05973') + " +
+            "(select count(1) from yz_inact_order with(nolock) where status_flag > '2' and " +
+            "datediff(day,start_time,getdate())=1 and isnull(group_no,'00' )='00' and order_code='05973'))," + 
             "heavyCount=(select count(1) from yz_act_order with(nolock) where status_flag!='5' " +
             "and isnull(group_no,'00' )='00' and order_code='05888'), " +
             "dangerCount=(select count(1) from yz_act_order with(nolock) where status_flag!='5' " +

+ 3 - 2
src/main/java/thyyxxk/webserver/entity/scheduled/DailyPatientCount.java

@@ -8,6 +8,7 @@ public class DailyPatientCount {
     private Integer inHospCount;
     private Integer admissCount;
     private Integer dismissCount;
+    private Integer deadCount;
     private Integer heavyCount;
     private Integer dangerCount;
     private Integer operationCount;
@@ -15,9 +16,9 @@ public class DailyPatientCount {
     private Integer rescueCount;
 
     public String getDescription() {
-        return String.format("%s总值班情况汇报如下:住院总人数:%d,入院人数:%d,出院人数:%d,病重人数:%d,病危人数:%d," +
+        return String.format("%s总值班情况汇报如下:住院总人数:%d,入院人数:%d,出院人数:%d,病重人数:%d,病危人数:%d,死亡人数:%d," +
                 "手术台次:%d,门诊人数:%d,抢救人次:%d。",
-                DateUtil.getYesterday(), inHospCount, admissCount, dismissCount, heavyCount, dangerCount,
+                DateUtil.getYesterday(), inHospCount, admissCount, dismissCount, heavyCount, dangerCount, deadCount,
                 operationCount, clinicCount, rescueCount);
     }
 }