فهرست منبع

西药类型统计变更以及门诊统筹统计优化

hsh 1 سال پیش
والد
کامیت
739c5667bc

+ 3 - 4
src/main/java/thyyxxk/webserver/dao/his/highreport/AllStatisticsDao.java

@@ -4,7 +4,6 @@ package thyyxxk.webserver.dao.his.highreport;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
-import thyyxxk.webserver.entity.highreport.HighReportDto;
 
 import java.util.List;
 import java.util.Map;
@@ -38,8 +37,8 @@ public interface AllStatisticsDao {
             "   f.name " +
             "union all " +
             "select " +
-            "   a.charge_code as flm, " +
-            "   case when a.charge_code= 'BILL01' then '西药' when a.charge_code= 'BILL02' then '中草药' when a.charge_code= 'BILL28' then '中成药' end flmc, " +
+            "   case when c.bill_item_zy in('001','028') then 'yp1' when c.bill_item_zy= '002' then 'yp2' end as flm, " +
+            "   case when c.bill_item_zy in('001','028') then '西成药' when c.bill_item_zy= '002' then '中草药' end flmc, " +
             "   c.drug_kind as hsm, " +
             "   d.name as hsmc, " +
             "   a.${suffer} as ksid, " +
@@ -54,7 +53,7 @@ public interface AllStatisticsDao {
             "and a.gen_time >= #{startTime} " +
             "and a.gen_time <= #{endTime} " +
             "group by " +
-            "   a.charge_code, " +
+            "   c.bill_item_zy, " +
             "   d.name, " +
             "   c.drug_kind, " +
             "   a.${suffer}, " +

+ 3 - 3
src/main/java/thyyxxk/webserver/dao/his/ybkf/OutpatientCoordinationDao.java

@@ -66,7 +66,7 @@ public interface OutpatientCoordinationDao {
             "(select rtrim(a.name) from a_employee_mi a WHERE a.code = t3.doctor_code) as doctor, \n" +
             "t3.visit_dept_code as deptId, \n" +
             "(select d.name from zd_unit_code d WHERE d.code = t3.visit_dept_code ) as dept, \n" +
-            "(select rtrim(a.name) from a_employee_mi a WHERE a.code = t3.op_id) as czr, \n" +
+            "(select rtrim(a.name) from a_employee_mi a WHERE a.code = t2.op_id) as czr, \n" +
             "(select d.code from a_employee_mi a, zd_unit_code d WHERE a.code = t1.staff_id and d.code = a.dept_code ) as deptCode, \n" +
             "(select d.name from a_employee_mi a, zd_unit_code d WHERE a.code = t1.staff_id and d.code = a.dept_code ) as deptName, \n" +
             "t1.pat_no as patNo, \n" +
@@ -79,11 +79,11 @@ public interface OutpatientCoordinationDao {
             "(select pat_no, convert(varchar(100), setl_time, 112) rq1, setl_time, staff_id, times, psn_name, insuplc_admdvs \n" +
             "from t_si_setlinfo where med_type='11' and insutype='310' and revoked=0 \n" +
             "and convert(varchar(6), setl_time, 112) = #{month} ) t1, \n" +
-            "(select distinct patient_id, CONVERT(varchar(100), request_day, 112) rq2 \n" +
+            "(select distinct patient_id, op_id, CONVERT(varchar(100), request_day, 112) rq2 \n" +
             "from mzy_reqrec with(nolock) \n" +
             "where cancel_mark=0 \n" +
             "and convert(varchar(6), request_day, 112) = #{month} ) t2, \n" +
-            "(select distinct patient_id, times, isnull(icd_text_new, icd_text) as icd_text, visit_dept_code, doctor_code, op_id from mz_visit_table) t3 \n" +
+            "(select distinct patient_id, times, isnull(icd_text_new, icd_text) as icd_text, visit_dept_code, doctor_code from mz_visit_table) t3 \n" +
             "where t1.pat_no = t2.patient_id \n" +
             "and t1.rq1 = t2.rq2 \n" +
             "and t1.pat_no = t3.patient_id \n" +