|
@@ -159,13 +159,13 @@ public interface DrgDipDao {
|
|
|
"rtrim(a.refer_physician) as tbDoctorId, " +
|
|
|
"rtrim(a.zk_ward) as hospDischDeptId, " +
|
|
|
"hospDischTime=convert(varchar(19),a.dis_date,21), " +
|
|
|
- "insurAreaId=(select top 1 d.insuplc_admdvs from t_si_pat_info d where d.pat_no=a.inpatient_no and d.times=a.admiss_times), " +
|
|
|
- "insurType=(select top 1 d.insutype from t_si_pat_info d where d.pat_no=a.inpatient_no and d.times=a.admiss_times), " +
|
|
|
+ "insurAreaId=(select d.insuplc_admdvs from t_si_pat_info d where d.pat_no=#{patNo} and d.times=#{times} and d.ledger_sn=#{sn}), " +
|
|
|
+ "insurType=(select d.insutype from t_si_pat_info d where d.pat_no=#{patNo} and d.times=#{times} and d.ledger_sn=#{sn}), " +
|
|
|
"a.med_type as ttmntTypeCode,a.admiss_times as hsptzdCount, " +
|
|
|
"disCode=(select d.icd_code from zy_in_diag_yb d where d.inpatient_no=a.inpatient_no and d.admiss_times=a.admiss_times and d.diag_no=1), " +
|
|
|
"disName=(select d.icd_text from zy_in_diag_yb d where d.inpatient_no=a.inpatient_no and d.admiss_times=a.admiss_times and d.diag_no=1) " +
|
|
|
"from zy_inactpatient a, a_patient_mi b where a.inpatient_no=#{patNo} and a.admiss_times=#{times} and a.inpatient_no=b.inpatient_no ")
|
|
|
- List<HisHsptzdPatientBase> selectHisHsptzdPatientBaseOutHosp(String patNo, int times);
|
|
|
+ List<HisHsptzdPatientBase> selectHisHsptzdPatientBaseOutHosp(String patNo, int times, int sn);
|
|
|
|
|
|
@Select("select * from " +
|
|
|
"(SELECT ROW_NUMBER() OVER(ORDER BY a.detail_sn) AS idx, " +
|
|
@@ -322,7 +322,7 @@ public interface DrgDipDao {
|
|
|
|
|
|
@Select("select visitId=bah+'_'+cast(admiss_times as varchar)+'_1' from t_case_frontsheet_main " +
|
|
|
"where sign_date>=#{start} and sign_date<=#{end} ")
|
|
|
- List<VisitId> selectSignedVistiId(String start, String end);
|
|
|
+ List<VisitId> selectSignedVisitId(String start, String end);
|
|
|
|
|
|
@Select("select " +
|
|
|
"username='长沙泰和医院', " +
|