|
@@ -26,7 +26,8 @@ public interface ChargeListDao {
|
|
|
"rtrim(admiss_dept) as dept,admiss_date as admdate,med_type as medtype, " +
|
|
|
"admiss_date as begndate,isnull(dis_date,getdate()) as enddate, " +
|
|
|
"balance=(select ((select isnull(sum(t.depo_amount),0) from zy_deposit_file t where t.inpatient_no=a.inpatient_no " +
|
|
|
- "and t.admiss_times=a.admiss_times and t.status in (1,2))- " +
|
|
|
+ "and t.admiss_times=a.admiss_times and t.status in (1,2)) + " +
|
|
|
+ "(select sum(e.fund_pay_sumamt) from zy_ledger_file e where e.inpatient_no=#{patNo} and e.admiss_times=#{times}) - " +
|
|
|
"(select isnull(sum(t.charge_fee),0) from zy_detail_charge t where t.inpatient_no=a.inpatient_no " +
|
|
|
"and t.admiss_times=a.admiss_times))),a.total_charge as totalCost " +
|
|
|
"from ${table} a where a.inpatient_no=#{patNo} and a.admiss_times=#{times}")
|