|
@@ -575,29 +575,22 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
|
|
|
@Select("<script>" +
|
|
|
"select distinct " +
|
|
|
- "rtrim(a.inpatient_no) bah, " +
|
|
|
- "a.admiss_times times, " +
|
|
|
- "rtrim(a.name) name, " +
|
|
|
- "a.sex, " +
|
|
|
- "doctorName=(select rtrim(name) from a_employee_mi with(nolock) where code=b.zyys), " +
|
|
|
- "b.sign_date, " +
|
|
|
- "a.dis_date," +
|
|
|
- "admissDept=(select rtrim(name) from zd_unit_code with(nolock) where code=a.admiss_dept), " +
|
|
|
- "dismissDept=(select rtrim(name) from zd_unit_code with(nolock) where code=a.dis_dept), " +
|
|
|
- "rtrim(b.blfx) blfx, " +
|
|
|
- "inDays=(select datediff(day, a.admiss_date, a.dis_date)), " +
|
|
|
- "a.total_charge totalCost " +
|
|
|
- "from zy_inactpatient a with(nolock), " +
|
|
|
- "batj_ba2 b with(nolock), " +
|
|
|
- "ba_first_page1 c with(nolock), " +
|
|
|
- "batj_ba4 d with(nolock) " +
|
|
|
+ "a.bah,a.admiss_times as times, " +
|
|
|
+ "a.name,a.sex, " +
|
|
|
+ "a.admiss_doctor_name as doctorName, " +
|
|
|
+ "a.sign_date, " +
|
|
|
+ "a.dismiss_date," +
|
|
|
+ "a.admiss_dept, " +
|
|
|
+ "a.dismiss_dept, " +
|
|
|
+ "a.case_classification as blfx " +
|
|
|
+ "from t_case_frontsheet_main a with(nolock), " +
|
|
|
+ "t_case_frontsheet_disdiag c with(nolock), " +
|
|
|
+ "t_case_frontsheet_surgery d with(nolock) " +
|
|
|
"where " +
|
|
|
- "b.zyh=a.inpatient_no and " +
|
|
|
- "b.zycs=a.admiss_times and " +
|
|
|
- "a.dis_date>=#{start} and " +
|
|
|
- "a.dis_date<=#{end} and " +
|
|
|
+ "a.dismiss_date>=#{start} and " +
|
|
|
+ "a.dismiss_date<=#{end} and " +
|
|
|
"<if test=\"blfxChkbox!=null and blfxChkbox.size>0 \">" +
|
|
|
- "b.blfx in " +
|
|
|
+ "a.case_classification in " +
|
|
|
"<foreach collection='blfxChkbox' item='item' open='(' close=')' separator=','>" +
|
|
|
"#{item}" +
|
|
|
"</foreach> and " +
|
|
@@ -606,21 +599,21 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"a.med_type=#{medType} and " +
|
|
|
"</if>" +
|
|
|
"<if test=\"doctorCode!=null and doctorCode!='' \">" +
|
|
|
- "(a.refer_physician=#{doctorCode} or b.zyys=#{doctorCode}) and " +
|
|
|
+ "a.admiss_doctor=#{doctorCode} and " +
|
|
|
"</if>" +
|
|
|
"<if test=\"sex!=null and sex!='' \">" +
|
|
|
"a.sex=#{sex} and " +
|
|
|
"</if>" +
|
|
|
"<if test=\"icdCode!=null and icdCode!='' \">" +
|
|
|
- "c.dis_diag=#{icdCode} and " +
|
|
|
+ "c.code=#{icdCode} and " +
|
|
|
"</if>" +
|
|
|
"<if test=\"surgeryCode!=null and surgeryCode!='' \">" +
|
|
|
- "d.ssbm=#{surgeryCode} and " +
|
|
|
+ "d.code=#{surgeryCode} and " +
|
|
|
"</if>" +
|
|
|
- "c.inpatient_no=a.inpatient_no and " +
|
|
|
- "c.admiss_times=a.admiss_times and " +
|
|
|
- "d.zyh=a.inpatient_no and " +
|
|
|
- "d.zycs=a.admiss_times " +
|
|
|
+ "c.bah=a.bah and " +
|
|
|
+ "c.times=a.admiss_times and " +
|
|
|
+ "d.bah=a.bah and " +
|
|
|
+ "d.times=a.admiss_times " +
|
|
|
"</script>")
|
|
|
List<SheetOverview> advanceSearch(AdvanceSearchParam param);
|
|
|
|