diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml index e47dbf203..4a284cbfc 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/regdoctorstation/RequestFormManageAppMapper.xml @@ -13,16 +13,7 @@ drf.requester_id, drf.create_time, ap.NAME AS patient_name, - CASE MIN(wsr.status_enum) - WHEN 1 THEN 0 - WHEN 2 THEN 1 - WHEN 3 THEN 4 - WHEN 4 THEN 4 - WHEN 5 THEN 5 - WHEN 6 THEN 5 - WHEN 7 THEN 5 - ELSE NULL - END AS status + drf.status FROM doc_request_form AS drf LEFT JOIN adm_encounter AS ae ON ae.ID = drf.encounter_id AND ae.delete_flag = '0' @@ -40,16 +31,7 @@ AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second') - AND CASE MIN(wsr.status_enum) - WHEN 1 THEN 0 - WHEN 2 THEN 1 - WHEN 3 THEN 4 - WHEN 4 THEN 4 - WHEN 5 THEN 5 - WHEN 6 THEN 5 - WHEN 7 THEN 5 - ELSE NULL - END = #{status}::integer + AND drf.status = #{status}::integer AND (drf.prescription_no ILIKE '%' || #{keyword} || '%'