|
@@ -69,6 +69,9 @@
|
|
|
ON t.behospital_code = h.behospital_code
|
|
|
AND t.hospital_id = h.hospital_id
|
|
|
where t.is_deleted = 'N'
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
and t.beh_dept_id = #{deptId}
|
|
|
</if>
|
|
@@ -372,6 +375,9 @@
|
|
|
ON t.behospital_code = h.behospital_code
|
|
|
AND t.hospital_id = h.hospital_id
|
|
|
where t.is_deleted = 'N'
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
and t.beh_dept_id = #{deptId}
|
|
|
</if>
|
|
@@ -501,6 +507,9 @@
|
|
|
ON t.behospital_code = h.behospital_code
|
|
|
AND t.hospital_id = h.hospital_id
|
|
|
WHERE t.is_deleted = 'N'
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
and t.beh_dept_id = #{deptId}
|
|
|
</if>
|
|
@@ -605,6 +614,9 @@
|
|
|
<if test="deptId != null and deptId != ''">
|
|
|
and t.beh_dept_id = #{deptId}
|
|
|
</if>
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="doctorName != null and doctorName != ''">
|
|
|
and (t.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
or t.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
@@ -3292,6 +3304,9 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="behosDateStart != null">
|
|
|
<![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
|
|
|
</if>
|
|
@@ -3347,6 +3362,9 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="behosDateStart != null">
|
|
|
<![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
|
|
|
</if>
|
|
@@ -3451,7 +3469,7 @@
|
|
|
t1.leaveHospitalDate,
|
|
|
t1.score,
|
|
|
t2.avgScore,
|
|
|
- t1.scoreBn,
|
|
|
+ e.score_res as scoreBn,
|
|
|
t1.msg,
|
|
|
t1.caseName
|
|
|
FROM
|
|
@@ -3464,7 +3482,6 @@
|
|
|
a.behospital_date AS behospitalDate,
|
|
|
a.leave_hospital_date AS leaveHospitalDate,
|
|
|
b.score_res AS score,
|
|
|
- e.score_res as scoreBn,
|
|
|
c.msg AS msg,
|
|
|
d.NAME AS caseName,
|
|
|
a.beh_dept_id AS behDeptId,
|
|
@@ -3489,6 +3506,9 @@
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_id = d.id
|
|
|
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>
|
|
@@ -3556,6 +3576,9 @@
|
|
|
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="isPlacefile != null and isPlacefile != ''">
|
|
|
and a.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
@@ -3670,6 +3693,7 @@
|
|
|
t1.leaveHospitalDate,
|
|
|
t1.score,
|
|
|
t2.avgScore,
|
|
|
+ e.score_res as scoreBn,
|
|
|
t1.msg,
|
|
|
t1.caseName
|
|
|
FROM
|
|
@@ -3718,6 +3742,9 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
+ <if test="diagnose != null and diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="behosDateStart != null">
|
|
|
<![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
|
|
|
</if>
|
|
@@ -3752,7 +3779,11 @@
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.name like CONCAT('%',#{name},'%')
|
|
|
</if>
|
|
|
- ) t1,
|
|
|
+ ) 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,
|
|
|
(
|
|
|
SELECT
|
|
|
ROUND( AVG( b.score_res ), 2 ) AS avgScore,
|
|
@@ -3776,6 +3807,9 @@
|
|
|
AND b.is_deleted = 'N'
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
+ <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>
|
|
@@ -3981,6 +4015,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -5280,6 +5317,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -6019,6 +6059,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -6247,6 +6290,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -6493,6 +6539,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -6758,6 +6807,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -7317,10 +7369,12 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultPageVO.diagnose != null and qcResultPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultPageVO.behDeptName != null and qcResultPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultPageVO.behDeptName}
|
|
|
</if>
|
|
|
-
|
|
|
<if test="qcResultPageVO.behospitalCode != null and qcResultPageVO.behospitalCode != ''">
|
|
|
AND a.behospital_code LIKE CONCAT( '%', #{qcResultPageVO.behospitalCode}, '%' )
|
|
|
</if>
|
|
@@ -7415,6 +7469,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultPageVO.diagnose != null and qcResultPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultPageVO.behDeptName != null and qcResultPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -7580,6 +7637,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -7816,6 +7876,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -8034,6 +8097,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -8274,6 +8340,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -8484,6 +8553,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -9279,6 +9351,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -10029,6 +10104,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|
|
@@ -10210,6 +10288,9 @@
|
|
|
<![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.diagnose != null and qcResultShortPageVO.diagnose != ''">
|
|
|
+ AND a.diagnose LIKE CONCAT( '%', #{qcResultShortPageVO.diagnose}, '%' )
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
|
</if>
|