|
@@ -166,10 +166,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -200,10 +200,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -513,10 +513,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -533,7 +533,6 @@
|
|
|
AND a.hospital_id = b.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.is_placefile = '1'
|
|
|
- -- AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
|
|
|
AND (
|
|
|
( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' )
|
|
|
OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' )
|
|
@@ -543,10 +542,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -569,10 +568,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -598,10 +597,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -628,10 +627,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -657,7 +656,6 @@
|
|
|
AND a.hospital_id = c.hospital_id
|
|
|
AND a.behospital_code = b.behospital_code
|
|
|
AND a.beh_dept_id = c.dept_id
|
|
|
- -- AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
|
|
|
AND (
|
|
|
( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' )
|
|
|
OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' )
|
|
@@ -671,10 +669,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -710,10 +708,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -752,10 +750,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
@@ -796,10 +794,10 @@
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
|
</if>
|
|
|
<if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
|
|
@@ -831,10 +829,10 @@
|
|
|
AND a.hospital_id = #{filterPageVO.hospitalId}
|
|
|
</if>
|
|
|
<if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageVO.startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageVO.name != null and filterPageVO.name != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{filterPageVO.name},'%')
|
|
@@ -884,10 +882,10 @@
|
|
|
AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
|
|
|
</if>
|
|
|
<if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
|
|
|
AND d.msg like CONCAT('%', #{filterPageByDeptVO.name},'%')
|
|
@@ -930,10 +928,10 @@
|
|
|
AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
|
|
|
</if>
|
|
|
<if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{filterPageByDeptVO.startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{filterPageByDeptVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
|
|
|
AND d.msg like CONCAT('%', #{filterPageByDeptVO.name},'%')
|
|
@@ -998,10 +996,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1040,10 +1038,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1179,10 +1177,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1236,10 +1234,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1377,10 +1375,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1443,10 +1441,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1570,10 +1568,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1614,10 +1612,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1673,10 +1671,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and b.level = #{level}
|
|
@@ -1807,10 +1805,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1858,10 +1856,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -1981,10 +1979,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -2039,10 +2037,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and c.level = #{level}
|
|
@@ -2113,10 +2111,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
- <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null and endDate != ''">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="level != null and level != ''">
|
|
|
and b.level = #{level}
|
|
@@ -2846,11 +2844,11 @@
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{qcResultShortPageVO.startDate})]]>
|
|
|
+ <if test="qcResultShortPageVO.startDate != null ">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.endDate != null ">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{qcResultShortPageVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
@@ -3018,11 +3016,11 @@
|
|
|
<if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
- <if test="qcResultShortPageVO.startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{qcResultShortPageVO.startDate})]]>
|
|
|
+ <if test="qcResultShortPageVO.startDate != null ">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.endDate != null ">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{qcResultShortPageVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
@@ -3249,10 +3247,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
@@ -3304,10 +3302,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
@@ -3355,10 +3353,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
@@ -3406,10 +3404,10 @@
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
<if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="deptName != null and deptName != ''">
|
|
|
AND a.beh_dept_name = #{deptName}
|
|
@@ -3507,11 +3505,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -3563,11 +3561,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.file_code,
|
|
@@ -3585,11 +3583,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND tt2.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND tt2.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND tt2.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND tt2.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND tt2.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
ORDER BY
|
|
|
tt1.file_code,
|
|
@@ -3629,11 +3627,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
a.file_code,
|
|
@@ -3651,11 +3649,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND tt2.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND tt2.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND tt2.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND tt2.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND tt2.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
ORDER BY
|
|
|
tt1.file_code,
|
|
@@ -3700,11 +3698,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -3748,11 +3746,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
) h1,(
|
|
|
SELECT
|
|
@@ -3796,7 +3794,7 @@
|
|
|
t1.ward_name AS wardName,
|
|
|
ifnull(t1.status,0) AS checkStatus,
|
|
|
t2.age,
|
|
|
- t2.file_code AS fileCode
|
|
|
+ t1.file_code AS fileCode
|
|
|
FROM
|
|
|
(
|
|
|
SELECT be.*,mci.status
|
|
@@ -3808,7 +3806,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
b.*,
|
|
|
- c.LEVEL,
|
|
|
+ ifnull(c.LEVEL,'未评分') as LEVEL ,
|
|
|
c.grade_type,
|
|
|
c.score_res,
|
|
|
c.gmt_create
|
|
@@ -3833,7 +3831,8 @@
|
|
|
a.director_doctor_name,
|
|
|
a.diagnose,
|
|
|
a.placefile_date,
|
|
|
- a.ward_name
|
|
|
+ a.ward_name,
|
|
|
+ a.file_code
|
|
|
FROM
|
|
|
med_behospital_info a
|
|
|
WHERE
|
|
@@ -3844,10 +3843,10 @@
|
|
|
AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{qcResultShortPageVO.startDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{qcResultShortPageVO.startDate}]]>
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.endDate != null ">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{qcResultShortPageVO.endDate})]]>
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{qcResultShortPageVO.endDate}]]>
|
|
|
</if>
|
|
|
<if test="qcResultShortPageVO.behDeptName != null and qcResultShortPageVO.behDeptName != ''">
|
|
|
AND a.beh_dept_name = #{qcResultShortPageVO.behDeptName}
|
|
@@ -3872,9 +3871,6 @@
|
|
|
LEFT JOIN med_qcresult_info c ON c.is_deleted = 'N'
|
|
|
AND b.hospital_id = c.hospital_id
|
|
|
AND b.behospital_code = c.behospital_code
|
|
|
- <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
|
|
|
- AND c.`level` = #{qcResultShortPageVO.level}
|
|
|
- </if>
|
|
|
) tt1
|
|
|
<if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==3">
|
|
|
,med_medical_record tt2,
|
|
@@ -3931,6 +3927,9 @@
|
|
|
<if test="qcResultShortPageVO.checkStatus != null">
|
|
|
and t.checkStatus = #{qcResultShortPageVO.checkStatus}
|
|
|
</if>
|
|
|
+ <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
|
|
|
+ AND t.`level` = #{qcResultShortPageVO.level}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 病案首页改善率统计(首页)-->
|
|
@@ -3983,11 +3982,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND m1.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND m1.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND m1.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND m1.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND m1.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
GROUP BY
|
|
|
m1.behospital_code
|
|
@@ -4015,11 +4014,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
) t1,
|
|
|
(
|
|
@@ -4041,11 +4040,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
) t2
|
|
|
</select>
|
|
@@ -4091,11 +4090,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{name}, '%')
|
|
@@ -4127,11 +4126,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{name}, '%')
|
|
@@ -4159,15 +4158,14 @@
|
|
|
AND a.behospital_code = c.behospital_code
|
|
|
AND a.qc_type_id != 0
|
|
|
AND a.is_placefile = '1'
|
|
|
- AND c.have_home_page = '1'
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{name}, '%')
|
|
@@ -4210,14 +4208,16 @@
|
|
|
AND m1.behospital_code = m4.behospital_code
|
|
|
AND m3.have_home_page = 1
|
|
|
AND m4.cases_id = 243
|
|
|
+ AND m1.is_placefile = '1'
|
|
|
+ AND m1.qc_type_id != 0
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND m1.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND m1.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND m1.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND m1.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND m1.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND m1.beh_dept_name like CONCAT('%', #{name}, '%')
|
|
@@ -4246,11 +4246,11 @@
|
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
|
AND a.hospital_id = #{hospitalId}
|
|
|
</if>
|
|
|
- <if test="startDate != null">
|
|
|
- <![CDATA[ AND a.leave_hospital_date >= DATE(#{startDate})]]>
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
</if>
|
|
|
- <if test="endDate != null">
|
|
|
- <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
</if>
|
|
|
<if test="name != null and name != ''">
|
|
|
AND a.beh_dept_name like CONCAT('%', #{name}, '%')
|