|
@@ -108,8 +108,7 @@
|
|
|
<if test="isPlacefile != null and isPlacefile != ''">
|
|
|
and t.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
- and t.qc_type_id != 0
|
|
|
- and t.is_placefile = 1) p
|
|
|
+ and t.qc_type_id != 0) p
|
|
|
where p.is_deleted="N"
|
|
|
<if test="checkStatus != null ">
|
|
|
and p.check_status = #{checkStatus}
|
|
@@ -192,7 +191,9 @@
|
|
|
AND a.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -226,7 +227,9 @@
|
|
|
AND a.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -244,7 +247,9 @@
|
|
|
select * from med_behospital_info a
|
|
|
where a.is_deleted = 'N'
|
|
|
and a.qc_type_id != 0
|
|
|
- and a.is_placefile = 1
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="filterFlag != null and filterFlag == 0">
|
|
|
and
|
|
|
not EXISTS (
|
|
@@ -278,7 +283,9 @@
|
|
|
select * from med_behospital_info b
|
|
|
where b.is_deleted = 'N'
|
|
|
and b.qc_type_id != 0
|
|
|
- and b.is_placefile = 1
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and b.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="startLeaveDate != null">
|
|
|
<![CDATA[ and b.leave_hospital_date >= #{startLeaveDate}]]>
|
|
|
</if>
|
|
@@ -379,8 +386,7 @@
|
|
|
<if test="isPlacefile != null and isPlacefile != ''">
|
|
|
and t.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
- and t.qc_type_id != 0
|
|
|
- and t.is_placefile = 1) p
|
|
|
+ and t.qc_type_id != 0) p
|
|
|
where p.is_deleted="N"
|
|
|
<if test="checkStatus != null ">
|
|
|
and p.check_status = #{checkStatus}
|
|
@@ -491,8 +497,7 @@
|
|
|
<if test="isPlacefile != null and isPlacefile != ''">
|
|
|
and t.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
- and t.qc_type_id != 0
|
|
|
- and t.is_placefile = 1) p
|
|
|
+ and t.qc_type_id != 0) p
|
|
|
where p.is_deleted="N"
|
|
|
<if test="checkStatus != null ">
|
|
|
and p.check_status = #{checkStatus}
|
|
@@ -602,8 +607,7 @@
|
|
|
<if test="isPlacefile != null and isPlacefile != ''">
|
|
|
and t.is_placefile = #{isPlacefile}
|
|
|
</if>
|
|
|
- and t.qc_type_id != 0
|
|
|
- and t.is_placefile = 1) p
|
|
|
+ and t.qc_type_id != 0) p
|
|
|
where p.is_deleted="N"
|
|
|
<if test="checkStatus != null ">
|
|
|
and p.check_status = #{checkStatus}
|
|
@@ -639,7 +643,9 @@
|
|
|
med_behospital_info a
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
@@ -663,7 +669,9 @@
|
|
|
AND b.is_deleted = 'N'
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND (
|
|
|
( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' AND b.newborn_day != '-' )
|
|
|
OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' AND b.newborn_month != '-' )
|
|
@@ -693,7 +701,9 @@
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND b.return_to_type = '死亡'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -721,7 +731,9 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.mode_id = d.id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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 != ''">
|
|
@@ -750,7 +762,9 @@
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.beh_dept_id = c.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="userId!=null">
|
|
|
AND c.user_id = #{userId}
|
|
|
</if>
|
|
@@ -791,7 +805,9 @@
|
|
|
( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' AND b.newborn_day != '-' )
|
|
|
OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' AND b.newborn_month != '-' )
|
|
|
)
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND c.user_id = #{userId}
|
|
@@ -830,7 +846,9 @@
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.beh_dept_id = c.dept_id
|
|
|
AND b.return_to_type = '死亡'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND c.user_id = #{userId}
|
|
@@ -872,7 +890,9 @@
|
|
|
AND a.beh_dept_id = c.dept_id
|
|
|
AND d.mode_id = e.id
|
|
|
AND e.`name` = '手术记录'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="userId!=null">
|
|
|
AND c.user_id = #{userId}
|
|
@@ -919,7 +939,9 @@
|
|
|
AND a.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{filterPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -954,7 +976,9 @@
|
|
|
AND a.is_deleted = 'N'
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND d.is_deleted = 'N'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{filterPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
@@ -1004,7 +1028,9 @@
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND a.beh_dept_id = e.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND e.user_id = #{filterPageByDeptVO.userId}
|
|
@@ -1050,7 +1076,9 @@
|
|
|
AND d.is_deleted = 'N'
|
|
|
AND e.is_deleted = 'N'
|
|
|
AND a.beh_dept_id = e.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="filterPageByDeptVO.userId!=null">
|
|
|
AND e.user_id = #{filterPageByDeptVO.userId}
|
|
@@ -1121,7 +1149,9 @@
|
|
|
AND c.is_deleted = 'N'
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1163,7 +1193,9 @@
|
|
|
AND a.behospital_code = d.behospital_code
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1302,7 +1334,9 @@
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = d.dept_id
|
|
|
AND d.parent_dept_id = e.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1359,7 +1393,9 @@
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
AND f.parent_dept_id = g.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1499,8 +1535,9 @@
|
|
|
AND a.hospital_id = d.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = d.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1565,8 +1602,9 @@
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1693,7 +1731,9 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_id = 243
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1737,7 +1777,9 @@
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND d.cases_id = 243
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1795,7 +1837,9 @@
|
|
|
AND b.cases_id = c.cases_id
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND d.cases_id = 243
|
|
|
AND a.qc_type_id != 0
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
@@ -1930,7 +1974,9 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = e.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -1981,7 +2027,9 @@
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2104,7 +2152,9 @@
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.beh_dept_id = f.dept_id
|
|
|
AND c.cases_id = 243
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2162,7 +2212,9 @@
|
|
|
AND d.cases_id = e.cases_id
|
|
|
AND d.cases_entry_id = e.id
|
|
|
AND c.cases_id = 243
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2235,7 +2287,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.beh_dept_id = e.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND d.cases_id = 243
|
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
@@ -2449,7 +2503,9 @@
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_id = d.id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2496,7 +2552,9 @@
|
|
|
AND b.is_deleted = 'N'
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2637,7 +2695,9 @@
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_id = d.id
|
|
|
AND a.beh_dept_id = e.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2691,7 +2751,9 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.beh_dept_id = c.dept_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -2831,7 +2893,9 @@
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_id = d.id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND a.doctor_id in
|
|
|
(SELECT doctor_id FROM `bas_doctor_info`
|
|
|
where is_deleted = 'N' and hospital_id = #{hospitalId} and group_id in (
|
|
@@ -2898,7 +2962,9 @@
|
|
|
AND b.is_deleted = 'N'
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -3071,7 +3137,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -3127,6 +3195,12 @@
|
|
|
DATE( a.behospital_date ),
|
|
|
DATE( a.leave_hospital_date ))> 30
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.beHosGT31Days != null and qcResultShortPageVO.beHosGT31Days==1">
|
|
|
+ AND TIMESTAMPDIFF(
|
|
|
+ DAY,
|
|
|
+ DATE( a.behospital_date ),
|
|
|
+ DATE( a.leave_hospital_date ))> 31
|
|
|
+ </if>
|
|
|
)be
|
|
|
left join med_check_info mci
|
|
|
on mci.is_deleted = 'N'
|
|
@@ -3273,7 +3347,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.userId != null and qcResultShortPageVO.userId != ''">
|
|
|
AND e.user_id = #{qcResultShortPageVO.userId}
|
|
|
</if>
|
|
@@ -3457,7 +3533,8 @@
|
|
|
stageSummaryMRNum,
|
|
|
stageSummaryNum,
|
|
|
ROUND( IFNULL( stageSummaryNum / stageSummaryMRNum, 0 ), 4 ) AS stageSummaryPercent,
|
|
|
- CONCAT( ROUND( IFNULL( stageSummaryNum / stageSummaryMRNum, 0 ) * 100, 2 ), '%' ) AS stageSummaryPercentStr
|
|
|
+ CONCAT( ROUND( IFNULL( stageSummaryNum / stageSummaryMRNum, 0 ) * 100, 2 ), '%' ) AS stageSummaryPercentStr,
|
|
|
+ beHosGT31DaysMRNum
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
@@ -3472,7 +3549,8 @@
|
|
|
sum( tt.crisisNum ) AS crisisNum,
|
|
|
sum( tt.crisisMRNum ) AS crisisMRNum,
|
|
|
sum( tt.stageSummaryNum ) AS stageSummaryNum,
|
|
|
- sum( tt.stageSummaryMRNum ) AS stageSummaryMRNum
|
|
|
+ sum( tt.stageSummaryMRNum ) AS stageSummaryMRNum,
|
|
|
+ sum( tt.beHosGT31DaysMRNum ) AS beHosGT31DaysMRNum
|
|
|
FROM
|
|
|
(
|
|
|
(
|
|
@@ -3488,7 +3566,8 @@
|
|
|
0 AS crisisNum,
|
|
|
0 AS crisisMRNum,
|
|
|
0 AS stageSummaryNum,
|
|
|
- 0 AS stageSummaryMRNum
|
|
|
+ 0 AS stageSummaryMRNum,
|
|
|
+ 0 AS beHosGT31DaysMRNum
|
|
|
FROM
|
|
|
(
|
|
|
SELECT DISTINCT
|
|
@@ -3505,7 +3584,9 @@
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND b.mode_id = 30
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -3540,7 +3621,8 @@
|
|
|
0 AS crisisNum,
|
|
|
0 AS crisisMRNum,
|
|
|
0 AS stageSummaryNum,
|
|
|
- 0 AS stageSummaryMRNum
|
|
|
+ 0 AS stageSummaryMRNum,
|
|
|
+ 0 AS beHosGT31DaysMRNum
|
|
|
FROM
|
|
|
(
|
|
|
SELECT DISTINCT
|
|
@@ -3560,7 +3642,9 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND b.home_page_id = c.home_page_id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -3595,7 +3679,8 @@
|
|
|
sum( d.cases_entry_id = 2419 ) AS crisisNum,
|
|
|
count( DISTINCT c.behospital_code ) AS crisisMRNum,
|
|
|
0 AS stageSummaryNum,
|
|
|
- 0 AS stageSummaryMRNum
|
|
|
+ 0 AS stageSummaryMRNum,
|
|
|
+ 0 AS beHosGT31DaysMRNum
|
|
|
FROM
|
|
|
(
|
|
|
SELECT DISTINCT
|
|
@@ -3611,7 +3696,9 @@
|
|
|
AND b.is_deleted = 'N'
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -3646,7 +3733,8 @@
|
|
|
0 AS crisisNum,
|
|
|
0 AS crisisMRNum,
|
|
|
sum( c.cases_entry_id = 2495 ) AS stageSummaryNum,
|
|
|
- count( DISTINCT b.behospital_code ) AS stageSummaryMRNum
|
|
|
+ count( DISTINCT b.behospital_code ) AS stageSummaryMRNum,
|
|
|
+ 0 AS beHosGT31DaysMRNum
|
|
|
FROM
|
|
|
(
|
|
|
SELECT DISTINCT
|
|
@@ -3662,7 +3750,9 @@
|
|
|
DAY,
|
|
|
DATE( behospital_date ),
|
|
|
DATE( leave_hospital_date ))> 30
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -3683,6 +3773,57 @@
|
|
|
GROUP BY
|
|
|
b.beh_dept_id,
|
|
|
b.beh_dept_name
|
|
|
+ ) UNION
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ b.beh_dept_id AS deptId,
|
|
|
+ b.beh_dept_name AS deptName,
|
|
|
+ 0 AS consultationNum,
|
|
|
+ 0 AS consultationMRNum,
|
|
|
+ 0 AS operationNameNum,
|
|
|
+ 0 AS operationTimeNum,
|
|
|
+ 0 AS operation15MinuteNum,
|
|
|
+ 0 AS operationMRNum,
|
|
|
+ 0 AS crisisNum,
|
|
|
+ 0 AS crisisMRNum,
|
|
|
+ 0 AS stageSummaryNum,
|
|
|
+ 0 AS stageSummaryMRNum,
|
|
|
+ count(*) AS beHosGT31DaysMRNum
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT DISTINCT
|
|
|
+ a.hospital_id,
|
|
|
+ a.behospital_code,
|
|
|
+ a.beh_dept_name,
|
|
|
+ a.beh_dept_id
|
|
|
+ FROM
|
|
|
+ med_behospital_info a
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND TIMESTAMPDIFF(
|
|
|
+ DAY,
|
|
|
+ DATE( behospital_date ),
|
|
|
+ DATE( leave_hospital_date ))> 31
|
|
|
+ <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="startDate != null">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="deptName != null and deptName != ''">
|
|
|
+ AND a.beh_dept_name = #{deptName}
|
|
|
+ </if>
|
|
|
+ ) b
|
|
|
+ GROUP BY
|
|
|
+ b.beh_dept_id,
|
|
|
+ b.beh_dept_name
|
|
|
)
|
|
|
) tt
|
|
|
GROUP BY
|
|
@@ -3716,6 +3857,7 @@
|
|
|
<when test='asc=="stageSummaryPercent"'>stageSummaryPercent asc</when>
|
|
|
<when test='asc=="stageSummaryPercentStr"'>stageSummaryPercent asc</when>
|
|
|
<when test='asc=="stageSummaryMRNum"'>stageSummaryMRNum asc</when>
|
|
|
+ <when test='asc=="beHosGT31DaysMRNum"'>beHosGT31DaysMRNum asc</when>
|
|
|
<otherwise>deptName asc</otherwise>
|
|
|
</choose>
|
|
|
</if>
|
|
@@ -3746,6 +3888,7 @@
|
|
|
<when test='desc=="stageSummaryPercent"'>stageSummaryPercent desc</when>
|
|
|
<when test='desc=="stageSummaryPercentStr"'>stageSummaryPercent desc</when>
|
|
|
<when test='desc=="stageSummaryMRNum"'>stageSummaryMRNum desc</when>
|
|
|
+ <when test='desc=="beHosGT31DaysMRNum"'>beHosGT31DaysMRNum desc</when>
|
|
|
<otherwise>deptName desc</otherwise>
|
|
|
</choose>
|
|
|
</if>
|
|
@@ -3764,7 +3907,9 @@
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND b.leave_hospital_type = '非医嘱离院'
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -3819,7 +3964,9 @@
|
|
|
med_behospital_info a
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND a.qc_type_id != 0
|
|
|
AND IFNULL( a.diagnose, '' )!= ''
|
|
|
AND IFNULL( a.file_code, '' )!= ''
|
|
@@ -3841,7 +3988,9 @@
|
|
|
med_behospital_info tt2
|
|
|
WHERE
|
|
|
tt2.is_deleted = 'N'
|
|
|
- AND tt2.is_placefile = 1
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and tt2.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND tt2.qc_type_id != 0
|
|
|
AND tt1.file_code = tt2.file_code
|
|
|
AND tt1.diagnose = tt2.diagnose
|
|
@@ -3886,7 +4035,9 @@
|
|
|
med_behospital_info a
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND a.qc_type_id != 0
|
|
|
AND IFNULL( a.diagnose, '' )!= ''
|
|
|
AND IFNULL( a.file_code, '' )!= ''
|
|
@@ -3908,7 +4059,9 @@
|
|
|
med_behospital_info tt2
|
|
|
WHERE
|
|
|
tt2.is_deleted = 'N'
|
|
|
- AND tt2.is_placefile = 1
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and tt2.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND tt2.qc_type_id != 0
|
|
|
AND tt1.file_code = tt2.file_code
|
|
|
AND tt1.diagnose = tt2.diagnose
|
|
@@ -3959,7 +4112,9 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_id = 243
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -4006,7 +4161,9 @@
|
|
|
AND b.cases_id = c.cases_id
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND d.cases_id = 243
|
|
|
AND a.qc_type_id != 0
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
@@ -4115,7 +4272,9 @@
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -4281,7 +4440,9 @@
|
|
|
AND m3.gmt_create = m4.gmt_create
|
|
|
AND m3.have_home_page = 1
|
|
|
AND m4.cases_id = 243
|
|
|
- AND m1.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and m1.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND m1.qc_type_id != 0
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND m1.hospital_id = #{hospitalId}
|
|
@@ -4313,7 +4474,9 @@
|
|
|
AND a.behospital_code = e.behospital_code
|
|
|
AND d.cases_id = 243
|
|
|
AND d.score_res > e.score_res
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <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}
|
|
@@ -4340,7 +4503,9 @@
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
@@ -4390,7 +4555,9 @@
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
@@ -4425,7 +4592,9 @@
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND ifnull(c.`status`,0) = 1
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
@@ -4461,7 +4630,9 @@
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
@@ -4513,7 +4684,9 @@
|
|
|
AND m3.gmt_create = m4.gmt_create
|
|
|
AND m3.have_home_page = 1
|
|
|
AND m4.cases_id = 243
|
|
|
- AND m1.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and m1.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
AND m1.qc_type_id != 0
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND m1.hospital_id = #{hospitalId}
|
|
@@ -4738,7 +4911,9 @@
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -4949,7 +5124,9 @@
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -5209,7 +5386,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -5265,6 +5444,12 @@
|
|
|
DATE( a.behospital_date ),
|
|
|
DATE( a.leave_hospital_date ))> 30
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.beHosGT31Days != null and qcResultShortPageVO.beHosGT31Days==1">
|
|
|
+ AND TIMESTAMPDIFF(
|
|
|
+ DAY,
|
|
|
+ DATE( a.behospital_date ),
|
|
|
+ DATE( a.leave_hospital_date ))> 31
|
|
|
+ </if>
|
|
|
)be
|
|
|
left join med_check_info mci
|
|
|
on mci.is_deleted = 'N'
|
|
@@ -5436,7 +5621,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -5492,6 +5679,12 @@
|
|
|
DATE( a.behospital_date ),
|
|
|
DATE( a.leave_hospital_date ))> 30
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.beHosGT31Days != null and qcResultShortPageVO.beHosGT31Days==1">
|
|
|
+ AND TIMESTAMPDIFF(
|
|
|
+ DAY,
|
|
|
+ DATE( a.behospital_date ),
|
|
|
+ DATE( a.leave_hospital_date ))> 31
|
|
|
+ </if>
|
|
|
)be
|
|
|
left join med_check_info mci
|
|
|
on mci.is_deleted = 'N'
|
|
@@ -5596,7 +5789,9 @@
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = '1'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
@@ -5711,7 +5906,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -5924,7 +6121,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -6108,7 +6307,9 @@
|
|
|
AND c.cases_id = d.cases_id
|
|
|
AND c.cases_entry_id = d.id
|
|
|
AND a.qc_type_id != 0
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
@@ -6302,7 +6503,9 @@
|
|
|
med_behospital_info a
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="reBeHosPageVO.isPlacefile != null and reBeHosPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{reBeHosPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
AND a.qc_type_id != 0
|
|
|
AND IFNULL( a.diagnose, '' )!= ''
|
|
|
AND IFNULL( a.file_code, '' )!= ''
|
|
@@ -6330,7 +6533,9 @@
|
|
|
med_behospital_info tt2
|
|
|
WHERE
|
|
|
tt2.is_deleted = 'N'
|
|
|
- AND tt2.is_placefile = 1
|
|
|
+ <if test="reBeHosPageVO.isPlacefile != null and reBeHosPageVO.isPlacefile != ''">
|
|
|
+ and tt2.is_placefile = #{reBeHosPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
AND tt2.qc_type_id != 0
|
|
|
AND tt1.file_code = tt2.file_code
|
|
|
AND tt1.diagnose = tt2.diagnose
|
|
@@ -6391,7 +6596,9 @@
|
|
|
med_behospital_info a
|
|
|
WHERE
|
|
|
a.is_deleted = 'N'
|
|
|
- AND a.is_placefile = 1
|
|
|
+ <if test="reBeHosPageVO.isPlacefile != null and reBeHosPageVO.isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{reBeHosPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
AND a.qc_type_id != 0
|
|
|
AND IFNULL( a.diagnose, '' )!= ''
|
|
|
AND IFNULL( a.file_code, '' )!= ''
|
|
@@ -6419,7 +6626,9 @@
|
|
|
med_behospital_info tt2
|
|
|
WHERE
|
|
|
tt2.is_deleted = 'N'
|
|
|
- AND tt2.is_placefile = 1
|
|
|
+ <if test="reBeHosPageVO.isPlacefile != null and reBeHosPageVO.isPlacefile != ''">
|
|
|
+ and tt2.is_placefile = #{reBeHosPageVO.isPlacefile}
|
|
|
+ </if>
|
|
|
AND tt2.qc_type_id != 0
|
|
|
AND tt1.file_code = tt2.file_code
|
|
|
AND tt1.diagnose = tt2.diagnose
|