|
@@ -813,6 +813,45 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 入院人数统计-首页 -->
|
|
|
+ <select id="beHosCount" parameterType="com.diagbot.vo.FilterVO"
|
|
|
+ resultType="com.diagbot.dto.NumDTO">
|
|
|
+ SELECT
|
|
|
+ a.beh_dept_id AS id,
|
|
|
+ a.beh_dept_name AS NAME,
|
|
|
+ COUNT(*) AS num
|
|
|
+ FROM
|
|
|
+ med_behospital_info a
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ <if test="isPlacefile != null and isPlacefile != ''">
|
|
|
+ and a.is_placefile = #{isPlacefile}
|
|
|
+ </if>
|
|
|
+ <if test="hospitalId != null and hospitalId != ''">
|
|
|
+ AND a.hospital_id = #{hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="isPlacefile != null and isPlacefile == 0">
|
|
|
+ AND ifnull(a.leave_hospital_date ,'') = ''
|
|
|
+ <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>
|
|
|
+ GROUP BY
|
|
|
+ a.beh_dept_id,
|
|
|
+ a.beh_dept_name
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 出院总人数统计-科室-首页 -->
|
|
|
<select id="leaveHosCountByDept" parameterType="com.diagbot.vo.FilterVO"
|
|
|
resultType="com.diagbot.dto.NumDTO">
|