|
@@ -21558,4 +21558,86 @@
|
|
|
k1.behospital_code
|
|
|
</select>
|
|
|
|
|
|
+ <!--输血患者人数-->
|
|
|
+ <select id="bloodCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
|
|
|
+ SELECT
|
|
|
+ distinct
|
|
|
+ count(*)
|
|
|
+ FROM
|
|
|
+ med_behospital_info a,
|
|
|
+ med_home_page b
|
|
|
+ Where
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND a.hospital_id = b.hospital_id
|
|
|
+ AND a.behospital_code = b.behospital_code
|
|
|
+ And
|
|
|
+ ( b.blood_fee != 0
|
|
|
+ or b.blood_fee != 0.00
|
|
|
+ or b.blood_fee != null
|
|
|
+ )
|
|
|
+ <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="isPlacefile != null and isPlacefile == 0">
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.behospital_date <= #{endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="isPlacefile != null and isPlacefile == 1">
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--癌痛患者人数-->
|
|
|
+ <select id="cancerCount" resultType="int" parameterType="com.diagbot.vo.FilterVO">
|
|
|
+ SELECT
|
|
|
+ count(*)
|
|
|
+ FROM
|
|
|
+ med_behospital_info a,
|
|
|
+ med_doctor_advice b
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND a.hospital_id = b.hospital_id
|
|
|
+ AND a.behospital_code = b.behospital_code
|
|
|
+ AND b.da_item_name like '癌痛%'
|
|
|
+ AND b.da_status != '作废'
|
|
|
+ <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="isPlacefile != null and isPlacefile == 0">
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.behospital_date >= #{startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.behospital_date <= #{endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="isPlacefile != null and isPlacefile == 1">
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != ''">
|
|
|
+ <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|