|
@@ -66,7 +66,7 @@
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
ON t.behospital_code = g.behospital_code
|
|
ON t.behospital_code = g.behospital_code
|
|
AND t.hospital_id = g.hospital_id
|
|
AND t.hospital_id = g.hospital_id
|
|
- LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
|
|
|
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type in(1,2) ) h
|
|
ON t.behospital_code = h.behospital_code
|
|
ON t.behospital_code = h.behospital_code
|
|
AND t.hospital_id = h.hospital_id
|
|
AND t.hospital_id = h.hospital_id
|
|
where t.is_deleted = 'N'
|
|
where t.is_deleted = 'N'
|
|
@@ -1037,7 +1037,7 @@
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
ON t.behospital_code = g.behospital_code
|
|
ON t.behospital_code = g.behospital_code
|
|
AND t.hospital_id = g.hospital_id
|
|
AND t.hospital_id = g.hospital_id
|
|
- LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
|
|
|
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type in(1,2) ) h
|
|
ON t.behospital_code = h.behospital_code
|
|
ON t.behospital_code = h.behospital_code
|
|
AND t.hospital_id = h.hospital_id
|
|
AND t.hospital_id = h.hospital_id
|
|
where t.is_deleted = 'N'
|
|
where t.is_deleted = 'N'
|
|
@@ -1169,7 +1169,7 @@
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
ON t.behospital_code = g.behospital_code
|
|
ON t.behospital_code = g.behospital_code
|
|
AND t.hospital_id = g.hospital_id
|
|
AND t.hospital_id = g.hospital_id
|
|
- LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
|
|
|
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type in(1,2) ) h
|
|
ON t.behospital_code = h.behospital_code
|
|
ON t.behospital_code = h.behospital_code
|
|
AND t.hospital_id = h.hospital_id
|
|
AND t.hospital_id = h.hospital_id
|
|
WHERE t.is_deleted = 'N'
|
|
WHERE t.is_deleted = 'N'
|
|
@@ -1261,7 +1261,7 @@
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
|
|
ON t.behospital_code = g.behospital_code
|
|
ON t.behospital_code = g.behospital_code
|
|
AND t.hospital_id = g.hospital_id
|
|
AND t.hospital_id = g.hospital_id
|
|
- LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
|
|
|
|
|
|
+ LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type in(1,2) ) h
|
|
ON t.behospital_code = h.behospital_code
|
|
ON t.behospital_code = h.behospital_code
|
|
AND t.hospital_id = h.hospital_id
|
|
AND t.hospital_id = h.hospital_id
|
|
WHERE t.is_deleted = 'N'
|
|
WHERE t.is_deleted = 'N'
|