소스 검색

Merge remote-tracking branch 'origin/dev/20220613_v2.1.6厦门个性化_出院人数统计' into debug

# Conflicts:
#	src/main/java/com/diagbot/config/ResourceServerConfigurer.java
#	src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
hecc 3 년 전
부모
커밋
c8905ccc59

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

@@ -36,7 +36,13 @@ 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,
+            @DataConsumer("getOperationLevelOneCount") Integer operationLevelOneNum,
+            @DataConsumer("getOperationLevelTwoCount") Integer operationLevelTwoNum,
+            @DataConsumer("getOperationLevelThreeCount") Integer operationLevelThreeNum,
+            @DataConsumer("getOperationLevelFourCount") Integer operationLevelFourNum) {
 
         Map<String, Object> retMap = new LinkedHashMap<>();
         retMap.put("总人数", totleNum);
@@ -45,6 +51,12 @@ public class LeaveHosStatisticsAggregate {
         retMap.put("手术病人数", operationNum);
         retMap.put("非医嘱离院病人数", nonAdviceNum);
         retMap.put("31日再入院病历数", reBehospitalNum);
+        retMap.put("输血患者人数", bloodNum);
+        retMap.put("癌痛患者人数", cancerNum);
+        retMap.put("一级手术等级人数", operationLevelOneNum );
+        retMap.put("二级手术等级人数", operationLevelTwoNum );
+        retMap.put("三级手术等级人数", operationLevelThreeNum );
+        retMap.put("四级手术等级人数", operationLevelFourNum );
         return retMap;
 
     }
@@ -93,6 +105,50 @@ public class LeaveHosStatisticsAggregate {
         return behospitalInfoFacade.operationCount(filterVO);
     }
 
+    /**
+     * 一级手术级别人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getOperationLevelOneCount")
+    public Integer getOperationLevelOneCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.operationLevelOneCount(filterVO);
+    }
+
+    /**
+     * 二级手术级别人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getOperationLevelTwoCount")
+    public Integer getOperationLevelTwoCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.operationLevelTwoCount(filterVO);
+    }
+
+    /**
+     * 三级手术级别人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getOperationLevelThreeCount")
+    public Integer getOperationLevelThreeCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.operationLevelThreeCount(filterVO);
+    }
+
+    /**
+     * 四级手术级别人数
+     *
+     * @param filterVO
+     * @return
+     */
+    @DataProvider("getOperationLevelFourCount")
+    public Integer getOperationLevelFourCount(@InvokeParameter("filterVO") FilterVO filterVO) {
+        return behospitalInfoFacade.operationLevelFourCount(filterVO);
+    }
+
     /**
      * 非医嘱离院
      *
@@ -138,4 +194,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);
+    }
 }

+ 8 - 22
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -154,27 +154,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/consoleByDept/mrCountByDept").permitAll()
                 .antMatchers("/consoleByDept/qcResultShortByDeptPage").permitAll()
                 .antMatchers("/consoleByDept/resultStatisticsByDeptAndDoctorPage").permitAll()
-                .antMatchers("/console/export/homePageLevelExport").permitAll()
-                .antMatchers("/console/export/entryGroupByEntryExport").permitAll()
-                .antMatchers("/console/export/levelExport").permitAll()
                 .antMatchers("/console/entryStatistics").permitAll()
-                .antMatchers("/console/export/levelExport_TZ").permitAll()
-                .antMatchers("/console/export/getAverageDayNumExport").permitAll()
-                .antMatchers("/console/export/getAverageFeeExport").permitAll()
-                .antMatchers("/console/export/levelPercentGroupByDeptExport").permitAll()
-                .antMatchers("/console/export/entryCountGroupByEntryExport").permitAll()
-                .antMatchers("/console/export/entryCountGroupXYByEntryExport").permitAll()
-                .antMatchers("/console/export/entryCountGroupByCaseExport").permitAll()
-                .antMatchers("/console/export/entryStatisticsExport").permitAll()
-                .antMatchers("/console/export/qcResultShortPageExport").permitAll()
-                .antMatchers("/console/export/qcResultShortXYPageExport").permitAll()
-                .antMatchers("/console/export/leaveHosMrPageExport").permitAll()
-                .antMatchers("/console/export/qcCheckStatisticsExport").permitAll()
-                .antMatchers("/console/export/unModifyMRPageExport").permitAll()
-                .antMatchers("/console/export/unModifyMRStatisticsExport").permitAll()
-                .antMatchers("/console/export/reHos31DaysPageExport").permitAll()
-                .antMatchers("/console/export/hmImproveMRPageExport").permitAll()
-                .antMatchers("/console/export/qcCheckMRPageExport").permitAll()
                 .antMatchers("/qc/data/sendDoctorInfos").permitAll()
                 .antMatchers("/qc/data/sendDeptInfos").permitAll()
                 .antMatchers("/qc/data/sendRecordTypes").permitAll()
@@ -195,7 +175,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/data/getColumnZhAndCh").permitAll()
                 .antMatchers("/qc/data/analyseRec").permitAll()
                 .antMatchers("/qc/data/hisDataDeal").permitAll()
-                .antMatchers("/qc/data_str/**").permitAll()
+                .antMatchers("/qc/data_str/*").permitAll()
                 .antMatchers("/qc/doctoradvice/getPage").permitAll()
                 .antMatchers("/qc/medPacsInfo/getCheckPage").permitAll()
                 .antMatchers("/qc/medLisInfo/getExaminePage").permitAll()
@@ -205,6 +185,10 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/medicalCheckTitle").permitAll()
                 .antMatchers("/console/badLevelPage").permitAll()
                 .antMatchers("/console/badLevelXYPage").permitAll()
+                .antMatchers("/console/export/badUnQualifiedLevelPagePageExport").permitAll()
+                .antMatchers("/console/export/badQualifiedLevelPagePageExport").permitAll()
+                .antMatchers("/console/export/badUnQualifiedLevelPageXYExport").permitAll()
+                .antMatchers("/console/export/badQualifiedLevelPageXYExport").permitAll()
                 .antMatchers("/qc/medNurse/getMedNursePage").permitAll()
                 .antMatchers("/qc/medRecordOther/getMedRecordOtherPage").permitAll()
                 .antMatchers("/qc/medRecordOther/getMedRecordContentOther").permitAll()
@@ -243,7 +227,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/console/qualityControl").permitAll()
                 .antMatchers("/console/export/**").permitAll()
                 .antMatchers("/consoleByDept/qualityControlByDept").permitAll()
-                .antMatchers("/print/export/**").permitAll()
+                .antMatchers("/print/export/qualityControlExportByDept").permitAll()
                 .antMatchers("/qc/behospitalInfo/getMedQualityCoList").permitAll()
                 .antMatchers("/console/saveMedicaIndicator").permitAll()
                 .antMatchers("/qc/medCheckInfo/createMedBeHospitalInfoType").permitAll()
@@ -294,6 +278,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/getDoctorDetail/**").permitAll()
                 .antMatchers("/qcView/data/**").permitAll()
                 .antMatchers("/medDefectFeedback/**").permitAll()
+                .antMatchers("/qcView/data/*").permitAll()
+                .antMatchers("/medDefectFeedback/*").permitAll()
                 .antMatchers("/medNewsNotice/**").permitAll()
                 .antMatchers("/h5/statistics/**").permitAll()
                 .antMatchers("/logManage/**").permitAll()

+ 4 - 0
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -59,6 +59,8 @@ public class QcResultShortDTO {
     private String behDoctorId;
     @Excel(name = "住院医生", width = 30, orderNum = "14")
     private String behDoctorName;
+    @Excel(name = "手术级别", width = 30, orderNum = "16")
+    private String operationLevel;
     /**
      * 主治医生id
      */
@@ -71,6 +73,8 @@ public class QcResultShortDTO {
     private String directorDoctorId;
     @Excel(name = "主任医生", width = 30, orderNum = "16")
     private String directorDoctorName;
+    @Excel(name = "主刀医生", width = 30, orderNum = "16")
+    private String operationDocterName;
     /**
      * 科室编码
      */

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

@@ -85,6 +85,38 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public int operationCount(FilterVO filterVO);
 
+    /**
+     * 一级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelOneCount(FilterVO filterVO);
+
+    /**
+     * 二级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelTwoCount(FilterVO filterVO);
+
+    /**
+     * 三级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelThreeCount(FilterVO filterVO);
+
+    /**
+     * 四级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelFourCount(FilterVO filterVO);
+
     /**
      * 出院总人数统计-科室-首页
      *
@@ -363,6 +395,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);
+
     /**
      * 病案首页质控病历数统计-全院(首页)
      *

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

@@ -121,6 +121,46 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.operationCount(filterVO);
     }
 
+    /**
+     * 一级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelOneCount(FilterVO filterVO) {
+        return baseMapper.operationLevelOneCount(filterVO);
+    }
+
+    /**
+     * 二级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelTwoCount(FilterVO filterVO) {
+        return baseMapper.operationLevelTwoCount(filterVO);
+    }
+
+    /**
+     * 三级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelThreeCount(FilterVO filterVO) {
+        return baseMapper.operationLevelThreeCount(filterVO);
+    }
+
+    /**
+     * 四级手术级别人数-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationLevelFourCount(FilterVO filterVO) {
+        return baseMapper.operationLevelFourCount(filterVO);
+    }
+
     /**
      * 出院总人数统计-科室-首页
      *
@@ -472,6 +512,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);
+    }
+
     /**
      * 病案首页质控病历数统计-全院(首页)
      *

+ 11 - 1
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -43,6 +43,16 @@ public class QcResultShortPageVO extends Page {
      */
     private String diagnose;
 
+    /**
+     * 主刀医生
+     */
+    private String operationDoctor;
+
+    /**
+     * 手术等级
+     */
+    private String operationLevel;
+
     /**
      * title名称
      */
@@ -97,7 +107,7 @@ public class QcResultShortPageVO extends Page {
     private Integer ruleType;
 
     /**
-     * 离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人)
+     * 离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人,6:输血患者病人,7:癌痛患者病人)
      */
     private Integer leaveHosType;
 

+ 3 - 1
src/main/java/com/diagbot/web/ConsoleController.java

@@ -704,7 +704,9 @@ public class ConsoleController {
                     "leaveHosType: 离院人员类型(0/null:总人数,1:死亡人数,2:新生儿,3:手术病人数,4:非医嘱离院病人,5:31日再入院病人) <br>" +
                     "startDate: 起始时间 <br>" +
                     "endDate: 截止时间 <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>" +
+                    "operationDocterName: 主刀医生 <br>" +
+                    "operationLevel: 手术级别 <br>")
     @PostMapping("/leaveHosMRPage")
     @SysLogger("leaveHosMRPage")
     public RespDTO<IPage<QcResultShortDTO>> leaveHosMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {

+ 321 - 3
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -7803,10 +7803,12 @@
     </select>
     <!-- 离院病人评分详情页-->
     <select id="leaveHosMRPage" resultType="com.diagbot.dto.QcResultShortDTO">
-        SELECT
-        t.*
+        SELECT DISTINCT
+        t.*,
+        t4.operation_doctor_id,
+        t4.operation_level
         FROM
-        (SELECT DISTINCT
+        (SELECT
         t1.hospital_id AS hospitalId,
         t1.behospital_code AS behospitalCode,
         t1.bed_code AS bedCode,
@@ -8011,8 +8013,40 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
         </if>
+        <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 6">
+            ,med_home_page t2
+            WHERE
+            t2.is_deleted = 'N'
+            AND t1.hospital_id = t2.hospital_id
+            AND t1.behospital_code = t2.behospital_code
+            AND
+            ( t2.blood_fee != 0
+            or t2.blood_fee != 0.00
+            or t2.blood_fee != null
+            )
+        </if>
+        <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 7">
+            ,med_home_page t2
+            ,med_doctor_advice b
+            WHERE
+            t2.is_deleted = 'N'
+            AND b.is_deleted = 'N'
+            AND t1.hospital_id = t2.hospital_id
+            AND t1.hospital_id = b.hospital_id
+            AND t1.behospital_code = t2.behospital_code
+            AND t1.behospital_code = b.behospital_code
+            AND t2.behospital_code = b.behospital_code
+            AND b.da_item_name like '癌痛%'
+            AND b.da_status != '作废'
+        </if>
         )t
+        ,med_home_page t3
+        ,med_home_operation_info t4
         where 1=1
+        AND t.hospitalId = t3.hospital_id
+        AND t.hospitalId = t4.hospital_id
+        AND t.behospitalCode = t3.behospital_code
+        AND t3.home_page_id = t4.home_page_id
         <if test="qcResultShortPageVO.checkStatus != null">
             and t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
@@ -8040,6 +8074,12 @@
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND t.`level` = #{qcResultShortPageVO.level}
         </if>
+        <if test="qcResultShortPageVO.operationDoctor != null and qcResultShortPageVO.operationDoctor != ''">
+            AND t4.`operation_doctor_id` = #{qcResultShortPageVO.operationDoctor}
+        </if>
+        <if test="qcResultShortPageVO.operationLevel != null and qcResultShortPageVO.operationLevel != ''">
+            AND t4.`operation_level` = #{qcResultShortPageVO.operationLevel}
+        </if>
     </select>
 
     <!-- 离院病人评分详情页-科室-->
@@ -21558,4 +21598,282 @@
         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>
+
+    <!--一级手术级别人数-->
+    <select id="operationLevelOneCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
+        SELECT
+        COUNT(DISTINCT a.behospital_code , case when f.operation_level ='1' then '1' end)
+        FROM
+        med_behospital_info a,
+        med_medical_record c,
+        qc_mode d,
+        med_home_page e,
+        med_home_operation_info f
+        WHERE
+        a.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND e.is_deleted = 'N'
+        AND f.is_deleted = 'N'
+        AND a.hospital_id = c.hospital_id
+        AND a.behospital_code = c.behospital_code
+        AND c.mode_id = d.id
+        AND a.hospital_id = e.hospital_id
+        AND a.hospital_id = f.hospital_id
+        AND a.behospital_code = e.behospital_code
+        AND e.home_page_id = f.home_page_id
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        AND d.`name` = '手术记录'
+        <![CDATA[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="operationLevelTwoCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
+        SELECT
+        COUNT(DISTINCT a.behospital_code , case when f.operation_level ='2' then '1' end)
+        FROM
+        med_behospital_info a,
+        med_medical_record c,
+        qc_mode d,
+        med_home_page e,
+        med_home_operation_info f
+        WHERE
+        a.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND e.is_deleted = 'N'
+        AND f.is_deleted = 'N'
+        AND a.hospital_id = c.hospital_id
+        AND a.behospital_code = c.behospital_code
+        AND c.mode_id = d.id
+        AND a.hospital_id = e.hospital_id
+        AND a.hospital_id = f.hospital_id
+        AND a.behospital_code = e.behospital_code
+        AND e.home_page_id = f.home_page_id
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        AND d.`name` = '手术记录'
+        <![CDATA[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="operationLevelThreeCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
+        SELECT
+        COUNT(DISTINCT a.behospital_code , case when f.operation_level ='3' then '1' end)
+        FROM
+        med_behospital_info a,
+        med_medical_record c,
+        qc_mode d,
+        med_home_page e,
+        med_home_operation_info f
+        WHERE
+        a.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND e.is_deleted = 'N'
+        AND f.is_deleted = 'N'
+        AND a.hospital_id = c.hospital_id
+        AND a.behospital_code = c.behospital_code
+        AND c.mode_id = d.id
+        AND a.hospital_id = e.hospital_id
+        AND a.hospital_id = f.hospital_id
+        AND a.behospital_code = e.behospital_code
+        AND e.home_page_id = f.home_page_id
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        AND d.`name` = '手术记录'
+        <![CDATA[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="operationLevelFourCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
+        SELECT
+        COUNT(DISTINCT a.behospital_code , case when f.operation_level ='4' then '1' end)
+        FROM
+        med_behospital_info a,
+        med_medical_record c,
+        qc_mode d,
+        med_home_page e,
+        med_home_operation_info f
+        WHERE
+        a.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND e.is_deleted = 'N'
+        AND f.is_deleted = 'N'
+        AND a.hospital_id = c.hospital_id
+        AND a.behospital_code = c.behospital_code
+        AND c.mode_id = d.id
+        AND a.hospital_id = e.hospital_id
+        AND a.hospital_id = f.hospital_id
+        AND a.behospital_code = e.behospital_code
+        AND e.home_page_id = f.home_page_id
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        AND d.`name` = '手术记录'
+        <![CDATA[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>