String evTable = "select * from erp_visit erv " +
        "where erv.DISCHARGE_DATE_TIME is null and erv.patient_id=?1 and rownum=1 " +
        "order by erv.ACCEPT_DATE_TIME desc";
String sql = "select pmi.patient_id,ev.visit_no,pmi.name,pmi.sex,pmi.date_of_birth,pmi.next_of_kin,pmi.next_of_kin_phone," +
        "ev.dise_level_code,ev.discipline_code,ev.green_channel,ev.arrival_date_time," +
        "ov.identity,ov.charge_type,ov.visit_dept_code," +
        "pa.outp_prepayments " +
        "from pat_master_index pmi,outp_visit ov,(" + evTable + ") ev,prepayment_account pa " +
        "where ev.patient_id=pmi.patient_id " +
        "and ev.visit_no=ov.visit_no " +
        "and pmi.patient_id=pa.patient_id";

 

相关文章:

  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-11-05
  • 2021-10-17
  • 2022-12-23
  • 2021-09-17
相关资源
相似解决方案