Browse Source

病案首页上传发送更多消息

lighter 2 years ago
parent
commit
14b11e4a4e

+ 7 - 2
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiManageDao.java

@@ -4,7 +4,6 @@ import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
-import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
 import thyyxxk.webserver.entity.inpatient.patient.Overview;
 import thyyxxk.webserver.entity.medicalinsurance.manage.InstSetlLdgChkBrf;
 import thyyxxk.webserver.entity.medicalinsurance.manage.clinicinfo.ClinicDiseinfo;
@@ -74,7 +73,10 @@ public interface SiManageDao {
             "gender=(case when sex=1 then '男' else '女' end), " +
             "birth_date,nation=(select rtrim(name) from zd_nation_code where code=nation), " +
             "native_place_name,social_no,live_place_combo,phone, " +
-            "admiss_date,admiss_dept,dismiss_date,dismiss_dept,admiss_days " +
+            "admiss_date,admiss_dept,dismiss_date,dismiss_dept,admiss_days, " +
+            "dept_leader,dept_leader_name,leader_doctor,leader_doctor_name,main_doctor,main_doctor_name, " +
+            "admiss_doctor,admiss_doctor_name,duty_nurse,duty_nurse_name,coder,coder_name,quality_control_doctor, " +
+            "quality_control_doctor_name,quality_control_nurse,quality_control_nurse_name " +
             "from t_case_frontsheet_main where dismiss_date >= #{begin} " +
             "and dismiss_date <= #{end} and isnull(med_type,'01') not in ('01','42') " +
             "<if test=\"status != -1 \">" +
@@ -175,6 +177,9 @@ public interface SiManageDao {
             "from t_case_frontsheet_disdiag where bah=#{patNo} and times=#{times}")
     List<Diseinfo> selectFrontSheetDiseInfo(@Param("patNo") String patNo, @Param("times") int times);
 
+    @Update("update t_case_frontsheet_main set uploaded_flag=1 where bah=#{patNo} and admiss_times=#{times}")
+    void updateFrontSheetUploadedFlag(@Param("patNo") String patNo, @Param("times") int times);
+
     @Select("select mdtrtSn='H43010500370'+rtrim(a.inpatient_no)+'_'+cast(a.admiss_times as varchar), " +
             "mdtrtId=(select top 1 mdtrt_id from t_si_pat_info where " +
             "pat_no=a.inpatient_no and times=a.admiss_times and mdtrt_id is not null and med_type!='42' ), " +

+ 48 - 0
src/main/java/thyyxxk/webserver/entity/medicalinsurance/manage/frontsheet/BriefSheet.java

@@ -28,4 +28,52 @@ public class BriefSheet {
     private Date dismissDate;
     private String dismissDept;
     private String admissDays;
+    /**
+     * 科室主任
+     */
+    private String deptLeader;
+    private String deptLeaderName;
+
+    /**
+     * 主任(副主任)医师
+     */
+    private String leaderDoctor;
+    private String leaderDoctorName;
+
+    /**
+     * 主治医师
+     */
+    private String mainDoctor;
+    private String mainDoctorName;
+
+    /**
+     * 住院医师
+     */
+    private String admissDoctor;
+    private String admissDoctorName;
+
+    /**
+     * 责任护士
+     */
+    private String dutyNurse;
+    private String dutyNurseName;
+
+    /**
+     * 编码员
+     */
+    private String coder;
+    private String coderName;
+
+
+    /**
+     * 质控医师
+     */
+    private String qualityControlDoctor;
+    private String qualityControlDoctorName;
+
+    /**
+     * 质控护士
+     */
+    private String qualityControlNurse;
+    private String qualityControlNurseName;
 }

+ 18 - 4
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiManageService.java

@@ -16,7 +16,6 @@ import thyyxxk.webserver.dao.his.medicalinsurance.SiLogDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.SiManageDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.SiSetlinfoDao;
 import thyyxxk.webserver.entity.ResultVo;
-import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
 import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.medicalinsurance.log.SiLog;
 import thyyxxk.webserver.entity.medicalinsurance.manage.*;
@@ -626,6 +625,7 @@ public class SiManageService {
             BriefSheet sheet = list.get(i);
             ResultVo<String> uploadRes = uploadFrontSheet(sheet.getPatNo(), sheet.getTimes());
             if (uploadRes.getCode() == ExceptionEnum.SUCCESS.getCode()) {
+                dao.updateFrontSheetUploadedFlag(sheet.getPatNo(), sheet.getTimes());
                 sendUploadSheetErrorMessage(sheet, uploadRes.getData(), 0, (i + 1), total);
             } else {
                 sendUploadSheetErrorMessage(sheet, uploadRes.getMessage(), 1, (i + 1), total);
@@ -660,7 +660,7 @@ public class SiManageService {
             oprninfos.add(oprninfo);
         }
         for (Oprninfo oprninfo : oprninfos) {
-            oprninfo.setIptMedcasHmpgSn(diseinfos.get(0).getIptMedcasHmpgSn());
+            oprninfo.setIptMedcasHmpgSn(patNo + "_" + times + "_" + oprninfo.getOprnOprtSn());
             oprninfo.setMdtrtSn(diseinfos.get(0).getMdtrtSn());
         }
         String oprn = JSONArray.toJSONString(oprninfos);
@@ -680,8 +680,22 @@ public class SiManageService {
         obj.put("times#住院次数|3", sheet.getTimes());
         obj.put("dismissDate#出院时间|4", DateUtil.formatDatetime(sheet.getDismissDate()));
         obj.put("dismissDept#出院科室|5", sheet.getDismissDept());
-        obj.put("message#上传结果|6", msg.length() > 2000 ? msg.substring(0, 2000) : msg);
-        obj.put("type#类型|7", type);
+        obj.put("deptLeader#科室主任编码|6", sheet.getDeptLeader());
+        obj.put("deptLeaderName#科室主任姓名|7", sheet.getDeptLeaderName());
+        obj.put("leaderDoctor#主任(副主任)医师编码|8", sheet.getLeaderDoctor());
+        obj.put("leaderDoctorName#主任(副主任)医师姓名|9", sheet.getLeaderDoctorName());
+        obj.put("mainDoctor#主治医师编码|10", sheet.getMainDoctor());
+        obj.put("mainDoctorName#主治医师姓名|11", sheet.getMainDoctorName());
+        obj.put("admissDoctor#住院医师编码|12", sheet.getAdmissDoctor());
+        obj.put("admissDoctorName#住院医师姓名|13", sheet.getAdmissDoctorName());
+        obj.put("dutyNurse#责任护士编码|14", sheet.getDutyNurse());
+        obj.put("dutyNurseName#责任护士姓名|15", sheet.getDutyNurseName());
+        obj.put("qualityControlDoctor#质控医师编码|18", sheet.getQualityControlDoctor());
+        obj.put("qualityControlDoctorName#质控医师姓名|19", sheet.getQualityControlDoctorName());
+        obj.put("qualityControlNurse#质控护士编码|20", sheet.getQualityControlNurse());
+        obj.put("qualityControlNurseName#质控护士姓名|21", sheet.getQualityControlNurseName());
+        obj.put("message#上传结果|22", msg.length() > 500 ? msg.substring(0, 500) : msg);
+        obj.put("type#类型|23", type);
         obj.put("total", total);
         obj.put("index", index);
         obj.put("jdtType", "upload");