|
@@ -56,8 +56,9 @@ public interface UpIdCollectionDao {
|
|
|
" (select rytj from batj_ba1 where zyh = #{patNo} and zycs = #{times}) as admWay, " + // 入院途径
|
|
|
" a.setl_time as setl_end_date, " + //结算时间
|
|
|
" a.ipt_med_type, a.hi_paymtd, " +
|
|
|
- " cast(fund_pay_sumamt as decimal(16,2)) as fund_pay_sumamt," +
|
|
|
- " cast(maf_pay as decimal(16,2)) as maf_pay " +
|
|
|
+ " cast(fund_pay_sumamt as decimal(16,2)) as fund_pay_sumamt," + //
|
|
|
+ " cast(maf_pay as decimal(16,2)) as maf_pay," +
|
|
|
+ " psn_idet_type as sp_psn_type " +
|
|
|
"from t_si_setlinfo a," +
|
|
|
" t_si_pat_info b " + "where a.pat_no=b.pat_no and a.times=b.times " +
|
|
|
"and a.ledger_sn = b.ledger_sn " + "and a.pat_no = #{patNo} and a.times = #{times} " + "and a.ledger_sn = #{ledgerSn} " + "and a.revoked = 0 ")
|
|
@@ -142,7 +143,7 @@ public interface UpIdCollectionDao {
|
|
|
" else datediff(day,\n" +
|
|
|
" begntime,\n" +
|
|
|
" endtime)\n" +
|
|
|
- " end as act_ipt_days\n" +
|
|
|
+ " end as act_ipt_days\n " +
|
|
|
"from t_si_setlinfo,\n" +
|
|
|
" zy_inactpatient\n" +
|
|
|
"where pat_no = #{patNo}\n" +
|
|
@@ -293,8 +294,8 @@ public interface UpIdCollectionDao {
|
|
|
"group by med_chrgitm_type")
|
|
|
List<IteminfoUpld> totalCost(@Param("setlId") String setlId);
|
|
|
|
|
|
- @Select("select med_chrgitm_type as med_chrgitm," +
|
|
|
- " sum(det_item_fee_sumamt * (1 - selfpay_prop)) as ${feeName} " +
|
|
|
+ @Select("select med_chrgitm_type as med_chrgitm,\n" +
|
|
|
+ " sum(det_item_fee_sumamt) as ${feeName} " +
|
|
|
"from t_si_setl_fee_detl " +
|
|
|
"where setl_id = #{setlId} " +
|
|
|
" and chrgitm_lv = #{chrgitmLv} " +
|
|
@@ -560,7 +561,8 @@ public interface UpIdCollectionDao {
|
|
|
" a.adress as conerAddr," +
|
|
|
" '1' as hiPaymtd, " +
|
|
|
" cast(fund_pay_sumamt as decimal(16,2)) as fund_pay_sumamt," +
|
|
|
- " cast(maf_pay as decimal(16,2)) as maf_pay " +
|
|
|
+ " cast(maf_pay as decimal(16,2)) as maf_pay, " +
|
|
|
+ "psn_idet_type as sp_psn_type " +
|
|
|
"from mz_patient_mi a " +
|
|
|
" left join " +
|
|
|
" a_patient_mi b on (a.patient_id = b.mz_no) " +
|