Просмотр исходного кода

湘雅三院根据住院号历史数据拉取更改

shiyue 3 лет назад
Родитель
Сommit
de9ee311d9

+ 15 - 4
src/main/java/com/diagbot/facade/ViewFacade.java

@@ -150,13 +150,16 @@ public class ViewFacade {
      * 根据住院号来拉取历史数据
      *
      * @param behospitalCode
-     * @param behospitalNum
      */
-    public void executeOldDataOne(String behospitalCode, String behospitalNum) {
+    public String executeOldDataOne(String behospitalCode) {
+        //分割住院号与住院次数
+        String hospitalCode = behospitalCode.substring(0, behospitalCode.indexOf("_"));
+        String hospitalNum = behospitalCode.substring(hospitalCode.length() + 1, behospitalCode.length());
         //获取入院登记表中的信息
-        String infoSql = "select * from admission_pat_regist where behospitalCode = '" + behospitalCode + "' and behospitalNum = '" + behospitalNum + "'";
+        String infoSql = "select * from admission_pat_regist where behospitalCode = '" + hospitalCode + "' and behospitalNum = '" + hospitalNum + "'";
         List<BehospitalInfo> behospitalInfoList = this.getInfo(infoSql);
         this.a(behospitalInfoList);
+        return "true";
     }
 
     /**
@@ -210,6 +213,14 @@ public class ViewFacade {
                 //获取病人医嘱
                 String doctorAdviceSql = "select * from doctor_order where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
                 this.getDoctorAdvice(doctorAdviceSql);
+
+                //获取化验信息和相应的化验结果并添加修改
+                String lisSql="select * from ASSAY_LIST where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
+                this.getLisInfo(lisSql);
+
+                //获取检查信息和相应的检查结果并添加修改
+                String pacsSql ="select * from CHECK_LIST where behospitalCode= '" + hospitalCode + "' and behospitalnum= '" + hospitalNum + "'";
+                this.getPacsInfo(pacsSql);
             });
         }
     }
@@ -566,7 +577,7 @@ public class ViewFacade {
                     aMedicalRecordFacade.remove(new QueryWrapper<MedicalRecord>()
                             .eq("behospital_code", code)
                             .eq("hospital_id", Long.valueOf("35")));
-                    this.executeOldDataOne(hospitalCode, hospitalNum);
+                    this.executeOldDataOne(code);
                     aMedAbnormalInfoFacade.saveAbnormalInfo("补传数据成功", code, "视图文书数量为" + count, "本地数量为" + myCount, "");
                 }
             }

+ 2 - 2
src/main/java/com/diagbot/web/DataController.java

@@ -237,8 +237,8 @@ public class DataController {
     @ApiOperation(value = "数据引擎-历史数据拉取(住院号)")
     @PostMapping("/sendDataOldOne")
     @SysLogger("sendDataOldOne")
-    public void sendDataOldOne(String behospitalCode,String behospitalNum){
-        viewFacade.executeOldDataOne(behospitalCode,behospitalNum);
+    public RespDTO<String> sendDataOldOne(String behospitalCode){
+        return RespDTO.onSuc(viewFacade.executeOldDataOne(behospitalCode));
     }
 
     @ApiOperation(value = "数据引擎-历史数据拉取(出院时间)")