|
@@ -3375,6 +3375,7 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
<!-- 各科室缺陷占比-科室 -->
|
|
|
<select id="levelStatisticsByDept" parameterType="com.diagbot.vo.FilterOrderByDeptVO"
|
|
|
resultType="com.diagbot.dto.LevelStsByDeptDTO">
|
|
@@ -3870,6 +3871,15 @@
|
|
|
<if test="deptName!=null and deptName !=''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
|
</if>
|
|
|
+ <if test="deptId!=null and deptId !=''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorId != null and doctorId != ''">
|
|
|
+ AND a.doctor_id = #{doctorId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND a.doctor_name like CONCAT('%', #{doctorName}, '%')
|
|
|
+ </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.doctor_name like CONCAT('%', #{name}, '%')
|
|
|
</if>
|
|
@@ -3943,6 +3953,15 @@
|
|
|
<if test="deptName!=null and deptName !=''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
|
</if>
|
|
|
+ <if test="deptId!=null and deptId !=''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorId != null and doctorId != ''">
|
|
|
+ AND a.doctor_id = #{doctorId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND a.doctor_name like CONCAT('%', #{doctorName}, '%')
|
|
|
+ </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.doctor_name like CONCAT('%', #{name}, '%')
|
|
|
</if>
|
|
@@ -4032,6 +4051,15 @@
|
|
|
<if test="deptName!=null and deptName !=''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
|
</if>
|
|
|
+ <if test="deptId!=null and deptId !=''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorId != null and doctorId != ''">
|
|
|
+ AND a.doctor_id = #{doctorId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND a.doctor_name like CONCAT('%', #{doctorName}, '%')
|
|
|
+ </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.doctor_name like CONCAT('%', #{name}, '%')
|
|
|
</if>
|
|
@@ -5491,6 +5519,9 @@
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
|
|
|
AND b.`level` = #{qcResultShortPageVO.level}
|
|
|
</if>
|
|
@@ -5513,9 +5544,7 @@
|
|
|
AND d.cases_id = #{qcResultShortPageVO.casesId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
- AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
@@ -9574,13 +9603,11 @@
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
+ <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
- AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
@@ -9845,6 +9872,9 @@
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.deptName}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
|
|
|
AND b.`level` = #{qcResultShortPageVO.level}
|
|
|
</if>
|
|
@@ -9867,9 +9897,7 @@
|
|
|
AND d.cases_id = #{qcResultShortPageVO.casesId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
- AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
@@ -11205,6 +11233,9 @@
|
|
|
<if test="deptClass != null and deptClass != ''">
|
|
|
and a.beh_dept_id = #{deptClass}
|
|
|
</if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
<if test="titleName != null and titleName != '' ">
|
|
|
<if test="titleName == '不合格数'">
|
|
|
AND e.`level`='不合格'
|
|
@@ -11217,7 +11248,9 @@
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
<if test="doctorName != null and doctorName != ''">
|
|
|
- AND a.doctor_name like CONCAT('%', #{doctorName}, '%')
|
|
|
+ AND (a.doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
+ OR a.beh_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
+ OR a.director_doctor_name LIKE CONCAT( '%', #{doctorName}, '%'))
|
|
|
</if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -11248,9 +11281,7 @@
|
|
|
AND a.NAME LIKE CONCAT( '%', #{patName}, '%' )
|
|
|
</if>
|
|
|
<if test="doctorId != null and doctorId != ''">
|
|
|
- AND (a.doctor_id LIKE CONCAT( '%', #{doctorId}, '%' )
|
|
|
- OR a.beh_doctor_id LIKE CONCAT( '%', #{doctorId}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{doctorId}
|
|
|
</if>
|
|
|
)be
|
|
|
left join med_check_info mci
|
|
@@ -11304,14 +11335,6 @@
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND d.cases_id = 243
|
|
|
AND a.qc_type_id != 0
|
|
|
- <!-- <if test="titleName != null ">-->
|
|
|
- <!-- <if test="titleName == '不合格数'">-->
|
|
|
- <!-- AND c.`level`='不合格'-->
|
|
|
- <!-- </if>-->
|
|
|
- <!-- <if test="titleName == '合格数'">-->
|
|
|
- <!-- AND c.`level`='合格'-->
|
|
|
- <!-- </if>-->
|
|
|
- <!-- </if>-->
|
|
|
<if test="userId!=null">
|
|
|
AND b.user_id = #{userId}
|
|
|
</if>
|
|
@@ -11319,11 +11342,19 @@
|
|
|
and a.beh_dept_name = #{deptName}
|
|
|
</if>
|
|
|
<if test="doctorName != null and doctorName != ''">
|
|
|
- AND a.doctor_name like CONCAT('%', #{doctorName}, '%')
|
|
|
+ AND (a.doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
+ OR a.beh_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
+ OR a.director_doctor_name LIKE CONCAT( '%', #{doctorName}, '%'))
|
|
|
+ </if>
|
|
|
+ <if test="doctorId != null and doctorId != ''">
|
|
|
+ AND a.doctor_id = #{doctorId}
|
|
|
</if>
|
|
|
<if test="deptClass != null and deptClass != ''">
|
|
|
and a.beh_dept_id = #{deptClass}
|
|
|
</if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
<if test="isPlacefile != null and isPlacefile != ''">
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
@@ -11508,6 +11539,9 @@
|
|
|
<if test="qcResultPageVO.deptName != null and qcResultPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultPageVO.deptName}
|
|
|
</if>
|
|
|
+ <if test="qcResultPageVO.deptId != null and qcResultPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultPageVO.deptId}
|
|
|
+ </if>
|
|
|
<if test="qcResultPageVO.behospitalCode != null and qcResultPageVO.behospitalCode != ''">
|
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultPageVO.behospitalCode}, '%' )
|
|
|
</if>
|
|
@@ -11608,6 +11642,9 @@
|
|
|
<if test="qcResultPageVO.deptName != null and qcResultPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultPageVO.deptName}, '%' )
|
|
|
</if>
|
|
|
+ <if test="qcResultPageVO.deptId != null and qcResultPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultPageVO.deptId}
|
|
|
+ </if>
|
|
|
<if test="qcResultPageVO.behospitalCode != null and qcResultPageVO.behospitalCode != ''">
|
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultPageVO.behospitalCode}, '%' )
|
|
|
</if>
|
|
@@ -12678,9 +12715,6 @@
|
|
|
AND c.`level`='合格'
|
|
|
</if>
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND a.doctor_name like CONCAT('%', #{qcResultShortPageVO.doctorName}, '%')
|
|
|
- </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
@@ -12709,6 +12743,9 @@
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
|
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
|
|
|
</if>
|
|
@@ -12716,9 +12753,7 @@
|
|
|
AND a.NAME LIKE CONCAT( '%', #{qcResultShortPageVO.patName}, '%' )
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
- AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
@@ -12899,21 +12934,10 @@
|
|
|
AND c.cases_id = k.cases_id
|
|
|
AND k.cases_id = d.cases_id
|
|
|
AND k.cases_entry_id = d.id
|
|
|
- <!-- <if test="qcResultShortPageVO.titleName != null ">-->
|
|
|
- <!-- <if test="qcResultShortPageVO.titleName == '不合格数'">-->
|
|
|
- <!-- AND c.`level`='不合格'-->
|
|
|
- <!-- </if>-->
|
|
|
- <!-- <if test="qcResultShortPageVO.titleName == '合格数'">-->
|
|
|
- <!-- AND c.`level`='合格'-->
|
|
|
- <!-- </if>-->
|
|
|
- <!-- </if>-->
|
|
|
AND a.qc_type_id != 0
|
|
|
<if test="qcResultShortPageVO.userId!=null">
|
|
|
AND b.user_id = #{qcResultShortPageVO.userId}
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- and a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
- </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
</if>
|
|
@@ -12942,6 +12966,9 @@
|
|
|
<if test="qcResultShortPageVO.deptName != null and qcResultShortPageVO.deptName != ''">
|
|
|
AND a.beh_dept_name LIKE CONCAT( '%', #{qcResultShortPageVO.deptName}, '%' )
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.deptId != null and qcResultShortPageVO.deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{qcResultShortPageVO.deptId}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behospitalCode != null and qcResultShortPageVO.behospitalCode != ''">
|
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultShortPageVO.behospitalCode}, '%' )
|
|
|
</if>
|
|
@@ -12952,9 +12979,7 @@
|
|
|
AND d.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
|
|
|
- AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
|
|
|
- OR a.director_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' ))
|
|
|
+ AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|