|
@@ -99,7 +99,7 @@ public interface PublicDao {
|
|
|
@Select("select rtrim(inpatient_no) inpatient_no,admiss_times,admiss_date,dis_date,name, " +
|
|
|
"responce_name = (select rtrim(name) name from zy_zd_responce_type where code = responce_type), " +
|
|
|
"ward,ward_name = (select rtrim(name) name from zd_unit_code where code = ward), " +
|
|
|
- "ledger_sn = (select ledger_sn from zy_ledger_file where a.inpatient_no = zy_ledger_file.inpatient_no and a.admiss_times = zy_ledger_file.admiss_times), " +
|
|
|
+ "ledger_sn = (select max(ledger_sn) from zy_ledger_file where a.inpatient_no = zy_ledger_file.inpatient_no and a.admiss_times = zy_ledger_file.admiss_times), " +
|
|
|
"chu_yuan_yi_zhu = (case when (select count(1) from yz_act_order where inpatient_no= a.inpatient_no and admiss_times= a.admiss_times " +
|
|
|
"and status_flag > '2' and isnull(group_no,'00' )='00' and order_code in ('06026','06053','05973')) > 0 " +
|
|
|
"then 1 " +
|