|
|
@@ -305,22 +305,9 @@ public interface SiQueryDao {
|
|
|
" psn_cash_pay, " +
|
|
|
" setl_time, " +
|
|
|
" a.med_type, " +
|
|
|
- " fundPaySumamt= " +
|
|
|
- " (SELECT sum(b.fund_payamt) " +
|
|
|
- " FROM t_si_setldetail b " +
|
|
|
- " WHERE b.pat_no = a.pat_no " +
|
|
|
- " AND b.times = a.times " +
|
|
|
- " AND b.ledger_sn = a.ledger_sn), a.insutype, hospPay= " +
|
|
|
- " (SELECT sum(b.fund_payamt) " +
|
|
|
- " FROM t_si_setldetail b " +
|
|
|
- " WHERE b.pat_no = a.pat_no " +
|
|
|
- " AND b.times = a.times " +
|
|
|
- " AND b.ledger_sn = a.ledger_sn " +
|
|
|
- " AND (b.fund_pay_type = '999996' " +
|
|
|
- " OR b.setl_proc_info = '999996')), maf_pay/*医疗救助*/, admiss_date = begntime, dis_date = endtime, idCard = " +
|
|
|
- " (SELECT top 1 social_no " +
|
|
|
- " FROM a_patient_mi " +
|
|
|
- " WHERE pat_no = inpatient_no), dis_diag_comment = dis.dis_diag_comment, dis_diag = dis.dis_diag," +
|
|
|
+ " fundPaySumamt=(a.fund_pay_sumamt-a.hosp_part_amt), a.insutype, " +
|
|
|
+ " maf_pay, admiss_date = begntime, dis_date = endtime, " +
|
|
|
+ "idCard = a.certno, dis_diag_comment = dis.dis_diag_comment, dis_diag = dis.dis_diag," +
|
|
|
" totalMedicalExpenses = medfee_sumamt," +
|
|
|
" fulamt_ownpay_amt," +
|
|
|
" overlmt_selfpay," +
|
|
|
@@ -349,15 +336,9 @@ public interface SiQueryDao {
|
|
|
@Param("setlType") String setlType);
|
|
|
|
|
|
@Select("select pat_no,times,ledger_sn,insuplc_admdvs,medfee_sumamt,insutype,hifmi_pay,hifp_pay,cvlserv_pay,setl_list_id,psn_name, " +
|
|
|
- "psn_cash_pay,setl_time,a.med_type, " +
|
|
|
- "fundPaySumamt=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn),a.insutype, " +
|
|
|
- "hospPay=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn and (b.fund_pay_type='999996' or b.setl_proc_info='999996'))," +
|
|
|
- " maf_pay, " +
|
|
|
- " admiss_date = begntime, " +
|
|
|
- " dis_date = endtime, " +
|
|
|
- " idCard = (select top 1 social_no from a_patient_mi where pat_no = inpatient_no), " +
|
|
|
+ "psn_cash_pay,setl_time,a.med_type,maf_pay,endtime as dis_date,begntime as admiss_date, " +
|
|
|
+ "fundPaySumamt=(fund_pay_sumamt-hosp_part_amt),a.insutype, " +
|
|
|
+ " idCard = a.certno, " +
|
|
|
" dis_diag_comment = dis.dis_diag_comment, " +
|
|
|
" dis_diag = dis.dis_diag, " +
|
|
|
" totalMedicalExpenses = medfee_sumamt," +
|
|
|
@@ -382,10 +363,7 @@ public interface SiQueryDao {
|
|
|
|
|
|
@Select("select pat_no,times,ledger_sn,insuplc_admdvs,medfee_sumamt,insutype,hifmi_pay,hifp_pay,cvlserv_pay,setl_list_id,psn_name, " +
|
|
|
"psn_cash_pay,setl_time,a.med_type, " +
|
|
|
- "fundPaySumamt=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn),a.insutype, " +
|
|
|
- "hospPay=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn and (b.fund_pay_type='999996' or b.setl_proc_info='999996')), " +
|
|
|
+ "fundPaySumamt=(fund_pay_sumamt-hosp_part_amt),a.insutype, " +
|
|
|
" maf_pay, " +
|
|
|
" admiss_date = begntime, " +
|
|
|
" dis_date = endtime, " +
|
|
|
@@ -414,10 +392,7 @@ public interface SiQueryDao {
|
|
|
|
|
|
@Select("select pat_no,times,ledger_sn,insuplc_admdvs,medfee_sumamt,insutype,hifmi_pay,hifp_pay,cvlserv_pay,setl_list_id,psn_name, " +
|
|
|
"psn_cash_pay,setl_time,a.med_type, " +
|
|
|
- "fundPaySumamt=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn),a.insutype, " +
|
|
|
- "hospPay=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn and (b.fund_pay_type='999996' or b.setl_proc_info='999996')), " +
|
|
|
+ "fundPaySumamt=(fund_pay_sumamt-hosp_part_amt),a.insutype, " +
|
|
|
" maf_pay, " +
|
|
|
" admiss_date = begntime, " +
|
|
|
" dis_date = endtime, " +
|
|
|
@@ -446,10 +421,7 @@ public interface SiQueryDao {
|
|
|
|
|
|
@Select("select pat_no,times,ledger_sn,insuplc_admdvs,medfee_sumamt,insutype,hifmi_pay,hifp_pay,cvlserv_pay,setl_list_id,psn_name, " +
|
|
|
"psn_cash_pay,setl_time,a.med_type, " +
|
|
|
- "fundPaySumamt=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn),a.insutype, " +
|
|
|
- "hospPay=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn and (b.fund_pay_type='999996' or b.setl_proc_info='999996')), " +
|
|
|
+ "fundPaySumamt=(fund_pay_sumamt-hosp_part_amt),a.insutype, " +
|
|
|
" maf_pay, " +
|
|
|
" admiss_date = begntime, " +
|
|
|
" dis_date = endtime, " +
|
|
|
@@ -478,10 +450,7 @@ public interface SiQueryDao {
|
|
|
|
|
|
@Select("select pat_no,times,ledger_sn,insuplc_admdvs,medfee_sumamt,insutype,hifmi_pay,hifp_pay,cvlserv_pay,setl_list_id,psn_name, " +
|
|
|
"psn_cash_pay,setl_time,a.med_type, " +
|
|
|
- "fundPaySumamt=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn),a.insutype, " +
|
|
|
- "hospPay=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn and (b.fund_pay_type='999996' or b.setl_proc_info='999996')), " +
|
|
|
+ "fundPaySumamt=(fund_pay_sumamt-hosp_part_amt),a.insutype, " +
|
|
|
" maf_pay, " +
|
|
|
" admiss_date = begntime, " +
|
|
|
" dis_date = endtime, " +
|
|
|
@@ -510,10 +479,7 @@ public interface SiQueryDao {
|
|
|
|
|
|
@Select("select pat_no,times,ledger_sn,insuplc_admdvs,medfee_sumamt,insutype,hifmi_pay,hifp_pay,cvlserv_pay,setl_list_id,psn_name, " +
|
|
|
"psn_cash_pay,setl_time,a.med_type, " +
|
|
|
- "fundPaySumamt=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn),a.insutype, " +
|
|
|
- "hospPay=(select sum(b.fund_payamt) from t_si_setldetail b where b.pat_no=a.pat_no " +
|
|
|
- "and b.times=a.times and b.ledger_sn=a.ledger_sn and (b.fund_pay_type='999996' or b.setl_proc_info='999996')), " +
|
|
|
+ "fundPaySumamt=(fund_pay_sumamt-hosp_part_amt),a.insutype, " +
|
|
|
" maf_pay, " +
|
|
|
" admiss_date = begntime, " +
|
|
|
" dis_date = endtime, " +
|