|
@@ -441,154 +441,56 @@ public interface DrgDipDao {
|
|
|
String getSetId(String patNo, String times, String ledgerSn);
|
|
|
|
|
|
@Select("select visit_id = (select pat_no + '_' + cast(times as varchar) + '_' + cast(ledger_sn as varchar) " +
|
|
|
- " from t_si_setlinfo b " +
|
|
|
- " where a.setl_id = b.setl_id) from t_settlement_setlinfo a " +
|
|
|
+ "from t_si_setlinfo b where a.setl_id = b.setl_id) from t_settlement_setlinfo a " +
|
|
|
"where dcla_time >= #{startTime} and dcla_time <= #{endTime} ")
|
|
|
List<VisitId> getSettlementDocumentVisitID(String startTime, String endTime);
|
|
|
|
|
|
- @Select("select a.mdtrt_id as visit_id, " +
|
|
|
- " a.psn_no, " +
|
|
|
- " a.setl_id, " +
|
|
|
- " open_date= (select convert(varchar(19), " +
|
|
|
- " sign_date, " +
|
|
|
- " 21) " +
|
|
|
- " from t_case_frontsheet_main c " +
|
|
|
- " where a.medcasno = c.bah + '_' + cast(c.admiss_times as varchar)), " +
|
|
|
- " fixmedinsName=N'长沙泰和医院', " +
|
|
|
- " fixmedinsCode='H43010500370', " +
|
|
|
- " hi_setl_lv, " +
|
|
|
- " hi_no, " +
|
|
|
- " medcasno, " +
|
|
|
- " dclaTime=convert(varchar(19), " +
|
|
|
- " dcla_time, " +
|
|
|
- " 21), " +
|
|
|
- " a.psn_name, " +
|
|
|
- " a.gend, " +
|
|
|
- " brdy=convert(varchar(19), " +
|
|
|
- " a.brdy, " +
|
|
|
- " 21), " +
|
|
|
- " a.age, " +
|
|
|
- " ntly, " +
|
|
|
- " nwb_age, " +
|
|
|
- " a.naty, " +
|
|
|
- " patn_cert_type, " +
|
|
|
- " a.certno, " +
|
|
|
- " prfs, " +
|
|
|
- " curr_addr, " +
|
|
|
- " emp_name, " +
|
|
|
- " emp_addr, " +
|
|
|
- " emp_tel, " +
|
|
|
- " poscode, " +
|
|
|
- " coner_name, " +
|
|
|
- " patn_rlts, " +
|
|
|
- " coner_addr, " +
|
|
|
- " coner_tel, " +
|
|
|
- " hi_type, " +
|
|
|
- " insuplc, " +
|
|
|
- " sp_psn_type, " +
|
|
|
- " nwb_adm_type, " +
|
|
|
- " nwb_bir_wt, " +
|
|
|
- " nwb_adm_wt, " +
|
|
|
- " (select top 1 name " +
|
|
|
- " from zd_unit_code " +
|
|
|
- " where si_caty = opsp_diag_caty) as opsp_diag_caty_name, " +
|
|
|
- " opsp_diag_caty as opsp_diag_caty_name, " +
|
|
|
- " trt_type, " +
|
|
|
- " opspMdtrtDate=convert(varchar(19), " +
|
|
|
- " opsp_mdtrt_date, " +
|
|
|
- " 21), " +
|
|
|
- " a.ipt_med_type, " +
|
|
|
- " adm_way, " +
|
|
|
- " admTime=convert(varchar(19), " +
|
|
|
- " adm_time, " +
|
|
|
- " 21), " +
|
|
|
- " adm_caty, " +
|
|
|
- " refldept_dept, " +
|
|
|
- " resp_nurs_code, " +
|
|
|
- " dscgTime=convert(varchar(19), " +
|
|
|
- " dscg_time, " +
|
|
|
- " 21), " +
|
|
|
- " dscg_caty, " +
|
|
|
- " act_ipt_days, " +
|
|
|
- " otp_wm_dise, " +
|
|
|
- " wm_dise_code, " +
|
|
|
- " otp_tcm_dise, " +
|
|
|
- " tcm_dise_code, " +
|
|
|
- " vent_used_dura, " +
|
|
|
- " pwcry_afadm_coma_dura, " +
|
|
|
- " pwcry_bfadm_coma_dura, " +
|
|
|
- " spga_nurscare_days, " +
|
|
|
- " lv1_nurscare_days, " +
|
|
|
- " scd_nurscare_days, " +
|
|
|
- " lv3_nurscare_days, " +
|
|
|
- " dscg_way, " +
|
|
|
- " acp_medins_name, " +
|
|
|
- " acp_optins_code, " +
|
|
|
- " bill_code, " +
|
|
|
- " bill_no, " +
|
|
|
- " biz_sn, " +
|
|
|
- " days_rinp_flag31 as days_rinp_flag_31, " +
|
|
|
- " days_rinp_pup31 as days_rinp_pup_31, " +
|
|
|
- " chfpdr_name, " +
|
|
|
- " chfpdr_code, " +
|
|
|
- " (SELECT name " +
|
|
|
- " FROM a_employee_mi " +
|
|
|
- " WHERE yb_code = resp_nurs_code) resp_nurs, " +
|
|
|
- " setlBegnDate=convert(varchar(19), " +
|
|
|
- " setl_begn_date, " +
|
|
|
- " 21), " +
|
|
|
- " setlEndDate=convert(varchar(19), " +
|
|
|
- " setl_end_date, 21), " +
|
|
|
- " (select sum(charge_fee) " +
|
|
|
- " from zy_detail_charge " +
|
|
|
- " where inpatient_no = b.pat_no " +
|
|
|
- " and admiss_times = b.times " +
|
|
|
- " and b.ledger_sn = ledger_sn) as total_fee, " +
|
|
|
- " a.hi_paymtd, " +
|
|
|
- " medins_fill_dept, " +
|
|
|
- " medins_fill_psn, " +
|
|
|
- " oper_date=convert(varchar(19), " +
|
|
|
- " dcla_time, " +
|
|
|
- " 21), " +
|
|
|
- " adm_caty as adm_dept_code, " +
|
|
|
- " adm_dept_name = (select top 1 name " +
|
|
|
- " from zd_unit_code " +
|
|
|
- " where si_caty = adm_caty), " +
|
|
|
- " '0' as traf_dept_flat, " +
|
|
|
- " dscg_caty as dscg_dept_code, " +
|
|
|
- " dscg_dept_name = (select top 1 name " +
|
|
|
- " from zd_unit_code " +
|
|
|
- " where si_caty = dscg_caty), " +
|
|
|
- " b.insutype, " +
|
|
|
- " psn_selfpay, " +
|
|
|
- " psn_ownpay, " +
|
|
|
- " a.acct_pay, " +
|
|
|
- " psn_cashpay " +
|
|
|
- "from t_settlement_setlinfo a, " +
|
|
|
- " t_si_setlinfo b " +
|
|
|
- "WHERE a.setl_id = #{visitId} " +
|
|
|
- " and a.setl_id = b.setl_id;")
|
|
|
- List<YibaoSetlinfo4101a> basicPatientInfoOfStatement(String visitId);
|
|
|
-
|
|
|
-
|
|
|
-// @Select("select setl_id from t_settlement_setlinfo where mdtrt_id = #{id}")
|
|
|
-// String getSetlIdByMdtrtId(String id);
|
|
|
-
|
|
|
+ @Select("select '${visitId}' as visit_id,a.psn_no,a.setl_id, " +
|
|
|
+ "open_date=(select convert(varchar(19), sign_date, 21) from t_case_frontsheet_main c " +
|
|
|
+ "where a.medcasno = c.bah + '_' + cast(c.admiss_times as varchar)), " +
|
|
|
+ "fixmedinsName=N'长沙泰和医院',fixmedinsCode='H43010500370', " +
|
|
|
+ "hi_setl_lv,hi_no,medcasno,dclaTime=convert(varchar(19),dcla_time,21), " +
|
|
|
+ "a.psn_name,a.gend,brdy=convert(varchar(19),a.brdy,21),a.age,ntly,nwb_age,a.naty, " +
|
|
|
+ "patn_cert_type,a.certno,prfs,curr_addr,emp_name,emp_addr,emp_tel,poscode,coner_name,patn_rlts, " +
|
|
|
+ "coner_addr,coner_tel,hi_type,insuplc,sp_psn_type,nwb_adm_type,nwb_bir_wt,nwb_adm_wt, " +
|
|
|
+ "(select top 1 name from zd_unit_code where si_caty=opsp_diag_caty) as opsp_diag_caty_name, " +
|
|
|
+ "opsp_diag_caty as opsp_diag_caty_name, " +
|
|
|
+ "trt_type,opspMdtrtDate=convert(varchar(19),opsp_mdtrt_date,21), " +
|
|
|
+ "a.ipt_med_type,adm_way,admTime=convert(varchar(19),adm_time,21), " +
|
|
|
+ "adm_caty,refldept_dept,resp_nurs_code, " +
|
|
|
+ "dscgTime=convert(varchar(19),dscg_time,21), " +
|
|
|
+ "dscg_caty,act_ipt_days,otp_wm_dise,wm_dise_code,otp_tcm_dise,tcm_dise_code, " +
|
|
|
+ "vent_used_dura,pwcry_afadm_coma_dura,pwcry_bfadm_coma_dura,spga_nurscare_days, " +
|
|
|
+ "lv1_nurscare_days,scd_nurscare_days,lv3_nurscare_days,dscg_way, " +
|
|
|
+ "acp_medins_name,acp_optins_code,bill_code,bill_no,biz_sn, " +
|
|
|
+ "days_rinp_flag31 as days_rinp_flag_31,days_rinp_pup31 as days_rinp_pup_31, " +
|
|
|
+ "chfpdr_name,chfpdr_code, " +
|
|
|
+ "(SELECT name FROM a_employee_mi WHERE yb_code=resp_nurs_code) as resp_nurs, " +
|
|
|
+ "setlBegnDate=convert(varchar(19),setl_begn_date,21), " +
|
|
|
+ "setlEndDate=convert(varchar(19),setl_end_date, 21), " +
|
|
|
+ "(select sum(charge_fee) from zy_detail_charge where inpatient_no=b.pat_no " +
|
|
|
+ "and admiss_times=b.times and b.ledger_sn=ledger_sn) as total_fee, " +
|
|
|
+ "a.hi_paymtd,medins_fill_dept,medins_fill_psn, " +
|
|
|
+ "oper_date=convert(varchar(19),dcla_time,21), " +
|
|
|
+ "adm_caty as adm_dept_code, " +
|
|
|
+ "adm_dept_name=(select top 1 name from zd_unit_code where si_caty=adm_caty), " +
|
|
|
+ "traf_dept_flat='0',dscg_caty as dscg_dept_code, " +
|
|
|
+ "dscg_dept_name=(select top 1 name from zd_unit_code where si_caty=dscg_caty), " +
|
|
|
+ "b.insutype,psn_selfpay,psn_ownpay,a.acct_pay,psn_cashpay from t_settlement_setlinfo a, " +
|
|
|
+ "t_si_setlinfo b WHERE a.setl_id = #{setlId} and a.setl_id = b.setl_id")
|
|
|
+ List<YibaoSetlinfo4101a> basicPatientInfoOfStatement(String setlId, String visitId);
|
|
|
|
|
|
@Select("select diag_name,diag_code,oprn_oprt_name,oprn_oprt_code, " +
|
|
|
"case subscript when 1 then 1 else 0 end as maindiag_flag, " +
|
|
|
"'${visitId}' as visit_id from t_settlement_opspdiseinfo " +
|
|
|
"where setl_id = #{setlId} and diag_code is not null")
|
|
|
- List<YibaoOpspdiseinfo4101a> getOpspdiseinfoBySetlId(String setlId,
|
|
|
- String visitId);
|
|
|
+ List<YibaoOpspdiseinfo4101a> getOpspdiseinfoBySetlId(String setlId, String visitId);
|
|
|
|
|
|
|
|
|
@Select("select diag_type,diag_code,diag_name,adm_cond_type,maindiag_flag, " +
|
|
|
"subscript as sort_no,'${visitId}' as visit_id " +
|
|
|
"from t_settlement_diseinfo where setl_id = #{setlId} ")
|
|
|
- List<YibaoDiseinfo4101a> getDiseinfoBySetlId(String setlId,
|
|
|
- String visitId);
|
|
|
-
|
|
|
+ List<YibaoDiseinfo4101a> getDiseinfoBySetlId(String setlId, String visitId);
|
|
|
|
|
|
@Select("select oprn_oprt_type,oprn_oprt_name,oprn_oprt_code,anst_way, " +
|
|
|
"oper_dr_code,oper_dr_name,anst_dr_code,anst_dr_name," +
|
|
@@ -600,20 +502,15 @@ public interface DrgDipDao {
|
|
|
"subscript as sort_no," +
|
|
|
"oprt_date=convert(varchar(19), oprn_oprt_begntime, 21) " +
|
|
|
"from t_settlement_oprninfo where setl_id = #{setlId} ")
|
|
|
- List<YibaoOprninfo4101a> getOprninfoBySetlId(String setlId,
|
|
|
- String visitId);
|
|
|
-
|
|
|
+ List<YibaoOprninfo4101a> getOprninfoBySetlId(String setlId, String visitId);
|
|
|
|
|
|
@Select("select scs_cutd_ward_type,scs_cutd_inpool_time,scs_cutd_exit_time, " +
|
|
|
"'${visitId}' as visit_id,scs_cutd_sum_dura as total_hour, " +
|
|
|
"subscript as sort_no from t_settlement_icuinfo where setl_id = #{setlId}")
|
|
|
- List<YibaoIcuinfo4101a> getIcoInfoBySetlId(String setlId,
|
|
|
- String visitId);
|
|
|
-
|
|
|
+ List<YibaoIcuinfo4101a> getIcoInfoBySetlId(String setlId, String visitId);
|
|
|
|
|
|
@Select("select bld_cat,bld_amt,bld_unt,'${visitId}' as visit_id, " +
|
|
|
"subscript as sort_no from t_settlement_bldinfo where setl_id = #{setlId} ")
|
|
|
- List<YibaoBldinfo4101a> getBldinfoBySetlId(String setlId,
|
|
|
- String visitId);
|
|
|
+ List<YibaoBldinfo4101a> getBldinfoBySetlId(String setlId, String visitId);
|
|
|
|
|
|
}
|