|
@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Select;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetDisdiag;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetSurgery;
|
|
|
+import thyyxxk.webserver.entity.casefrontsheet.response.ExportDclResponse;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -73,4 +74,34 @@ public interface FrontSheetExportDao {
|
|
|
"name=(select top 1 rtrim(d.name) from zd_icd9_cm3 d where d.yb_code=a.code order by code) " +
|
|
|
"from t_case_frontsheet_surgery a where bah=#{bah} and times=#{times}")
|
|
|
List<CaseFrontsheetSurgery> fetchSurgeries(@Param("bah") String bah, @Param("times") int times);
|
|
|
+
|
|
|
+ @Select("select bah, times, duplicate_time as opTime,visit_staff, remark, " +
|
|
|
+ "admissDate=(select d.admiss_date from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "disDate=(select d.dismiss_date from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "disDept=(select d.dismiss_dept from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "doctor=(select d.main_doctor_name from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "patName=(select rtrim(d.name) from a_patient_mi d where d.inpatient_no=a.bah), " +
|
|
|
+ "opStaff=(select rtrim(d.name) from a_employee_mi d where d.code=a.duplicate_staff) " +
|
|
|
+ "from t_case_frontsheet_duplicate a where a.duplicate_time>=#{begin} and a.duplicate_time<=#{end}")
|
|
|
+ List<ExportDclResponse> getDuplicateSheets(String begin, String end);
|
|
|
+
|
|
|
+ @Select("select bah, times, closedown_time as opTime,visit_staff, remark, " +
|
|
|
+ "admissDate=(select d.admiss_date from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "disDate=(select d.dismiss_date from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "disDept=(select d.dismiss_dept from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "doctor=(select d.main_doctor_name from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "patName=(select rtrim(d.name) from a_patient_mi d where d.inpatient_no=a.bah), " +
|
|
|
+ "opStaff=(select rtrim(d.name) from a_employee_mi d where d.code=a.closedown_staff) " +
|
|
|
+ "from t_case_frontsheet_closedown a where a.closedown_time>=#{begin} and a.closedown_time<=#{end}")
|
|
|
+ List<ExportDclResponse> getCloseDownSheets(String begin, String end);
|
|
|
+
|
|
|
+ @Select("select bah, times, pat_name,lend_time as opTime,remark, " +
|
|
|
+ "admissDate=(select d.admiss_date from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "dis_date, dis_dept, lend_staff as visitStaff, " +
|
|
|
+ "doctor=(select d.main_doctor_name from t_case_frontsheet_main d where d.bah=a.bah and d.admiss_times=a.times), " +
|
|
|
+ "opStaff=(select rtrim(d.name) from a_employee_mi d where d.code=a.op_staff), " +
|
|
|
+ "state=case when state='RETURNED' then '已归还' else '未归还' end, " +
|
|
|
+ "return_time, lend_staff_phone from t_case_frontsheet_lendout a " +
|
|
|
+ " where a.lend_time>=#{begin} and a.lend_time<=#{end}")
|
|
|
+ List<ExportDclResponse> getLendOutSheets(String begin, String end);
|
|
|
}
|