|
@@ -2597,21 +2597,17 @@
|
|
med_behospital_info a,
|
|
med_behospital_info a,
|
|
med_qcresult_info b,
|
|
med_qcresult_info b,
|
|
med_qcresult_detail c,
|
|
med_qcresult_detail c,
|
|
- qc_cases d,
|
|
|
|
- sys_user_dept e
|
|
|
|
|
|
+ qc_cases d
|
|
WHERE
|
|
WHERE
|
|
a.is_deleted = 'N'
|
|
a.is_deleted = 'N'
|
|
AND b.is_deleted = 'N'
|
|
AND b.is_deleted = 'N'
|
|
AND c.is_deleted = 'N'
|
|
AND c.is_deleted = 'N'
|
|
AND d.is_deleted = 'N'
|
|
AND d.is_deleted = 'N'
|
|
- AND e.is_deleted = 'N'
|
|
|
|
AND a.hospital_id = b.hospital_id
|
|
AND a.hospital_id = b.hospital_id
|
|
AND a.hospital_id = c.hospital_id
|
|
AND a.hospital_id = c.hospital_id
|
|
- AND a.hospital_id = e.hospital_id
|
|
|
|
AND a.behospital_code = b.behospital_code
|
|
AND a.behospital_code = b.behospital_code
|
|
AND a.behospital_code = c.behospital_code
|
|
AND a.behospital_code = c.behospital_code
|
|
AND c.cases_id = d.id
|
|
AND c.cases_id = d.id
|
|
- AND a.beh_dept_id = e.dept_id
|
|
|
|
AND a.is_placefile = '1'
|
|
AND a.is_placefile = '1'
|
|
AND a.doctor_id in
|
|
AND a.doctor_id in
|
|
(SELECT doctor_id FROM `bas_doctor_info`
|
|
(SELECT doctor_id FROM `bas_doctor_info`
|
|
@@ -2627,9 +2623,6 @@
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
AND a.hospital_id = #{hospitalId}
|
|
AND a.hospital_id = #{hospitalId}
|
|
</if>
|
|
</if>
|
|
- <if test="userId != null ">
|
|
|
|
- AND e.user_id = #{userId}
|
|
|
|
- </if>
|
|
|
|
<if test="leaveHosDateStart != null ">
|
|
<if test="leaveHosDateStart != null ">
|
|
<![CDATA[ and a.leave_hospital_date >= DATE(#{leaveHosDateStart})]]>
|
|
<![CDATA[ and a.leave_hospital_date >= DATE(#{leaveHosDateStart})]]>
|
|
</if>
|
|
</if>
|
|
@@ -2666,8 +2659,7 @@
|
|
a.beh_dept_name AS behDeptName
|
|
a.beh_dept_name AS behDeptName
|
|
FROM
|
|
FROM
|
|
med_behospital_info a,
|
|
med_behospital_info a,
|
|
- med_qcresult_info b,
|
|
|
|
- sys_user_dept c
|
|
|
|
|
|
+ med_qcresult_info b
|
|
WHERE
|
|
WHERE
|
|
a.is_deleted = 'N'
|
|
a.is_deleted = 'N'
|
|
AND a.doctor_id in
|
|
AND a.doctor_id in
|
|
@@ -2681,19 +2673,13 @@
|
|
and c1.id = #{userId}
|
|
and c1.id = #{userId}
|
|
))
|
|
))
|
|
AND b.is_deleted = 'N'
|
|
AND b.is_deleted = 'N'
|
|
- AND c.is_deleted = 'N'
|
|
|
|
AND a.hospital_id = b.hospital_id
|
|
AND a.hospital_id = b.hospital_id
|
|
- AND a.hospital_id = c.hospital_id
|
|
|
|
AND a.behospital_code = b.behospital_code
|
|
AND a.behospital_code = b.behospital_code
|
|
- AND a.beh_dept_id = c.dept_id
|
|
|
|
AND a.is_placefile = '1'
|
|
AND a.is_placefile = '1'
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
<![CDATA[AND a.qc_type_id <>0 ]]>
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
<if test="hospitalId != null and hospitalId != ''">
|
|
AND a.hospital_id = #{hospitalId}
|
|
AND a.hospital_id = #{hospitalId}
|
|
</if>
|
|
</if>
|
|
- <if test="userId != null ">
|
|
|
|
- AND c.user_id = #{userId}
|
|
|
|
- </if>
|
|
|
|
<if test="leaveHosDateStart != null ">
|
|
<if test="leaveHosDateStart != null ">
|
|
<![CDATA[ and a.leave_hospital_date >= DATE(#{leaveHosDateStart})]]>
|
|
<![CDATA[ and a.leave_hospital_date >= DATE(#{leaveHosDateStart})]]>
|
|
</if>
|
|
</if>
|