|
@@ -300,6 +300,124 @@ public interface DrgDipDao {
|
|
|
"where b.mdtrt_id=#{visitId} and b.pat_no=a.bah and b.times=a.times")
|
|
|
List<HisPatientOprtInfo> selectHisPatientOprtInfo(String visitId);
|
|
|
|
|
|
+ @Select("select b.mdtrt_id from t_case_frontsheet_main a,t_si_setlinfo b " +
|
|
|
+ "where a.sign_date>=#{start} and a.sign_date<=#{end} and " +
|
|
|
+ "a.bah=b.pat_no and a.admiss_times=b.times")
|
|
|
+ List<String> selectSignedVistiId(String start, String end);
|
|
|
+
|
|
|
+ @Select("select " +
|
|
|
+ "username='长沙泰和医院', " +
|
|
|
+ "ylfkfs=case when pay_method is null then '99' when pay_method in ('9','','-') then '99' " +
|
|
|
+ "else '0' + pay_method end, " +
|
|
|
+ "health_card_no as jkkh, " +
|
|
|
+ "admiss_times as zycs, " +
|
|
|
+ "bah,name as xm,sex as xb, " +
|
|
|
+ "csrq=convert(varchar(10),birth_date,112), " +
|
|
|
+ "age as nl, " +
|
|
|
+ "gj=(select d.si_code from zd_country_code d where d.code=country), " +
|
|
|
+ "age_days as bzyzsnl, " +
|
|
|
+ "new_born_weight as xsecstz, " +
|
|
|
+ "new_born_admiss_weight as xserytz, " +
|
|
|
+ "birth_place_name as csd, " +
|
|
|
+ "native_place_name as gg, " +
|
|
|
+ "mz=(select d.code2 from zd_nation_code d where d.code=nation), " +
|
|
|
+ "upper(social_no) as sfzh, " +
|
|
|
+ "occupation as zy, " +
|
|
|
+ "hy=(select d.si_code from zd_marital_status d where d.code=marriage), " +
|
|
|
+ "live_place_combo as xzz, " +
|
|
|
+ "phone as dh,addr_zip_code as yb1, " +
|
|
|
+ "hk_place_name as hkdz,hk_zip_code as yb2, " +
|
|
|
+ "unit_name+'/'+unit_place as gzdwjdz, " +
|
|
|
+ "unit_phone as dwdh,unit_zip_code as yb3, " +
|
|
|
+ "contact_name as lxrxm,contact_relation as lxrgx, " +
|
|
|
+ "contact_addr_name as dz, " +
|
|
|
+ "contact_phone as dh2, " +
|
|
|
+ "zy_admiss_way as rytj, " +
|
|
|
+ "rysj=convert(varchar(10),admiss_date,112), " +
|
|
|
+ "rykb=(select d.si_caty from zd_unit_code d where d.code=admiss_dept_code), " +
|
|
|
+ "admiss_ward as rybf, " +
|
|
|
+ "zkkb=(select d.si_caty from zd_unit_code d where d.code=trans_dept_code), " +
|
|
|
+ "cysj=convert(varchar(10),dismiss_date,112), " +
|
|
|
+ "cykb=(select d.si_caty from zd_unit_code d where d.code=dismiss_dept_code), " +
|
|
|
+ "dismiss_ward as cybf, " +
|
|
|
+ "admiss_days as sjzyts, " +
|
|
|
+ "clinic_diag_str as mzzd, " +
|
|
|
+ "clinic_diag_code as jbbm, " +
|
|
|
+ "hurt_reason_name as wbyy, " +
|
|
|
+ "hurt_reason_code as h23, " +
|
|
|
+ "pathologic_diag_str as blzd, " +
|
|
|
+ "pathologic_diag_code as jbmm, " +
|
|
|
+ "blh,allergy as ywgm, " +
|
|
|
+ "autopsy as swhzsj,blood_type as xx, " +
|
|
|
+ "rh=(select d.wjw_code from zd_hbsag d where d.code=rh), " +
|
|
|
+ "dept_leader_name as kzr, " +
|
|
|
+ "leader_doctor_name as zrys, " +
|
|
|
+ "main_doctor_name as zzys, " +
|
|
|
+ "admiss_doctor_name as zyys, " +
|
|
|
+ "duty_nurse_name as zrhs, " +
|
|
|
+ "internship_doctor_name as sxys, " +
|
|
|
+ "coder_name as bmy, " +
|
|
|
+ "bazl=(case when quality_control_level is null then 3 " +
|
|
|
+ "when quality_control_level>=3 then 3 else quality_control_level end), " +
|
|
|
+ "quality_control_doctor_name as zkys, " +
|
|
|
+ "quality_control_nurse_name as zkhs, " +
|
|
|
+ "zkrq=convert(varchar(10),quality_control_date,112), " +
|
|
|
+ "lyfs=(select d.wjw_code from zd_zy_dismiss_way d where d.code=zy_dismiss_way), " +
|
|
|
+ "dismiss_destination as yzzyYljg, " +
|
|
|
+ "dismiss_destination as wsyYljg, " +
|
|
|
+ "admiss_again_in_one_month as sfzzyjh, " +
|
|
|
+ "admiss_again_purpose as md, " +
|
|
|
+ "coma_days_before_admiss as ryqT, " +
|
|
|
+ "coma_hours_before_admiss as ryqXs, " +
|
|
|
+ "coma_minutes_before_admiss as ryqF, " +
|
|
|
+ "coma_days_after_admiss as ryhT, " +
|
|
|
+ "coma_hours_after_admiss as ryhXs, " +
|
|
|
+ "coma_minutes_after_admiss as ryhF, " +
|
|
|
+ "total_cost as zfy,self_pay as zfje, " +
|
|
|
+ "general_medical_service_fee as ylfuf, " +
|
|
|
+ "general_treatment_operating_fee as zlczf, " +
|
|
|
+ "care_fee as hlf,else_fee as qtfy, " +
|
|
|
+ "pathologic_diag_fee as blzdf, " +
|
|
|
+ "experiment_diag_fee as syszdf, " +
|
|
|
+ "ct_diag_fee as yxxzdf, " +
|
|
|
+ "clinical_diag_fee as lczdxmf, " +
|
|
|
+ "not_surgical_fee as fsszlxmf, " +
|
|
|
+ "clinical_physical_fee as wlzlf, " +
|
|
|
+ "surgical_fee as sszlf,anesthetize_fee as maf, " +
|
|
|
+ "surgery_fee as ssf,recover_fee as kff, " +
|
|
|
+ "tcm_treatment_fee as zyzlf, " +
|
|
|
+ "west_medicine_fee as xyf, " +
|
|
|
+ "chinese_patent_medicine_fee as zcyf, " +
|
|
|
+ "chinese_herbal_medicine_fee as zcyf1, " +
|
|
|
+ "blood_fee as xf,albumin_products_fee as bdblzpf, " +
|
|
|
+ "globulin_products_fee as qdblzpf, " +
|
|
|
+ "coagulation_factor_products_fee as nxyzlzpf, " +
|
|
|
+ "cytokine_products_fee as xbyzlzpf, " +
|
|
|
+ "cost_of_disposable_medical_materials_for_examination as hcyyclf, " +
|
|
|
+ "cost_of_disposable_medical_materials_for_treatment as yyclf, " +
|
|
|
+ "cost_of_disposable_medical_materials_for_operation as ycxyyclf, " +
|
|
|
+ "other_fees as qtf,sign_date as operDate,operType=2 " +
|
|
|
+ "from t_case_frontsheet_main where bah=#{patNo} and admiss_times=#{times}")
|
|
|
+ List<YibaoN041> selectYibaoN041(String patNo, int times);
|
|
|
+
|
|
|
+ @Select("select name as qtzd,code as jbdm,admiss_status as rybq from " +
|
|
|
+ "t_case_frontsheet_disdiag where bah=#{patNo} and times=#{times} order by no")
|
|
|
+ List<YibaoN041DiagItem> selectYibaoN041Diags(String patNo, int times);
|
|
|
+
|
|
|
+ @Select("select " +
|
|
|
+ "code as ssjczbm, " +
|
|
|
+ "ssjczrq=convert(varchar(10),date,112), " +
|
|
|
+ "ssjb=level, " +
|
|
|
+ "name as ssjczmc,operator_name as sz, " +
|
|
|
+ "assistant_one_name as yz, " +
|
|
|
+ "assistant_two_name as ez, " +
|
|
|
+ "qkdj=case when cut is null then 1 else cut+1 end, " +
|
|
|
+ "qkyhlb=case when isnull(heal,0)=0 then 9 else heal end, " +
|
|
|
+ "mzfs=(select d.yb_code from zd_anaesthesia d where d.code=anaesthesia), " +
|
|
|
+ "anaesthesiaor_name as mzys " +
|
|
|
+ "from t_case_frontsheet_surgery " +
|
|
|
+ "where bah=#{patNo} and times=#{times} order by no")
|
|
|
+ List<YibaoN041SurgeryItem> selectYibaoN041Surgeries(String patNo, int times);
|
|
|
|
|
|
@Select("select mdtrt_id as visit_id " +
|
|
|
"from t_settlement_setlinfo " +
|
|
@@ -390,7 +508,7 @@ public interface DrgDipDao {
|
|
|
" dcla_time AS oper_date " +
|
|
|
"from t_settlement_setlinfo " +
|
|
|
"WHERE " +
|
|
|
- " mdtrt_ id = #{visitId} ")
|
|
|
+ " mdtrt_id = #{visitId} ")
|
|
|
List<PatientEssentialInfo> basicPatientInfoOfStatement(String visitId);
|
|
|
|
|
|
|
|
@@ -403,10 +521,10 @@ public interface DrgDipDao {
|
|
|
" diag_code, " +
|
|
|
" oprn_oprt_name, " +
|
|
|
" oprn_oprt_code, " +
|
|
|
- " maindiag_flag, " +
|
|
|
+ " case subscript when 1 then 1 else 0 end as maindiag_flag, " +
|
|
|
" '${visitId}' as visit_id " +
|
|
|
"from t_settlement_opspdiseinfo " +
|
|
|
- "where setl_id = '' " +
|
|
|
+ "where setl_id = #{setlId} " +
|
|
|
" and diag_code is not null")
|
|
|
List<Opspdiseinfo> getOpspdiseinfoBySetlId(String setlId,
|
|
|
String visitId);
|