|
@@ -54,26 +54,15 @@
|
|
|
t1.behospital_code as behospitalCode
|
|
|
FROM
|
|
|
med_lis_info t1,
|
|
|
- med_lis_result t2,
|
|
|
- med_behospital_info t3
|
|
|
+ med_lis_result t2
|
|
|
WHERE
|
|
|
- t1.is_deleted = "N"
|
|
|
+ t1.is_deleted = "N"
|
|
|
AND t2.is_deleted = "N"
|
|
|
- AND t3.is_deleted = "N"
|
|
|
AND t1.check_date IS NOT NULL
|
|
|
AND t2.item_name IS NOT NULL
|
|
|
AND t1.hospital_id = t2.hospital_id
|
|
|
- and t1.hospital_id = t3.hospital_id
|
|
|
AND t1.behospital_code = t2.behospital_code
|
|
|
AND t1.rep_no = t2.rep_no
|
|
|
- <choose>
|
|
|
- <when test="examineInfoVO.hospitalId != null and examineInfoVO.hospitalId == 2l">
|
|
|
- and t1.behospital_code = t3.file_code
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- and t1.behospital_code = t3.behospital_code
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
<if test="examineInfoVO.hospitalId != null">
|
|
|
and t1.hospital_id = #{examineInfoVO.hospitalId}
|
|
|
</if>
|
|
@@ -144,27 +133,16 @@
|
|
|
t1.behospital_code as behospitalCode
|
|
|
FROM
|
|
|
med_lis_info t1
|
|
|
- right join
|
|
|
- med_behospital_info t3
|
|
|
- on t1.hospital_id = t3.hospital_id
|
|
|
- and t1.is_deleted = "N"
|
|
|
- AND t3.is_deleted = "N"
|
|
|
- AND t1.check_date IS NOT NULL
|
|
|
left join
|
|
|
med_lis_result t2
|
|
|
on t1.hospital_id = t2.hospital_id
|
|
|
+ AND t1.is_deleted = "N"
|
|
|
AND t2.is_deleted = "N"
|
|
|
+ AND t1.check_date IS NOT NULL
|
|
|
AND t2.item_name IS NOT NULL
|
|
|
AND t1.behospital_code = t2.behospital_code
|
|
|
AND t1.rep_no = t2.rep_no
|
|
|
- <choose>
|
|
|
- <when test="examineInfoVO.hospitalId != null and examineInfoVO.hospitalId == 2l">
|
|
|
- and t1.behospital_code = t3.file_code
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- and t1.behospital_code = t3.behospital_code
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
+ where 1=1
|
|
|
<if test="examineInfoVO.hospitalId != null">
|
|
|
and t1.hospital_id = #{examineInfoVO.hospitalId}
|
|
|
</if>
|
|
@@ -255,7 +233,7 @@
|
|
|
med_lis_info t1,
|
|
|
med_lis_result t2
|
|
|
where
|
|
|
- t1.is_deleted = "N"
|
|
|
+ t1.is_deleted = "N"
|
|
|
AND t2.is_deleted = "N"
|
|
|
AND t1.check_date IS NOT NULL
|
|
|
AND t1.hospital_id = t2.hospital_id
|