|
@@ -1820,6 +1820,28 @@
|
|
|
<if test="leaveHosDateEnd != null ">
|
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
|
</if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ AND b.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
) t1,
|
|
|
(
|
|
|
SELECT
|
|
@@ -1845,6 +1867,28 @@
|
|
|
<if test="leaveHosDateEnd != null ">
|
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
|
</if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ AND b.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
|
a.beh_dept_name
|
|
@@ -1923,6 +1967,28 @@
|
|
|
<if test="leaveHosDateEnd != null ">
|
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
|
</if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ AND b.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
) t1,
|
|
|
(
|
|
|
SELECT
|
|
@@ -1955,6 +2021,28 @@
|
|
|
<if test="leaveHosDateEnd != null ">
|
|
|
<![CDATA[AND a.leave_hospital_date < DATE(#{leaveHosDateEnd})]]>
|
|
|
</if>
|
|
|
+ <if test="behospitalCode != null and behospitalCode != ''">
|
|
|
+ AND a.behospital_code like CONCAT('%',#{behospitalCode},'%')
|
|
|
+ </if>
|
|
|
+ <if test="level != null and level != ''">
|
|
|
+ AND b.level = #{level}
|
|
|
+ </if>
|
|
|
+ <if test="doctorName != null and doctorName != ''">
|
|
|
+ AND (a.doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.beh_doctor_name like CONCAT('%',#{doctorName},'%')
|
|
|
+ OR a.director_doctor_name like CONCAT('%',#{doctorName},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="doctorCode != null and doctorCode != ''">
|
|
|
+ AND (a.doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.beh_doctor_id like CONCAT('%',#{doctorCode},'%')
|
|
|
+ OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="deptId != null and deptId != ''">
|
|
|
+ AND a.beh_dept_id = #{deptId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND a.name like CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
a.beh_dept_id,
|
|
|
a.beh_dept_name
|