|
|
@@ -180,30 +180,31 @@ public interface SiManageDao {
|
|
|
List<FsiDiagnoseDtos> selectFsiDiagnoseDtos(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
|
|
|
@Select("select\n" +
|
|
|
- " rxId=cast(cast(act_order_no as decimal) as varchar)+'_'+charge_code_mx,\n" +
|
|
|
- " rxno=cast(cast(act_order_no as decimal) as varchar),\n" +
|
|
|
- " longDrordFlag=case when frequ_code='ONCE' then 0 else 1 end,\n" +
|
|
|
- " listType=(select list_type from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " chrgType=(select med_chrgitm_type from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " drordBhvr=case when frequ_code='ONCE' then 1 else 2 end,\n" +
|
|
|
- " hilist_code=(select hilist_code from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " hilist_name=(select hilist_name from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " hilist_lv=(select chrgitm_lv from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " pric=(select pric from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
+ " rxId=cast(cast(order_no as decimal) as varchar)+'_'+charge_code_mx,\n" +
|
|
|
+ " rxno=cast(cast(order_no as decimal) as varchar),\n" +
|
|
|
+ " longDrordFlag=case when (select frequ_code from yz_inact_order where act_order_no=order_no)='ONCE' then 0 else 1 end,\n" +
|
|
|
+ " b.list_type,\n" +
|
|
|
+ " chrgType=b.med_chrgitm_type,\n" +
|
|
|
+ " drordBhvr=case when (select frequ_code from yz_inact_order where act_order_no=order_no)='ONCE' then 1 else 2 end,\n" +
|
|
|
+ " b.hilist_code,\n" +
|
|
|
+ " b.hilist_name,\n" +
|
|
|
+ " hilist_lv=b.chrgitm_lv,\n" +
|
|
|
+ " b.pric,\n" +
|
|
|
" a.charge_code_mx as hosplist_code,a.charge_amount as cnt,\n" +
|
|
|
- " hosplistName=(select medins_list_name from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
+ " hosplistName=b.medins_list_name,\n" +
|
|
|
" a.charge_fee as sumamt,\n" +
|
|
|
- " ownpayAmt=(select fulamt_ownpay_amt from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " selfpayAmt=(select preselfpay_amt from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " b.start_time as drord_begn_date,b.end_time as drord_stop_date,\n" +
|
|
|
- " drord_dept_codg=(select bilg_dept_codg from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " drord_dept_name=(select bilg_dept_name from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " drord_dr_codg=(select bilg_dr_codg from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " drord_dr_name=(select bilg_dr_name from t_si_setl_fee_detl where setl_id=#{setlId} and feedetl_sn=a.detail_sn),\n" +
|
|
|
- " drord_dr_profttl=(select rtrim(emp_tit_code) from a_employee_mi where code=b.enter_oper),\n" +
|
|
|
+ " ownpayAmt=b.fulamt_ownpay_amt,\n" +
|
|
|
+ " selfpayAmt=b.preselfpay_amt,\n" +
|
|
|
+ " drord_begn_date=(select start_time from yz_inact_order where act_order_no=order_no),\n" +
|
|
|
+ " drord_stop_date=(select end_time from yz_inact_order where act_order_no=order_no),\n" +
|
|
|
+ " drord_dept_codg=b.bilg_dept_codg,\n" +
|
|
|
+ " drord_dept_name=b.bilg_dept_name,\n" +
|
|
|
+ " drord_dr_codg=b.bilg_dr_codg,\n" +
|
|
|
+ " drord_dr_name=b.bilg_dr_name,\n" +
|
|
|
+ " drord_dr_profttl=(select rtrim(emp_tit_code) from a_employee_mi where code=b.bilg_dr_codg),\n" +
|
|
|
" curr_drord_flag='1'\n" +
|
|
|
- "from zy_detail_charge a, yz_inact_order b where order_no>100 and a.inpatient_no=#{patNo} and a.admiss_times=#{times}\n" +
|
|
|
- "and a.ledger_sn>0 and a.inpatient_no=b.inpatient_no and a.admiss_times=b.admiss_times")
|
|
|
+ "from zy_detail_charge a, t_si_setl_fee_detl b where a.order_no>100 and a.inpatient_no=#{patNo} and a.admiss_times=#{times}\n" +
|
|
|
+ "and a.ledger_sn>0 and b.setl_id=#{setlId} and b.feedetl_sn=a.detail_sn")
|
|
|
List<FsiOrderDtos> selectFsiOrderDtos(@Param("patNo") String patNo, @Param("times") int times, @Param("setlId") String setlId);
|
|
|
|
|
|
@Select("select setl_id from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")
|