|
@@ -176,7 +176,7 @@ public interface SiQueryDao {
|
|
|
"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-1), " +
|
|
|
+ "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), " +
|
|
@@ -392,6 +392,12 @@ public interface SiQueryDao {
|
|
|
@Select("select name,code='' from t_si_admdvs where code=#{code}")
|
|
|
PureCodeName selectAdmdvsName(@Param("code") String code);
|
|
|
|
|
|
+ @Select("select max(account_date) from zy_ledger_file where inpatient_no=#{patNo} and admiss_times=#{times}")
|
|
|
+ Date selectMaxLedgerAccountDate(@Param("patNo") String patNo,
|
|
|
+ @Param("times") int times);
|
|
|
+
|
|
|
+ @Select("select yb_register_date from zy_actpatient where inpatient_no=#{patNo}")
|
|
|
+ Date selectRegisterDate(@Param("patNo") String patNo);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
"select rtrim(a.inpatient_no) inpatient_no," +
|