|
@@ -1135,6 +1135,141 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <!--各科室缺陷占比病历列表-->
|
|
|
+ <select id="levelStatisticsByDeptPage" resultType="com.diagbot.dto.BehospitalInfoDeptDTO">
|
|
|
+ SELECT * from (
|
|
|
+ SELECT
|
|
|
+ t.*,
|
|
|
+ t3.name as medoup_name,
|
|
|
+ CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
|
|
|
+ CASE WHEN ISNULL(h.status) THEN 0 ELSE h.status END mr_status,
|
|
|
+ g.check_type as ch_type,
|
|
|
+ h.check_type AS mr_type,
|
|
|
+ g.check_name as ch_name,
|
|
|
+ h.check_name as mr_name,
|
|
|
+ g.check_time as ch_time,
|
|
|
+ h.check_time AS mr_time
|
|
|
+ FROM
|
|
|
+ ( SELECT
|
|
|
+ a.*,
|
|
|
+ IFNULL(b.level, '未评分') AS `level`,
|
|
|
+ b.grade_type,
|
|
|
+ b.score_res,
|
|
|
+ e.score_res as score_bn,
|
|
|
+ b.gmt_create AS grade_time,
|
|
|
+ CONCAT( ifnull(c.age,'') ,ifnull(c.age_unit,'') )as age
|
|
|
+ FROM
|
|
|
+ med_behospital_info a
|
|
|
+ JOIN sys_user_dept d
|
|
|
+ ON a.hospital_id = d.hospital_id
|
|
|
+ AND a.beh_dept_id = d.dept_id
|
|
|
+ LEFT JOIN med_qcresult_info b
|
|
|
+ ON a.behospital_code = b.behospital_code
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ LEFT JOIN med_qcresult_cases e
|
|
|
+ on a.behospital_code = e.behospital_code
|
|
|
+ AND e.is_deleted = 'N'
|
|
|
+ and e.cases_id = 243
|
|
|
+ LEFT JOIN med_home_page c
|
|
|
+ ON a.behospital_code = c.behospital_code
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
+ WHERE d.is_deleted = 'N'
|
|
|
+ AND d.user_id = #{userId}
|
|
|
+ ) t
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type in(0,2) ) g
|
|
|
+ ON t.behospital_code = g.behospital_code
|
|
|
+ AND t.hospital_id = g.hospital_id
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
|
|
|
+ ON t.behospital_code = h.behospital_code
|
|
|
+ AND t.hospital_id = h.hospital_id
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON t.doctor_id = t2.doctor_id
|
|
|
+ AND t.hospital_id = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
+ where t.is_deleted = 'N'
|
|
|
+ <if test="medoupName != null and medoupName != ''">
|
|
|
+ AND t3.name = #{medoupName}
|
|
|
+ </if>
|
|
|
+ <if test="wardName != null and wardName != ''">
|
|
|
+ AND t.ward_name = #{wardName}
|
|
|
+ </if>
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
+ <if test="deptName != null and deptName != ''">
|
|
|
+ and t.beh_dept_name = #{deptName}
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ and t.beh_dept_Id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ and t.doctor_name = #{doctorName}
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ and t.doctor_id = #{doctorCode}
|
|
|
+ </if>
|
|
|
+ <if test="doctorId != null and doctorId != ''">
|
|
|
+ and t.doctor_id = #{doctorId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ and t.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="fileCode != null and fileCode != ''">
|
|
|
+ and t.file_code like CONCAT('%',#{fileCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="hospitalId != null">
|
|
|
+ and t.hospital_id = #{hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ and t.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="behosDateStart != null">
|
|
|
+ <![CDATA[ and t.behospital_date >= #{behosDateStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="behosDateEnd != null">
|
|
|
+ <![CDATA[ and t.behospital_date < #{behosDateEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="leaveHosDateStart != null">
|
|
|
+ <![CDATA[ and t.leave_hospital_date >= #{leaveHosDateStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="leaveHosDateEnd != null">
|
|
|
+ <![CDATA[ and t.leave_hospital_date < #{leaveHosDateEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ and t.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and t.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
+ and t.qc_type_id != 0) p
|
|
|
+ where p.is_deleted="N"
|
|
|
+ <if test="checkStatus != null ">
|
|
|
+ and p.check_status = #{checkStatus}
|
|
|
+ </if>
|
|
|
+ <if test="mrStatus != null ">
|
|
|
+ AND p.mr_status = #{mrStatus}
|
|
|
+ </if>
|
|
|
+ <if test="chName != null and chName !=''">
|
|
|
+ AND p.ch_name like CONCAT('%',#{chName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="mrName != null and mrName !=''">
|
|
|
+ AND p.mr_name like CONCAT('%',#{mrName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="chTimeStart != null">
|
|
|
+ <![CDATA[ and p.ch_time >= #{chTimeStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="chTimeEnd != null">
|
|
|
+ <![CDATA[ and p.ch_time < #{chTimeEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="mrTimeStart != null">
|
|
|
+ <![CDATA[ and p.mr_time >= #{mrTimeStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="mrTimeEnd != null">
|
|
|
+ <![CDATA[ and p.mr_time < #{mrTimeEnd}]]>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!--质控评分(个人)分页-->
|
|
|
<select id="getPageByPerson" resultType="com.diagbot.dto.BehospitalInfoDTO">
|
|
|
Select * from (
|
|
@@ -4694,6 +4829,263 @@
|
|
|
<![CDATA[ and tu.mr_time < #{mrTimeEnd}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 各科室缺陷占比科室导出-->
|
|
|
+ <select id="levelStatisticsExportByDept" resultMap="ExportExcelMapByDept" parameterType="com.diagbot.vo.ExportQcresultVO">
|
|
|
+ SELECT * FROM (
|
|
|
+ SELECT tp.*,t3.name as medoup_name,CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
|
|
|
+ CASE WHEN ISNULL(h.status) THEN 0 ELSE h.status END mr_status,
|
|
|
+ g.check_type AS ch_type,
|
|
|
+ h.check_type AS mr_type,
|
|
|
+ g.check_name AS ch_name,
|
|
|
+ h.check_name AS mr_name,
|
|
|
+ g.check_time AS ch_time,
|
|
|
+ h.check_time AS mr_time
|
|
|
+ FROM (
|
|
|
+ SELECT
|
|
|
+ t1.behDeptId,
|
|
|
+ t1.behDeptName,
|
|
|
+ t1.doctorName,
|
|
|
+ t1.doctor_id as doctorId,
|
|
|
+ t1.patName,
|
|
|
+ t1.wardName,
|
|
|
+ t1.behospitalCode,
|
|
|
+ t1.fileCode,
|
|
|
+ t1.hospitalId,
|
|
|
+ t1.behospitalDate,
|
|
|
+ t1.leaveHospitalDate,
|
|
|
+ t1.score,
|
|
|
+ t2.avgScore,
|
|
|
+ <if test="radioCheck !=null and radioCheck == 1">
|
|
|
+ c.msg AS msg,
|
|
|
+ t1.caseName,
|
|
|
+ </if>
|
|
|
+ e.score_res as scoreBn
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ a.doctor_name AS doctorName,
|
|
|
+ a.doctor_id,
|
|
|
+ a.`name` AS patName,
|
|
|
+ a.ward_name as wardName,
|
|
|
+ a.file_code as fileCode,
|
|
|
+ a.behospital_code AS behospitalCode,
|
|
|
+ a.hospital_id AS hospital_id,
|
|
|
+ d.id,
|
|
|
+ a.behospital_date AS behospitalDate,
|
|
|
+ a.leave_hospital_date AS leaveHospitalDate,
|
|
|
+ b.score_res AS score,
|
|
|
+ <if test="radioCheck !=null and radioCheck == 1">
|
|
|
+ d.NAME AS caseName,
|
|
|
+ </if>
|
|
|
+ a.beh_dept_id AS behDeptId,
|
|
|
+ a.beh_dept_name AS behDeptName,
|
|
|
+ a.hospital_id AS hospitalId
|
|
|
+ FROM
|
|
|
+ med_behospital_info a,
|
|
|
+ med_qcresult_info b,
|
|
|
+ qc_cases d,
|
|
|
+ sys_user_dept e
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND d.is_deleted = 'N'
|
|
|
+ AND e.is_deleted = 'N'
|
|
|
+ AND a.hospital_id = b.hospital_id
|
|
|
+ AND a.hospital_id = e.hospital_id
|
|
|
+ AND a.behospital_code = b.behospital_code
|
|
|
+ AND a.beh_dept_id = e.dept_id
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
+ <if test="wardName != null and wardName != ''">
|
|
|
+ AND a.ward_name = #{wardName}
|
|
|
+ </if>
|
|
|
+ <![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
+ <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ AND a.hospital_id = #{hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null ">
|
|
|
+ AND e.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="behosDateStart != null">
|
|
|
+ <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="behosDateEnd != null">
|
|
|
+ <![CDATA[ and a.behospital_date < #{behosDateEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="leaveHosDateStart != null ">
|
|
|
+ <![CDATA[ and a.leave_hospital_date >= DATE(#{leaveHosDateStart})]]>
|
|
|
+ </if>
|
|
|
+ <if test="leaveHosDateEnd != null ">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
|
+ </if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ AND b.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND a.doctor_name = #{doctorName}
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ AND a.doctor_id = #{doctorCode}
|
|
|
+ </if>
|
|
|
+ <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="name != null and name != ''">
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ ) t1
|
|
|
+ LEFT JOIN med_qcresult_cases e
|
|
|
+ on t1.behospitalCode = e.behospital_code
|
|
|
+ and t1.hospital_id = e.hospital_id
|
|
|
+ AND e.is_deleted = 'N'
|
|
|
+ and e.cases_id = 243
|
|
|
+ LEFT JOIN med_qcresult_detail c
|
|
|
+ on t1.behospitalCode = c.behospital_code
|
|
|
+ and t1.hospital_id = c.hospital_id
|
|
|
+ AND c.cases_id = t1.id
|
|
|
+ AND c.is_deleted = 'N',
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ ROUND( AVG( b.score_res ), 2 ) AS avgScore,
|
|
|
+ a.beh_dept_id AS behDeptId,
|
|
|
+ a.beh_dept_name AS behDeptName,
|
|
|
+ a.doctor_id AS doctorId,
|
|
|
+ a.doctor_name AS doctorName
|
|
|
+ FROM
|
|
|
+ med_behospital_info a,
|
|
|
+ med_qcresult_info b,
|
|
|
+ sys_user_dept c
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND c.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.beh_dept_id = c.dept_id
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
+ <if test="wardName != null and wardName != ''">
|
|
|
+ AND a.ward_name = #{wardName}
|
|
|
+ </if>
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
+ <![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
+ <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ AND a.hospital_id = #{hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null ">
|
|
|
+ AND c.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="behosDateStart != null">
|
|
|
+ <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="behosDateEnd != null">
|
|
|
+ <![CDATA[ and a.behospital_date < #{behosDateEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="leaveHosDateStart != null ">
|
|
|
+ <![CDATA[ and a.leave_hospital_date >= DATE(#{leaveHosDateStart})]]>
|
|
|
+ </if>
|
|
|
+ <if test="leaveHosDateEnd != null ">
|
|
|
+ <![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
|
+ </if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ AND b.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND a.doctor_name = #{doctorName}
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ and a.doctor_id = #{doctorCode}
|
|
|
+ </if>
|
|
|
+ <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="name != null and name != ''">
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ a.beh_dept_id,
|
|
|
+ a.beh_dept_name,
|
|
|
+ a.doctor_id,
|
|
|
+ a.doctor_name
|
|
|
+ ) t2
|
|
|
+ WHERE
|
|
|
+ t1.behDeptId = t2.behDeptId
|
|
|
+ AND t1.behDeptName = t2.behDeptName
|
|
|
+ AND t1.doctor_id = t2.doctorId
|
|
|
+ AND t1.doctorName = t2.doctorName
|
|
|
+ ORDER BY
|
|
|
+ t1.behDeptName,
|
|
|
+ t1.doctorName,
|
|
|
+ t1.patName,
|
|
|
+ <if test="radioCheck !=null and radioCheck == 1">
|
|
|
+ t1.caseName,
|
|
|
+ </if>
|
|
|
+ t1.behospitalCode
|
|
|
+ )tp
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
|
+ ON tp.behospitalCode = g.behospital_code
|
|
|
+ AND tp.hospitalId = g.hospital_id
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
|
|
|
+ ON tp.behospitalCode = h.behospital_code
|
|
|
+ AND tp.hospitalId = h.hospital_id
|
|
|
+ LEFT JOIN bas_doctor_info t2 ON tp.doctorId = t2.doctor_id
|
|
|
+ AND tp.hospitalId = t2.hospital_id
|
|
|
+ AND t2.is_deleted = 'N'
|
|
|
+ LEFT JOIN sys_medoup t3 ON t2.group_id = t3.`code`
|
|
|
+ AND t3.is_deleted = 'N'
|
|
|
+ where 1=1
|
|
|
+ <if test="medoupName != null and medoupName != ''">
|
|
|
+ AND t3.name = #{medoupName}
|
|
|
+ </if>
|
|
|
+ ) tu
|
|
|
+ WHERE tu.behospitalCode IS NOT NULL
|
|
|
+ <if test="checkStatus != null ">
|
|
|
+ and tu.check_status = #{checkStatus}
|
|
|
+ </if>
|
|
|
+ <if test="mrStatus != null ">
|
|
|
+ AND tu.mr_status = #{mrStatus}
|
|
|
+ </if>
|
|
|
+ <if test="chName != null and chName !=''">
|
|
|
+ AND tu.ch_name like CONCAT('%',#{chName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="mrName != null and mrName !=''">
|
|
|
+ AND tu.mr_name like CONCAT('%',#{mrName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="chTimeStart != null">
|
|
|
+ <![CDATA[ and tu.ch_time >= #{chTimeStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="chTimeEnd != null">
|
|
|
+ <![CDATA[ and tu.ch_time < #{chTimeEnd}]]>
|
|
|
+ </if>
|
|
|
+ <if test="mrTimeStart != null">
|
|
|
+ <![CDATA[ and tu.mr_time >= #{mrTimeStart}]]>
|
|
|
+ </if>
|
|
|
+ <if test="mrTimeEnd != null">
|
|
|
+ <![CDATA[ and tu.mr_time < #{mrTimeEnd}]]>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 个人质控评分导出到excel-->
|
|
|
<select id="exportQcresultByPerson" resultMap="ExportExcelMap" parameterType="com.diagbot.vo.ExportQcresultVO">
|
|
|
SELECT * FROM (
|
|
@@ -5578,9 +5970,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.isReject != null">
|
|
|
AND c.is_reject = #{qcResultShortPageVO.isReject}
|
|
@@ -7524,9 +7914,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
) b
|
|
|
LEFT JOIN med_qcresult_info c ON c.is_deleted = 'N'
|
|
@@ -9178,9 +9566,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
) b
|
|
|
LEFT JOIN med_qcresult_info c ON c.is_deleted = 'N'
|
|
@@ -9432,9 +9818,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
) b
|
|
|
LEFT JOIN med_qcresult_info c ON c.is_deleted = 'N'
|
|
@@ -9696,9 +10080,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
|
|
|
AND b.`level` = #{qcResultShortPageVO.level}
|
|
@@ -9999,9 +10381,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.isReject != null">
|
|
|
AND c.is_reject = #{qcResultShortPageVO.isReject}
|
|
@@ -11360,9 +11740,7 @@
|
|
|
AND a.doctor_id = #{doctorId}
|
|
|
</if>
|
|
|
<if test="doctorName != null and doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{doctorName}
|
|
|
</if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -11462,9 +11840,7 @@
|
|
|
and a.beh_dept_name = #{deptName}
|
|
|
</if>
|
|
|
<if test="doctorName != null and doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{doctorName}
|
|
|
</if>
|
|
|
<if test="doctorId != null and doctorId != ''">
|
|
|
AND a.doctor_id = #{doctorId}
|
|
@@ -12160,9 +12536,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
AND d.id = #{qcResultShortPageVO.casesEntryId}
|
|
@@ -12894,9 +13268,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
)be
|
|
|
left join med_check_info mci
|
|
@@ -13131,9 +13503,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
AND d.id = #{qcResultShortPageVO.casesEntryId}
|
|
@@ -13855,9 +14225,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
|
|
|
AND d.NAME = #{qcResultShortPageVO.casesEntryName}
|
|
@@ -14092,9 +14460,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.casesEntryId != null ">
|
|
|
AND d.id = #{qcResultShortPageVO.casesEntryId}
|
|
@@ -15378,6 +15744,9 @@
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND m1.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
+ AND m1.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == 0">
|
|
|
<if test="qcResultShortPageVO.startDate != null ">
|
|
|
<![CDATA[ AND m1.behospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
@@ -15472,9 +15841,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.improveType != null and qcResultShortPageVO.improveType == 2">
|
|
|
<![CDATA[AND ( e.`level` = '不合格' AND d.`level` = '合格' AND d.score_res < 20 )]]>
|
|
@@ -15850,9 +16217,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
) be
|
|
|
LEFT JOIN med_check_info mci ON mci.is_deleted = 'N'
|
|
@@ -16589,6 +16954,9 @@
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND m1.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
+ AND m1.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == 0">
|
|
|
<if test="qcResultShortPageVO.startDate != null ">
|
|
|
<![CDATA[ AND m1.behospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
@@ -16683,9 +17051,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.improveType != null and qcResultShortPageVO.improveType == 2">
|
|
|
<![CDATA[AND ( e.`level` = '不合格' AND d.`level` = '合格' AND d.score_res < 20 )]]>
|
|
@@ -16871,6 +17237,9 @@
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND m1.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
+ AND m1.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == 0">
|
|
|
<if test="qcResultShortPageVO.startDate != null ">
|
|
|
<![CDATA[ AND m1.behospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
@@ -16965,9 +17334,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.improveType != null and qcResultShortPageVO.improveType == 2">
|
|
|
<![CDATA[AND ( e.`level` = '不合格' AND d.`level` = '合格' AND d.score_res < 20 )]]>
|
|
@@ -17609,9 +17976,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
) be
|
|
|
LEFT JOIN med_check_info mci ON mci.is_deleted = 'N'
|
|
@@ -17816,9 +18181,7 @@
|
|
|
AND a.doctor_id = #{qcResultShortPageVO.doctorId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.doctorName != null and qcResultShortPageVO.doctorName != ''">
|
|
|
- AND (a.doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
|
|
|
- OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
|
|
|
+ AND a.doctor_name = #{qcResultShortPageVO.doctorName}
|
|
|
</if>
|
|
|
) be
|
|
|
LEFT JOIN med_check_info mci ON mci.is_deleted = 'N'
|