|
@@ -3,6 +3,7 @@ package thyyxxk.webserver.dao.his.medicalinsurance;
|
|
|
import org.apache.ibatis.annotations.*;
|
|
|
import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.query.*;
|
|
|
+import thyyxxk.webserver.entity.medicalinsurance.setlinfo.TimesList;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setllist.BrfChrgitm;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setllist.InptntSetlmtLst;
|
|
|
import thyyxxk.webserver.entity.medicalinsurance.setllist.OtptntSetlmtLst;
|
|
@@ -131,9 +132,8 @@ public interface SiQueryDao {
|
|
|
@Param("ledgerSn") int ledgerSn,
|
|
|
@Param("nullCtnt") String nullCtnt);
|
|
|
|
|
|
- @Select("select type=#{type},pat_no,times,ledger_sn,psn_name,setl_id,gend,setl_time,medfee_sumamt,psn_no " +
|
|
|
- "from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")
|
|
|
- List<SetlIndex> selectSetlIndex(QrySetlListPrm q);
|
|
|
+ @Select("select setl_id from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn} and revoked=0")
|
|
|
+ String selectSetlId(@Param("patNo") String patNo, @Param("times") int times, @Param("ledgerSn") int ledgerSn);
|
|
|
|
|
|
@Select("select * from t_si_pat_info where pat_no=#{patNo} and times=#{times} and ledger_sn=#{ledgerSn}")
|
|
|
SiPatInfo selectSiPatInfo(@Param("patNo") String patNo, @Param("times") int times, @Param("ledgerSn") int ledgerSn);
|
|
@@ -152,44 +152,21 @@ public interface SiQueryDao {
|
|
|
"and insuplc_admdvs is not null order by times desc")
|
|
|
String selectAdmdvsByPatNoAndPsnNo(@Param("patNo") String patNo, @Param("psnNo") String psnNo);
|
|
|
|
|
|
- @Select("select a.mdtrt_id,a.psn_name,a.gend,a.age,a.psn_no,b.emp_name," +
|
|
|
- "a.psn_type,a.cvlserv_flag,a.pat_no,a.setl_id,b.insuplc_admdvs, " +
|
|
|
+ @Select("select a.mdtrt_id,a.psn_name,a.gend,a.age,a.psn_no,b.emp_name,a.psn_type,a.cvlserv_flag,a.pat_no," +
|
|
|
+ "a.setl_id,b.insuplc_admdvs,a.med_type,a.setl_time,a.hifes_pay, " +
|
|
|
"tel=(select rtrim(home_tel) from a_patient_mi where a_patient_mi.inpatient_no=a.pat_no), " +
|
|
|
"admDeptName=(select rtrim(name) from zd_unit_code where code=isnull(c.zk_ward,c.small_dept)), " +
|
|
|
- "c.bed_no as admBed,c.admiss_date as begntime,a.certno,a.mdtrt_cert_type, b.psn_idet_type, " +
|
|
|
- "endtime=(select account_date from zy_ledger_file d where d.inpatient_no=a.pat_no and d.admiss_times=a.times and " +
|
|
|
- "d.ledger_sn=a.ledger_sn), " +
|
|
|
+ "c.bed_no as admBed,a.begntime,a.endtime,a.certno,a.mdtrt_cert_type,b.psn_idet_type, " +
|
|
|
"dscgMaindiagName=(select rtrim(dis_diag_comment) from zy_dis_diag_yb where zy_dis_diag_yb.inpatient_no=a.pat_no " +
|
|
|
"and zy_dis_diag_yb.admiss_times=a.times and zy_dis_diag_yb.dis_diag_no=1), " +
|
|
|
- "a.med_type,a.setl_time,a.hifes_pay, " +
|
|
|
"chfpdrName=(select rtrim(name) from a_employee_mi where code=c.refer_physician), " +
|
|
|
"staffName=(select rtrim(name) from a_employee_mi where a_employee_mi.code=a.staff_id), " +
|
|
|
"a.balc,a.medfee_sumamt,a.hifp_pay,a.acct_pay,a.cvlserv_pay,a.psn_cash_pay, " +
|
|
|
"a.hifob_pay,a.oth_pay,a.hifmi_pay,a.maf_pay " +
|
|
|
- "from t_si_setlinfo a, t_si_pat_info b, zy_inactpatient c where a.setl_id=#{setlId} " +
|
|
|
+ "from t_si_setlinfo a, t_si_pat_info b, ${table} c where a.setl_id=#{setlId} " +
|
|
|
"and a.pat_no=b.pat_no and a.times=b.times and a.ledger_sn=b.ledger_sn and a.pat_no=c.inpatient_no " +
|
|
|
"and a.times=c.admiss_times")
|
|
|
- InptntSetlmtLst selectZySetlinfo(@Param("setlId") String setlId);
|
|
|
-
|
|
|
- @Select("select a.mdtrt_id,a.psn_name,a.gend,a.age,a.psn_no,b.emp_name, " +
|
|
|
- "a.psn_type,a.cvlserv_flag,a.pat_no,a.setl_id,b.insuplc_admdvs, " +
|
|
|
- "tel=(select rtrim(home_tel) from a_patient_mi where a_patient_mi.inpatient_no=a.pat_no), " +
|
|
|
- "admDeptName=(select rtrim(name) from zd_unit_code where code=isnull(c.zk_ward,c.small_dept)), " +
|
|
|
- "c.bed_no as admBed,c.admiss_date as begntime, " +
|
|
|
- "endtime=(select account_date from zy_ledger_file d where d.inpatient_no=a.pat_no and d.admiss_times=a.times and " +
|
|
|
- "d.ledger_sn=a.ledger_sn), " +
|
|
|
- "a.certno,a.mdtrt_cert_type, b.psn_idet_type, " +
|
|
|
- "dscgMaindiagName=(select rtrim(dis_diag_comment) from zy_dis_diag_yb where zy_dis_diag_yb.inpatient_no=a.pat_no " +
|
|
|
- "and zy_dis_diag_yb.admiss_times=a.times and zy_dis_diag_yb.dis_diag_no=1), " +
|
|
|
- "a.med_type,a.setl_time,a.hifes_pay, " +
|
|
|
- "chfpdrName=(select rtrim(name) from a_employee_mi where code=c.refer_physician), " +
|
|
|
- "staffName=(select rtrim(name) from a_employee_mi where a_employee_mi.code=a.staff_id), " +
|
|
|
- "a.balc,a.medfee_sumamt,a.hifp_pay,a.acct_pay,a.cvlserv_pay,a.psn_cash_pay, " +
|
|
|
- "a.hifob_pay,a.oth_pay,a.hifmi_pay,a.maf_pay " +
|
|
|
- "from t_si_setlinfo a, t_si_pat_info b, zy_actpatient c where a.setl_id=#{setlId} " +
|
|
|
- "and a.pat_no=b.pat_no and a.times=b.times and a.ledger_sn=b.ledger_sn and a.pat_no=c.inpatient_no " +
|
|
|
- "and a.times=c.admiss_times")
|
|
|
- InptntSetlmtLst selectZyMidSetlinfo(@Param("setlId") String setlId);
|
|
|
+ InptntSetlmtLst selectZySetlinfo(@Param("setlId") String setlId, @Param("table") String table);
|
|
|
|
|
|
@Select("select account_date from zy_ledger_file where inpatient_no=#{patNo} and admiss_times=#{times} and ledger_sn=#{sn}")
|
|
|
Date selectAccountDate(@Param("patNo") String patNo,
|
|
@@ -218,8 +195,9 @@ public interface SiQueryDao {
|
|
|
@Select("select insuplc_admdvs from t_si_pat_info where mdtrt_id=#{mdtrtId}")
|
|
|
String selectInsuplcAdmdvsByMdtrtId(@Param("mdtrtId") String mdtrtId);
|
|
|
|
|
|
- @Select("select times from t_si_setlinfo where pat_no=#{patNo} and revoked=0")
|
|
|
- List<Integer> fetchSiTimesList(@Param("patNo") String patNo);
|
|
|
+ @Select("select setl_id,times,ledger_sn,endtime from t_si_setlinfo where pat_no=#{patNo} and revoked=0 " +
|
|
|
+ "and setl_type=#{type} order by endtime desc")
|
|
|
+ List<TimesList> fetchSiTimesList(@Param("patNo") String patNo, @Param("type") int type);
|
|
|
|
|
|
@Select("select * from t_si_setl_fee_detl where mdtrt_id=#{mdtrtId}")
|
|
|
List<SiSetlFeeDetl> selectAllSetlFeeDtle(@Param("mdtrtId") String mdtrtId);
|
|
@@ -438,5 +416,4 @@ public interface SiQueryDao {
|
|
|
@Param("endTime") String endTime,
|
|
|
@Param("name") String name,
|
|
|
@Param("certno") String certno);
|
|
|
-
|
|
|
}
|