瀏覽代碼

厦门五院个性化需求 新增输血患者人数统计、癌痛患者人数统计

hecc 3 年之前
父節點
當前提交
95f988af95

+ 27 - 1
src/main/java/com/diagbot/aggregate/LeaveHosStatisticsAggregate.java

@@ -36,7 +36,9 @@ public class LeaveHosStatisticsAggregate {
             @DataConsumer("getNewBornCount") Integer newBornNum,
             @DataConsumer("getOperationCount") Integer operationNum,
             @DataConsumer("getNonAdviceCount") Integer nonAdviceNum,
-            @DataConsumer("get31DaysBehospitalCount") Integer reBehospitalNum) {
+            @DataConsumer("get31DaysBehospitalCount") Integer reBehospitalNum,
+            @DataConsumer("getBloodCount") Integer bloodNum,
+            @DataConsumer("getCancerCount") Integer cancerNum) {
 
         Map<String, Object> retMap = new LinkedHashMap<>();
         retMap.put("总人数", totleNum);
@@ -45,6 +47,8 @@ public class LeaveHosStatisticsAggregate {
         retMap.put("手术病人数", operationNum);
         retMap.put("非医嘱离院病人数", nonAdviceNum);
         retMap.put("31日再入院病历数", reBehospitalNum);
+        retMap.put("输血患者人数", bloodNum);
+        retMap.put("癌痛患者人数", cancerNum);
         return retMap;
 
     }
@@ -138,4 +142,26 @@ public class LeaveHosStatisticsAggregate {
         return new Date();
 
     }
+
+    /**
+     * 输血患者人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getBloodCount")
+    public Integer getBloodCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.bloodCount(filterVO);
+    }
+
+    /**
+     * 癌痛患者人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getCancerCount")
+    public Integer getCancerCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.cancerCount(filterVO);
+    }
 }

+ 16 - 0
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -363,6 +363,22 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public int get31DaysBehospitalCount(FilterVO filterVO);
 
+    /**
+     * 输血患者人数-科室-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int bloodCount(FilterVO filterVO);
+
+    /**
+     * 癌痛患者人数-科室-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int cancerCount(FilterVO filterVO);
+
     /**
      * 病案首页质控病历数统计-全院(首页)
      *

+ 20 - 0
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -472,6 +472,26 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.get31DaysBehospitalCount(filterVO);
     }
 
+    /**
+     * 输血患者人数
+     *
+     * @param filterVO
+     * @return
+     */
+    public int bloodCount(FilterVO filterVO){
+        return baseMapper.bloodCount(filterVO);
+    }
+
+    /**
+     * 癌痛患者人数
+     *
+     * @param filterVO
+     * @return
+     */
+    public int cancerCount(FilterVO filterVO){
+        return baseMapper.cancerCount(filterVO);
+    }
+
     /**
      * 病案首页质控病历数统计-全院(首页)
      *

+ 82 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -21558,4 +21558,86 @@
         k1.behospital_code
     </select>
 
+    <!--输血患者人数-->
+    <select id="bloodCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
+        SELECT
+        distinct
+        count(*)
+        FROM
+        med_behospital_info a,
+        med_home_page b
+        Where
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.behospital_code = b.behospital_code
+        And
+        ( b.blood_fee != 0
+        or b.blood_fee != 0.00
+        or b.blood_fee != null
+        )
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        AND a.qc_type_id != 0
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
+        </if>
+    </select>
+
+    <!--癌痛患者人数-->
+    <select id="cancerCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
+        SELECT
+        count(*)
+        FROM
+        med_behospital_info a,
+        med_doctor_advice b
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.behospital_code = b.behospital_code
+        AND b.da_item_name like '癌痛%'
+        AND b.da_status != '作废'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        AND a.qc_type_id != 0
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            </if>
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            </if>
+        </if>
+    </select>
+
 </mapper>