|
@@ -5,6 +5,10 @@ import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import org.apache.ibatis.annotations.Update;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.manage.InstSetlLdgChkBrf;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.manage.detailanalyse.FsiDiagnoseDtos;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.manage.detailanalyse.FsiEncounterDtos;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.manage.detailanalyse.FsiOrderDtos;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.manage.detailanalyse.PatientDtos;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.manage.frontsheet.Baseinfo;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.manage.frontsheet.Diseinfo;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.manage.orderinfo.ActOrder;
|
|
@@ -145,4 +149,58 @@ public interface SiManageDao {
|
|
|
"from yz_act_order a, zy_actpatient b where a.inpatient_no=#{patNo} and a.admiss_times=#{times} " +
|
|
|
"and a.inpatient_no=b.inpatient_no and a.admiss_times=b.admiss_times")
|
|
|
List<ActOrder> selectActOrders(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+
|
|
|
+ @Select("select psn_no as patnId, psn_name as patnName, gend, brdy, insuplc_admdvs as poolarea, mdtrt_id as currMdtrtId " +
|
|
|
+ "from t_si_pat_info where pat_no=#{patNo} and times=#{times}")
|
|
|
+ PatientDtos selectPatientDto(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+
|
|
|
+ @Select("select mdtrt_id,medinsAdmdvs='430105',medinsLv='03',begntime as adm_date,endtime as dscg_date,\n" +
|
|
|
+ " dscgMainDiseCodg=(select rtrim(dis_diag) from zy_dis_diag_yb where inpatient_no=a.pat_no and\n" +
|
|
|
+ " admiss_times=a.times and dis_diag_no=1),\n" +
|
|
|
+ " dscgMainDiseName=(select rtrim(dis_diag_comment) from zy_dis_diag_yb where inpatient_no=a.pat_no and\n" +
|
|
|
+ " admiss_times=a.times and dis_diag_no=1),\n" +
|
|
|
+ " drCodg=(select rtrim(op_id_code) from zy_dis_diag_yb where inpatient_no=a.pat_no and\n" +
|
|
|
+ " admiss_times=a.times and dis_diag_no=1),\n" +
|
|
|
+ " admDeptCodg=(select rtrim(small_dept) from zy_inactpatient where inpatient_no=a.pat_no and admiss_times=a.times),\n" +
|
|
|
+ " medMdtrtType=case when setl_type='11' then 1 else 2 end,med_type,medfee_sumamt,fulamt_ownpay_amt,\n" +
|
|
|
+ " psn_cash_pay,insutype\n" +
|
|
|
+ "from t_si_setlinfo a where a.pat_no=#{patNo} and a.times=#{times} and a.revoked=0")
|
|
|
+ FsiEncounterDtos selectFsiEncounterDto(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+
|
|
|
+ @Select("select dise_id=rtrim(inpatient_no)+'_'+cast(admiss_times as varchar)+'_'+cast(dis_diag_no as varchar),\n" +
|
|
|
+ " inout_dise_type='2',maindise_flag=case when dis_diag_no=1 then 1 else 0 end,\n" +
|
|
|
+ " dis_diag_no as dias_srt_no,rtrim(dis_diag) as dise_codg,rtrim(dis_diag_comment) as dise_name,\n" +
|
|
|
+ " op_diag_date as dise_date\n" +
|
|
|
+ "from zy_dis_diag_yb where inpatient_no=#{patNo} and admiss_times=#{times}")
|
|
|
+ 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" +
|
|
|
+ " 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" +
|
|
|
+ " 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" +
|
|
|
+ " 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")
|
|
|
+ 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")
|
|
|
+ String selectSetlId(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
}
|