"select distinct (d.PRESCRIPTION_SN) as PARENT_ORDER_SN, " + "t.REGISTER_SN, t.pid, t.ORDER_TYPE from outpord.outp_drug_order d," + "outpord.outp_medical_order t" + " where t.out_order_status = '050' and t.order_type in ('XY','CY','ZCY') " + " and (t.order_sn=d.order_sn or t.order_sn=d.parent_order_sn ) " + " and t.modify_time > to_char(sysdate - 1, 'yyyymmddhh24miss') ";