Преглед на файлове

指标十七:医师查房记录完成率

chengyao преди 4 години
родител
ревизия
4b6997d470

+ 16 - 0
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -2480,12 +2480,28 @@ public MedQualityControlDTO medicalRecordIndicator(FilterRecordVO filterRecordVO
      */
     public MedQualityControlDTO getMedManageIndex(FilterVO filterVO) {
         Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
+        Map<String, Object> entryCountMap = behospitalInfoFacade.getCountByEntry(filterVO);
         MedQualityControlDTO medQualityControlDTO = new MedQualityControlDTO();
         //指标一、二、三、二十七
         medQualityControlDTO = ManageIndexMethod(medQualityControlDTO, baseIndex, filterVO);
+        //指标十七
+        medQualityControlDTO = ruleIndexMethod(medQualityControlDTO, baseIndex, entryCountMap);
         return medQualityControlDTO;
     }
 
+
+    private MedQualityControlDTO ruleIndexMethod(MedQualityControlDTO medQualityControlDTO, Map<String, Object> baseIndex, Map<String, Object> entryCountMap){
+        if(entryCountMap.containsKey("WardRoundAmount") && baseIndex.containsKey("thrMouthNum") && entryCountMap.get("WardRoundAmount").toString()!="0"){
+            //指标十七
+            DecimalFormat df = new DecimalFormat("0.0");
+            double firDouble = Double.parseDouble(baseIndex.get("thrMouthNum").toString())-Double.parseDouble(entryCountMap.get("WardRoundAmount").toString());
+            double thrMouthNum = Double.parseDouble(baseIndex.get("thrMouthNum").toString());
+            medQualityControlDTO.setWardRoundNum( Double.parseDouble(df.format(firDouble/thrMouthNum)));
+        };
+        return medQualityControlDTO;
+    }
+
+
      private MedQualityControlDTO ManageIndexMethod(MedQualityControlDTO medQualityControlDTO, Map<String, Object> baseIndex,FilterVO filterVO){
          QueryWrapper<MedManagementInfo> query = new QueryWrapper<>();
          query.eq("hospital_id", filterVO.getHospitalId())

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

@@ -634,6 +634,14 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public Map<String,Object> getBaseIndex( FilterVO filterVO);
 
+    /**
+     * 病案管理规则质控参数查询
+     *
+     * @param filterVO
+     * @return
+     */
+    public Map<String,Object> getCountByEntry( FilterVO filterVO);
+
     /**
      * 质控核查质控评分页(内页)
      *

+ 10 - 0
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -89,6 +89,16 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      * @return
      */
     public Map<String,Object> getBaseIndex( FilterVO filterVO);
+
+    /**
+     * 病案管理规则质控参数查询
+     *
+     * @param filterVO
+     * @return
+     */
+    public Map<String,Object> getCountByEntry( FilterVO filterVO);
+
+
     /**
      * 出院总人数统计-科室-首页
      *

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

@@ -1024,6 +1024,18 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
     public Map<String,Object> getBaseIndex( FilterVO filterVO) {
         return baseMapper.getBaseIndex(filterVO);
     }
+
+    /**
+     * 病案管理规则质控参数查询
+     *
+     * @param filterVO
+     * @return
+     */
+    @Override
+    public Map<String,Object> getCountByEntry( FilterVO filterVO) {
+        return baseMapper.getCountByEntry(filterVO);
+    }
+
     /**
      * 质控核查质控评分页(内页)
      *

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

@@ -778,6 +778,31 @@
             )f3
     </select>
 
+    <!-- 病案管理规则质控参数查询-->
+    <select id="getCountByEntry"  parameterType="com.diagbot.vo.FilterVO" resultType="java.util.Map">
+        SELECT
+        count(DISTINCT case when  <![CDATA[a.behospital_date >= #{startDate}]]>  and  <![CDATA[a.behospital_date <= #{endDate}]]> and (c.cases_entry_id = 2655 or c.cases_entry_id = 2654) then c.behospital_code end) as WardRoundAmount
+        FROM
+        med_behospital_info a,
+        med_qcresult_info b,
+        med_qcresult_detail c,
+        qc_cases_entry d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.hospital_id = c.hospital_id
+        AND a.behospital_code = b.behospital_code
+        AND a.behospital_code = c.behospital_code
+        AND c.cases_entry_id = d.id
+        AND a.qc_type_id != 0
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+    </select>
+
     <!-- 各科室缺陷占比-全院-首页 -->
     <select id="entryByDept" parameterType="com.diagbot.vo.FilterVO"
             resultType="com.diagbot.dto.NumDTO">