xiaochan пре 3 месеци
родитељ
комит
8c03de3719

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>13.1.0</version>
+    <version>13.1.1</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 2 - 2
src/main/java/thyyxxk/webserver/dao/his/inpatient/casefrontsheet/CaseFrontSheetDao.java

@@ -51,7 +51,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
     @Select("select top 1 serial_no from t_injury_si_pat_info with(nolock) where pat_no=#{patNo} and times=#{times} order by ledger_sn desc")
     String selectInjurySerialNo(String patNo, int times);
 
-    @Select("select [dbo].[judge_infant](#{bah}, #{times})")
+    @Select("select count(1) from view_zy_patient_all where inpatient_no = #{bah} and admiss_times = #{times}")
     int getInfant(String bah, int times);
 
     @Select("select max(start_time) from ${table} with(nolock) where inpatient_no=#{bah} " +
@@ -728,7 +728,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
 
     @Select("select * from t_frontsheet_supplement where bah=#{bah} and times=#{times}")
     FrontSheetSupplement getSheetSupplement(String bah, int times);
-    
+
     @Update("update t_frontsheet_supplement set " +
             "adm_diag_code=#{admDiagCode},adm_diag_name=#{admDiagName},adm_status=#{admStatus}, " +
             "diagnosis_confirm_date=#{diagnosisConfirmDate,jdbcType=DATE}, " +

+ 0 - 234
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/emr/EmrControlDaoV2.java

@@ -1,234 +0,0 @@
-package thyyxxk.webserver.dao.his.zhuyuanyisheng.emr;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Constants;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-import org.mapstruct.Mapper;
-import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrAuditDetail;
-import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrProgressNote;
-import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrRuleData;
-import thyyxxk.webserver.entity.zhuyuanyisheng.emrcontrolrule.QualityControlAnalysisOfMedicalRecords;
-
-import java.util.Date;
-import java.util.List;
-
-@Mapper
-public interface EmrControlDaoV2 {
-
-    @Select("select rtrim(inpatient_no)                                                       as inpatient_no, " +
-            "       admiss_times, " +
-            "       sex, " +
-            "       (select [dbo].[F_GetAge]( " +
-            "                       (select birth_date " +
-            "                        from a_patient_mi pm " +
-            "                        where pm.inpatient_no = zy.inpatient_no), " +
-            "                       admiss_date))                                             as 'age', " +
-            "       clinic_diag_str /*门急诊诊断*/, " +
-            "       (select [dbo].F_GetDeptName(zk_ward))                                     as deptName, " +
-            "       (select dbo.f_GetEmpName(refer_physician))                                as tubeBedDoctorName, " +
-            "       admiss_date, " +
-            "       rtrim(zy.name)                                                            as name, " +
-            "       dis_date, " +
-            "       (select name " +
-            "        from t_case_frontsheet_disdiag " +
-            "        where bah = inpatient_no " +
-            "          and times = admiss_times " +
-            "          and no = 1)                                                            as dis_diag, " +
-            "       (select [dbo].F_GetDeptName(admiss_ward))                                 as admiss_dept_name, " +
-            "       (select dbo.f_GetEmpName(consult_physician))                              as consult_physician_name, " +
-            "       (select dbo.f_GetEmpName(dept_director))                                  as dept_director_name, " +
-            "       (select [dbo].[f_get_zy_date](inpatient_no, admiss_times))                as admissDay, " +
-            "       total_charge, " +
-            "       (select dbo.F_GetDeptName(dis_dept))                                      as disDeptName, " +
-            "       (select count(1) " +
-            "        from view_yz_all_order v " +
-            "        where v.inpatient_no = zy.inpatient_no " +
-            "          and v.admiss_times = zy.admiss_times " +
-            "          and v.status_flag = '5' " +
-            "          and order_code in " +
-            "              (select order_code " +
-            "               from yz_zd_order_item_confirm " +
-            "               where yz_zd_order_item_confirm.item_name = N'死亡')) " +
-            "                                                                                 as death, " +
-            "       (select name from zd_statutory_epidemic where code = ba.fdcrb)            as fdcrb, " +
-            "       pathology_diag_comment                                                    as pathologicDiagStr, " +
-            "       surgery.code                                                              as ssbm, " +
-            "       surgery.name                                                              as ssmc, " +
-            "       operator_name                                                             as operator_name, " +
-            "       cut,heal,level, " +
-            "       (select name from zd_anaesthesia where anaesthesia = zd_anaesthesia.code) as anaesthesia_name, " +
-            "       ba.qjcs                                                                   as qjcs, " +
-            "       ba.gmwy                                                                   as allergicMedicine, " +
-            "       ba.kss                                                                    as kss /*1-是 2-否*/, " +
-            "       ba.xjpy                                                                   as xjpy " +
-            "from ${tableName} zy " +
-            "         left join t_case_frontsheet_surgery surgery " +
-            "                   on (zy.inpatient_no = surgery.bah and zy.admiss_times = surgery.times and no = 1) " +
-            "         left join batj_ba2 ba on (ba.zyh = zy.inpatient_no and ba.zycs = zy.admiss_times)" +
-            " ${ew.customSqlSegment} ")
-    List<QualityControlAnalysisOfMedicalRecords> queryEmrRulePatient(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper,
-                                                                     @Param("tableName") String tableName);
-
-
-    @Select("select id, rule_data, type from emr_rule ")
-    List<EmrRuleData> selectEmrRule();
-
-    @Select("${sql}")
-    Date executeSqlDate(String sql);
-
-    @Select("${sql}")
-    List<Date> executeSqlDateList(String sql);
-
-    @Select("select id, " +
-            "       document_id, " +
-            "       name, " +
-            "       create_id, " +
-            "       creation_time, " +
-            "       refer_physician, " +
-            "       consult_physician, " +
-            "       dept_director " +
-            "from emr_progress_note " +
-            "where document_id = (select top 1 id " +
-            "                     from emr_patient_data " +
-            "                     where pat_no = #{patNo} " +
-            "                       and times = #{times} " +
-            "                       and del_flag = 0 " +
-            "                       and emr_category_code = 'shoucibingchengjilu')" +
-            " order by creation_time ")
-    List<EmrProgressNote> fragmentInterval(String patNo, Integer times);
-
-
-    @Select("select top 1 order_time " +
-            "from yz_act_order " +
-            "where inpatient_no = #{patNo} " +
-            "  and admiss_times = #{times} " +
-            "  and status_flag in ('3', '4') " +
-            "  and order_code in (select order_code from yz_zd_order_item_confirm where item_name = N'${name}')")
-    Date whetherThereIsASeriousIllnessDoctorSOrder(String patNo, Integer times, String name);
-
-    @Select("select top 1 emr_document_id " +
-            "from emr_patient_data " +
-            "where del_flag = 0 " +
-            "  and pat_no = #{patNo} " +
-            "  and times = #{times} " +
-            "  and emr_category_code = 'shoucibingchengjilu' " +
-            "order by create_date desc")
-    String selectedCourseId(String patNo,
-                            Integer times);
-
-    @Select("select count(1) " +
-            "from ysh_yj_req " +
-            "where  " +
-            "  inpatient_no = #{patNo} " +
-            "  and admiss_times = #{times}" +
-            "  and req_type = 3 " +
-            "  and order_type = '08'  ")
-    int checkTheResultsCount(String patNo, Integer times);
-
-
-    @Select("select count(1) " +
-            "from ysh_yj_req " +
-            "where  " +
-            "  inpatient_no = #{patNo} " +
-            "  and admiss_times = #{times}" +
-            "  and req_type = 3 " +
-            "  and order_type = '26'  ")
-    int magneticResonanceCount(String patNo, Integer times);
-
-    @Select("select count(1) " +
-            "from ysh_yj_req " +
-            "where inpatient_no = #{patNo} " +
-            "  and admiss_times = #{times} " +
-            "  and req_type = 2 " +
-            "  and order_type = '038'")
-    int numberOfPathologies(String patNo, Integer times);
-
-    @Select("select count(1) " +
-            "from ysh_yj_req " +
-            "where inpatient_no = #{patNo} " +
-            "  and admiss_times = #{times} " +
-            "  and req_type = 2 " +
-            "  and order_type = '011'")
-    int bacterialCultureCount(String patNo, Integer times);
-
-    @Select("<script>" +
-            "select id,  " +
-            "       pat_no,  " +
-            "       times,  " +
-            "       approver,  " +
-            "       review_time,  " +
-            "       name,  " +
-            "       scoring_criteria,  " +
-            "       remark,  " +
-            "       remediation_status,  " +
-            "       number_of_defects,  " +
-            "       modify_person,  " +
-            "       modification_time,  " +
-            "       emr_id,  " +
-            "       history,  " +
-            "       doctor," +
-            "       emr_name = (select name from emr_patient_data where emr_audit_detail.emr_id = emr_patient_data.id)," +
-            "       final_control  " +
-            "from emr_audit_detail  " +
-            "where pat_no = #{patNo}  " +
-            "  and times = #{times}" +
-            "  and history = 0" +
-            "  <if test=\"finalControl != null\"> " +
-            "  and final_control = #{finalControl}" +
-            "  </if>" +
-            "</script> ")
-    List<EmrAuditDetail> patientQualityControl(String patNo, Integer times, Integer finalControl);
-
-    @Select("select      f_dept_code as fCode, " +
-            "    fDept = (select [dbo].F_GetDeptName(f_dept_code)), " +
-            "            dept_code   as code, " +
-            "    dept  = (select dbo.F_GetDeptName(dept_code)) " +
-            "from zy_zk_list " +
-            "where inpatient_no = #{patNo}  " +
-            "  and admiss_times = #{times} ")
-    List<JSONObject> transfer(String patNo, Integer times);
-
-
-    @Select("select data_element from emr_data_element where pat_no = #{patNo} and times = #{times}")
-    JSONObject objects(String patNo, Integer times);
-
-
-    @Select("select a.id, " +
-            "       a.pat_no, " +
-            "       b.del_flag, " +
-            "       a.times, " +
-            "       approver, " +
-            "       approver_name = (select rtrim(name) " +
-            "                        from a_employee_mi " +
-            "                        where code = approver), " +
-            "       a.review_time, " +
-            "       a.name, " +
-            "       scoring_criteria, " +
-            "       remark, " +
-            "       remediation_status, " +
-            "       number_of_defects, " +
-            "       modify_person, " +
-            "       modification_time, " +
-            "       emr_id, " +
-            "       history, " +
-            "       doctor, " +
-            "       final_control, " +
-            "       pat_name      = (select rtrim(name) " +
-            "                        from a_patient_mi " +
-            "                        where a.pat_no = inpatient_no), " +
-            "       emr_name      = (select emr_name " +
-            "                        from emr_patient_data " +
-            "                        where emr_id = emr_patient_data.id) " +
-            "from emr_audit_detail a, " +
-            "     emr_patient_data b " +
-            "where a.emr_id = b.id " +
-            "  and history = 0 " +
-            "  and b.del_flag = 0 " +
-            "  and doctor = #{doctor} " +
-            "  and remediation_status is null and number_of_defects > 0" +
-            "  and a.final_control = (select final_control from view_zy_patient_all c where c.inpatient_no = a.pat_no and c.admiss_times = a.times) ;")
-    List<EmrAuditDetail> getUnprocessedRecommendationsByDoctor(String doctor);
-
-}