Procházet zdrojové kódy

删除无用东西

xiaochan před 1 rokem
rodič
revize
126c9cccfb

+ 5 - 66
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/emr/EmrControlRuleController.java

@@ -31,90 +31,29 @@ public class EmrControlRuleController {
         this.serverv2 = serverv2;
     }
 
-    @GetMapping("/getAvailableObjects")
-    public ResultVo<List<Map<String, Object>>> getAvailableObjects() {
-        return server.getAvailableObjects();
-    }
-
-    @GetMapping("/specifyAdmissionQualityControl")
-    public ResultVo<JSONObject> specifyAdmissionQualityControl(@RequestParam("start") String start,
-                                                               @RequestParam("end") String end) {
-        return serverv2.specifyAdmissionQualityControl(start, end);
-    }
-
-    @GetMapping("/myPatientQualityControl")
-    public ResultVo<List<EmrAuditDetail>> myPatientQualityControl() {
-        return serverv2.myPatientQualityControl();
-    }
-
-
-    @GetMapping("/getRuleList")
-    public ResultVo<List<EmrRule>> getRuleList() {
-        return ResultVoUtil.success(server.getRuleList());
-    }
-
-    @GetMapping("/switchQualityControl")
-    public ResultVo<String> switchQualityControl(@RequestParam("id") String id,
-                                                 @RequestParam("offOn") Integer offOn) {
-        return server.switchQualityControl(id, offOn);
-    }
-
-    @GetMapping("/deleteRuleById")
-    public ResultVo<String> deleteRuleById(@RequestParam("id") String id) {
-        return server.deleteRuleById(id);
-    }
-
-    @GetMapping("/modifyTheAdmissionQualityControlTime")
-    public ResultVo<String> modifyTheAdmissionQualityControlTime(@RequestParam("date") String date) {
-        return server.modifyTheAdmissionQualityControlTime(date);
-    }
-
-    @GetMapping("/getAdmissDate")
-    public ResultVo<String> getAdmissDate() {
-        return server.getAdmissDate();
-    }
 
-    @GetMapping("/createRestrictions")
-    public ResultVo<EmrRuleVerify> createRestrictions(@RequestParam("code") String code,
-                                                      @RequestParam("id") String id,
-                                                      @RequestParam("patNo") String patNo) {
-        String[] strings = patNo.split("_");
-        return server.createRestrictions(code, strings[0], Integer.valueOf(strings[1]), Integer.valueOf(strings[2]), id);
+    @PostMapping("/exportExcelUnlock")
+    @PassToken
+    public void exportExcelUnlock(HttpServletResponse response, @RequestBody SelectUnlockParam param) {
+        server.exportExcelUnlock(response, param);
     }
 
-    ////////////////////////////////////////////////////////////////////////////////////////////////
     @PostMapping("/requestToUnlockMedicalRecords")
     public ResultVo<String> requestToUnlockMedicalRecords(@RequestBody EmrLimitUnlock param) {
         return server.requestToUnlockMedicalRecords(param);
     }
 
+
     @PostMapping("/getApplicationData")
     public ResultVo<IPage<EmrLimitUnlock>> getApplicationData(@RequestBody SelectUnlockParam param) {
         return server.getApplicationData(param);
     }
 
-    @PostMapping("/exportExcelUnlock")
-    @PassToken
-    public void exportExcelUnlock(HttpServletResponse response, @RequestBody SelectUnlockParam param) {
-        server.exportExcelUnlock(response, param);
-    }
 
     @PostMapping("/reviewMedicalRecordsToUnlock")
     public ResultVo<String> reviewMedicalRecordsToUnlock(@RequestBody EmrLimitUnlock param) {
         return server.reviewMedicalRecordsToUnlock(param);
     }
 
-    @GetMapping("/getMyUnlockByPatNo")
-    @PassToken
-    public ResultVo<EmrLimitUnlock> getMyUnlockByPatNo(@RequestParam("patNo") String patNo,
-                                                       @RequestParam("times") Integer times) {
-        return server.getMyUnlockByPatNo(patNo, times);
-    }
-
-
-    @PostMapping("/terminalPatients")
-    public ResultVo<List<QualityControlAnalysisOfMedicalRecords>> terminalPatients(@RequestBody FinalQuery param) {
-        return serverv2.terminalPatients(param);
-    }
 
 }

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

@@ -72,91 +72,6 @@ public interface EmrControlDaoV2 {
                                                                      @Param("tableName") String tableName);
 
 
-    /**
-     * 查询指定质控患者数据
-     *
-     * @param start        开始时间
-     * @param end          结束时间
-     * @param finalControl 0 - 环节质控 1-终末质控
-     * @param sql          额外的sql
-     * @return 返回患者数据
-     */
-    @Select("select rtrim(inpatient_no)                                                       as inpatient_no, " +
-            "       admiss_times, " +
-            "       rtrim(inpatient_no)                                                       as pat_no, " +
-            "       admiss_times as 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 (select * " +
-            "      from (select pat_no, times " +
-            "            from emr_audit_detail " +
-            "            where review_time >= #{start} " +
-            "              and review_time <= #{end}" +
-            "              and final_control = #{finalControl} " +
-            "              and history = 0  " +
-            "            group by pat_no, times) temp, " +
-            "           view_zy_patient_all b " +
-            "      where temp.pat_no = b.inpatient_no " +
-            "        and temp.times = b.admiss_times) 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) ${sql} ")
-    List<QualityControlAnalysisOfMedicalRecords> selectSuggestionByTimeAndFinalControl(String start, String end, Integer finalControl, String sql);
-
-    @Select("select a.name, remark, number_of_defects, b.emr_name,scoring_criteria, " +
-            "       a.pat_no, " +
-            "       a.times " +
-            "from emr_audit_detail a " +
-            "         left join emr_patient_data b on (a.emr_id = b.id) " +
-            "where doctor = #{userCode} " +
-            "  and a.history = 0 " +
-            "  and remediation_status is null")
-    List<EmrAuditDetail> selectedAudit(String userCode);
-
     @Select("select id, rule_data, type from emr_rule ")
     List<EmrRuleData> selectEmrRule();
 

+ 0 - 92
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/emr/EmrControlRuleSever.java

@@ -35,95 +35,6 @@ public class EmrControlRuleSever {
     }
 
 
-    public ResultVo<List<Map<String, Object>>> getAvailableObjects() {
-        return ResultVoUtil.success(dao.getAvailableObjects());
-    }
-
-    public List<EmrRule> getRuleList() {
-        List<EmrRule> list = dao.selectRules();
-        if (ListUtil.isBlank(list)) {
-            return new ArrayList<>();
-        }
-        list.forEach(item -> {
-            item.setMedicalRecordCode(dao.selectEmrCodeByRuleId(item.getId()));
-        });
-        return list;
-    }
-
-    public ResultVo<String> switchQualityControl(String id, Integer offOn) {
-        int num = dao.switchQualityControl(id, offOn);
-        if (num > 0) {
-            return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
-        }
-        return ResultVoUtil.success();
-    }
-
-    public ResultVo<String> deleteRuleById(String id) {
-        dao.deleteRuleById(id);
-        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
-    }
-
-    /**
-     * 修改入院质控时间
-     *
-     * @param date 时间
-     * @return 提示
-     */
-    public ResultVo<String> modifyTheAdmissionQualityControlTime(String date) {
-        dao.setTheTime(date);
-        return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
-    }
-
-    public ResultVo<String> getAdmissDate() {
-        return ResultVoUtil.success(dao.getAdmissDate());
-    }
-
-
-    /**
-     * 创建病历的限制
-     *
-     * @param code        病历编码
-     * @param patNo       住院号
-     * @param times       住院次数
-     * @param doctorLevel 医生等级
-     * @param id          病历id
-     * @return 返回提示
-     */
-    public ResultVo<EmrRuleVerify> createRestrictions(String code, String patNo, Integer times, Integer doctorLevel, String id) {
-        log.info("病历编码:{},住院号:{},住院次数:{}", code, patNo, times);
-        EmrRuleVerify ruleVerify = new EmrRuleVerify();
-        // 获取质控的list
-        List<EmrRule> ruleList = dao.selectRuleByEmrCode(code);
-        // 如果质控的list为空就可以创建
-        if (ListUtil.isBlank(ruleList)) {
-            ruleVerify.setFlag(false);
-            return ResultVoUtil.success(ruleVerify);
-        }
-        for (EmrRule item : ruleList) {
-            String sql = item.getSql().replace("${PATNO}", "'" + patNo + "'")
-                    .replace("${TIMES}", "'" + times + "'");
-            Map<String, Object> executeSql = dao.executeSql(sql);
-            if (executeSql == null) {
-                continue;
-            }
-            boolean whetherToTimeOut = false;
-            if (doctorLevel == 1) {
-                whetherToTimeOut = DateUtil.moreThanHours((Date) executeSql.get("date"), item.getPrescription());
-                ruleVerify.setFlag(whetherToTimeOut);
-            }
-            if (doctorLevel > 1) {
-                whetherToTimeOut = DateUtil.moreThanHours((Date) executeSql.get("date"), item.getSuperiorDoctorTime());
-            }
-            ruleVerify.setFlag(whetherToTimeOut);
-            ruleVerify.setMessage(item.getPromptStatement());
-            break;
-        }
-
-        log.info("ruleList:{}", JSON.toJSONString(ruleList));
-        return ResultVoUtil.success(ruleVerify);
-    }
-
-
     @Transactional(rollbackFor = Exception.class)
     public ResultVo<String> requestToUnlockMedicalRecords(EmrLimitUnlock param) {
         param.setApplicant(TokenUtil.getInstance().getTokenUserId());
@@ -207,7 +118,4 @@ public class EmrControlRuleSever {
         return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
     }
 
-    public ResultVo<EmrLimitUnlock> getMyUnlockByPatNo(String patNo, Integer times) {
-        return ResultVoUtil.success(dao.selectMyUnlockReqByPatNo(patNo, times, TokenUtil.getInstance().getTokenUserId()));
-    }
 }

+ 0 - 40
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/emr/EmrControlRuleSeverV2.java

@@ -46,20 +46,6 @@ public class EmrControlRuleSeverV2 {
         return dao.queryEmrRulePatient(qw, "zy_actpatient");
     }
 
-    /**
-     * 环节质控
-     *
-     * @param start
-     * @param end
-     * @return
-     */
-    public ResultVo<JSONObject> specifyAdmissionQualityControl(String start, String end) {
-        List<QualityControlAnalysisOfMedicalRecords> patInfo = dao.selectSuggestionByTimeAndFinalControl(start, end, 0, " ");
-        if (ListUtil.isBlank(patInfo)) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有查询到患者信息。");
-        }
-        return ResultVoUtil.success(qualityControlOfMedicalRecords(patInfo, null, 0));
-    }
 
     public ResultVo<List<EmrAuditDetail>> myPatientQualityControl() {
         List<EmrAuditDetail> list = dao.getUnprocessedRecommendationsByDoctor(TokenUtil.getInstance().getTokenUserId());
@@ -426,32 +412,6 @@ public class EmrControlRuleSeverV2 {
     }
 
 
-    public ResultVo<List<QualityControlAnalysisOfMedicalRecords>> terminalPatients(FinalQuery param) {
-
-        StringBuilder sql = new StringBuilder();
-
-        sql.append(" where 1=1 ");
-        if (ListUtil.notBlank(param.getDeptCode())) {
-            String deptList = "(" + param.getDeptCode().stream().map(s -> "'" + s + "'").collect(Collectors.joining(",")) + ")";
-
-            sql.append(" and small_dept in ").append(deptList);
-        }
-
-        if (StringUtil.notBlank(param.getTubeBedDoctor())) {
-            sql.append(" and refer_physician = ").append("'").append(param.getTubeBedDoctor()).append("'");
-        }
-
-        List<QualityControlAnalysisOfMedicalRecords> list = dao.selectSuggestionByTimeAndFinalControl(param.getStartDate(), param.getEndDate(), 1, sql.toString());
-
-        if (ListUtil.isBlank(list)) {
-            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
-        }
-        JSONObject temp = qualityControlOfMedicalRecords(list, param.getSocketId(), 1);
-        if (temp == null) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "连接断开循环终止。");
-        }
-        return ResultVoUtil.success(list);
-    }
 
     /**
      * 设置患者附加的信息