|
@@ -40,7 +40,7 @@
|
|
AND t2.case_entry_id = t3.cases_entry_id
|
|
AND t2.case_entry_id = t3.cases_entry_id
|
|
AND t1.hospital_id = t3.hospital_id
|
|
AND t1.hospital_id = t3.hospital_id
|
|
AND t3.cases_entry_id = t4.id
|
|
AND t3.cases_entry_id = t4.id
|
|
- AND t3.is_used = 1
|
|
|
|
|
|
+ AND ((t1.is_placefile='0' and t3.is_used_run=1) or (t1.is_placefile='1' and t3.is_used=1))
|
|
AND t1.is_deleted = 'N'
|
|
AND t1.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t2.is_deleted = 'N'
|
|
AND t3.is_deleted = 'N'
|
|
AND t3.is_deleted = 'N'
|