Explorar el Código

优化代码和添加查询手术的接口

xiaochan hace 2 años
padre
commit
52296f8649

+ 7 - 0
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/emr/EmrController.java

@@ -14,6 +14,7 @@ import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrPatientData;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.MedicalHistoryPrompts;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.YzTemperatureParam;
 import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
+import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;
 import thyyxxk.webserver.service.zhuyuanyisheng.emr.EmrServer;
 import thyyxxk.webserver.utils.StringUtil;
 
@@ -261,4 +262,10 @@ public class EmrController {
         return server.getFluorescenceSpecimenResult(patNo, times);
     }
 
+
+    @GetMapping("/getOpRecordList")
+    public ResultVo<List<OpRecord>> getOpRecordList(@RequestParam("patNo") String patNo,
+                                                    @RequestParam("times") Integer times) {
+        return server.getOpRecordList(patNo, times);
+    }
 }

+ 0 - 2
src/main/java/thyyxxk/webserver/dao/his/settings/SettingsDao.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.*;
-import thyyxxk.webserver.aop.interfaces.SqlStringIsBlakToNull;
 import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.login.UserInfo;
 import thyyxxk.webserver.entity.login.VueMenu;
@@ -201,7 +200,6 @@ public interface SettingsDao {
     @Select("select count(1) from a_employee_mi where code_rs = #{codeRs}")
     int doesThePersonnelNumberExist(String codeRs);
 
-    @SqlStringIsBlakToNull
     @Insert("insert into a_employee_mi (code, name, code_rs, emp_tit_code, emp_po_code, yb_code, " +
             "                           dept_code, mark, ifcadre, order_yn, ysjb, " +
             "                           gh_charge_type, login_flag, doctor_xz_yp, del_flag, " +

+ 118 - 24
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/emr/EmrPatientDao.java

@@ -9,6 +9,7 @@ import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyPatientInfo;
 import thyyxxk.webserver.entity.zhuyuanyisheng.ZyZkList;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.*;
 import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
+import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;
 
 import java.util.List;
 import java.util.Map;
@@ -380,30 +381,30 @@ public interface EmrPatientDao {
     @Select("select * from emr_patient_data")
     List<EmrPatientData> 查询历史数据();
 
-    @Select("select id,\n" +
-            "       pat_no,\n" +
-            "       times,\n" +
-            "       emr_document_id,\n" +
-            "       emr_category_code,\n" +
-            "       del_flag,\n" +
-            "       emr_name,\n" +
-            "       name,\n" +
-            "       create_id,\n" +
-            "       create_date,\n" +
-            "       modify_id,\n" +
-            "       modify_date,\n" +
-            "       submit,\n" +
-            "       parent,\n" +
-            "       sort,\n" +
-            "       refer_physician,\n" +
-            "       consult_physician,\n" +
-            "       dept_director,\n" +
-            "       submit_id,\n" +
-            "       review_doctors,\n" +
-            "       review_time,\n" +
-            "       submit_time\n" +
-            "from emr_patient_data\n" +
-            "where pat_no = #{patNo}\n" +
+    @Select("select id, " +
+            "       pat_no, " +
+            "       times, " +
+            "       emr_document_id, " +
+            "       emr_category_code, " +
+            "       del_flag, " +
+            "       emr_name, " +
+            "       name, " +
+            "       create_id, " +
+            "       create_date, " +
+            "       modify_id, " +
+            "       modify_date, " +
+            "       submit, " +
+            "       parent, " +
+            "       sort, " +
+            "       refer_physician, " +
+            "       consult_physician, " +
+            "       dept_director, " +
+            "       submit_id, " +
+            "       review_doctors, " +
+            "       review_time, " +
+            "       submit_time " +
+            "from emr_patient_data " +
+            "where pat_no = #{patNo} " +
             "  and times <> #{times} " +
             "  and del_flag = 0 ")
     List<EmrPatientData> getHisPatInfo(String patNo, Integer times);
@@ -431,4 +432,97 @@ public interface EmrPatientDao {
     List<FluorescenceSpecimenResult> selectFluorescenceSpecimenResult(String patNo,
                                                                       Integer times);
 
+
+    @Select("select a.record_id, " +
+            "       a.zy_serial_no, " +
+            "       a.op_times, " +
+            "       patient_name, " +
+            "       dept_code, " +
+            "       ward_code, " +
+            "       apply_date, " +
+            "       apply_user, " +
+            "       apply_doc, " +
+            "       schedule_date, " +
+            "       schedule_user, " +
+            "       status, " +
+            "       patient_type, " +
+            "       act_order_no, " +
+            "       op_code, " +
+            "       op_name, " +
+            "       op_datetime, " +
+            "       room_code, " +
+            "       op_group_code, " +
+            "       hocus_code, " +
+            "       hocus_name        = (select rtrim(name) from zd_anaesthesia where zd_anaesthesia.code = hocus_code), " +
+            "       diag_before_op, " +
+            "       diag_after_op, " +
+            "       infection_flag, " +
+            "       urgent_clinic_flag, " +
+            "       avocation_flag, " +
+            "       blood_amount, " +
+            "       blood_type, " +
+            "       op_stastics_id, " +
+            "       isolation_indicator, " +
+            "       op_scale, " +
+            "       op_endtime, " +
+            "       diag_before_code, " +
+            "       diag_after_code, " +
+            "       hbsag, " +
+            "       body_code, " +
+            "       part_code, " +
+            "       specialreq_code, " +
+            "       instrument_code, " +
+            "       aspesis_scale, " +
+            "       remark, " +
+            "       op_dept, " +
+            "       input_id, " +
+            "       input_date, " +
+            "       req_id, " +
+            "       req_date, " +
+            "       last_modify_id, " +
+            "       arrange_id, " +
+            "       arrange_date, " +
+            "       inpatient_no, " +
+            "       admiss_times, " +
+            "       cancel_id, " +
+            "       cancel_time, " +
+            "       sstc, " +
+            "       bed_no, " +
+            "       tw_flag, " +
+            "       ssbc, " +
+            "       ssyz_flag, " +
+            "       status_flag, " +
+            "       ward_dept, " +
+            "       op_start_date, " +
+            "       op_end_date, " +
+            "       anst_start_date, " +
+            "       anst_end_date, " +
+            "       arrangement_executed, " +
+            "       preoperative_visit, " +
+            "       preoperative_preparation, " +
+            "       doctor_zd, " +
+            "       doctor_zd_name    = (select rtrim(name) from a_employee_mi where code = doctor_zd), " +
+            "       doctor_wp, " +
+            "       doctor_1, " +
+            "       doctor_1_name     = (select rtrim(name) from a_employee_mi where code = doctor_1), " +
+            "       doctor_2, " +
+            "       doctor_2_name     = (select rtrim(name) from a_employee_mi where code = doctor_2), " +
+            "       doctor_3, " +
+            "       doctor_3_name     = (select rtrim(name) from a_employee_mi where code = doctor_3), " +
+            "       doctor_mz, " +
+            "       nurse_xh, " +
+            "       nurse_xh_name     = (select rtrim(name) from a_employee_mi where code = nurse_xh), " +
+            "       nurse_qx, " +
+            "       nurse_qx_name     = (select rtrim(name) from a_employee_mi where code = nurse_qx), " +
+            "       doctor_mz_hs, " +
+            "       doctor_mz_ys, " +
+            "       doctor_mz_ys_name = (select rtrim(name) from a_employee_mi where code = doctor_mz_ys), " +
+            "       nurse_qx_name     = (select rtrim(name) from a_employee_mi where code = nurse_qx), " +
+            "       doctor_zd_sj " +
+            "from op_record a " +
+            "         left join op_record_join b on (a.record_id = b.record_id) " +
+            "where inpatient_no = #{patNo} " +
+            "  and admiss_times = #{times}")
+    List<OpRecord> getOpRecordList(String patNo, Integer times);
+
 }

+ 5 - 2
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/emr/EmrAuditDetail.java

@@ -11,12 +11,12 @@ import java.util.Date;
 @Accessors(chain = true)
 public class EmrAuditDetail implements Serializable {
 
+    private static final long serialVersionUID = 3711491177934905816L;
+
     private String patNo;
     private Integer times;
     private String patName;
 
-    private static final long serialVersionUID = 3711491177934905816L;
-
     /**
      * id
      */
@@ -94,6 +94,9 @@ public class EmrAuditDetail implements Serializable {
      */
     private Boolean matching = false;
 
+    /**
+     * 是否为终末质控
+     */
     private Integer finalControl;
 
     public String getScoringCriteriaName() {

+ 6 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/emr/EmrServer.java

@@ -27,6 +27,7 @@ import thyyxxk.webserver.entity.medicalinsurance.inpatient.ZyPatientInfo;
 import thyyxxk.webserver.entity.zhuyuanyisheng.ZyZkList;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.*;
 import thyyxxk.webserver.entity.zhuyuanyisheng.jianyanjiancha.YshYjReq;
+import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;
 import thyyxxk.webserver.service.PublicServer;
 import thyyxxk.webserver.service.externalhttp.emr.EmrEditor;
 import thyyxxk.webserver.service.redislike.RedisLikeService;
@@ -892,4 +893,9 @@ public class EmrServer {
         return ResultVoUtil.success(dao.selectFluorescenceSpecimenResult(patNo, times));
     }
 
+    public ResultVo<List<OpRecord>> getOpRecordList(String patNo, Integer times) {
+        return ResultVoUtil.success(dao.getOpRecordList(patNo, times));
+    }
+
+
 }