Browse Source

修改名称以及修复电子病历强制改变值的问题

xiaochan 2 years ago
parent
commit
a78e3298c0

+ 7 - 1
src/main/java/thyyxxk/webserver/controller/inpatient/PatientController.java

@@ -27,7 +27,7 @@ public class PatientController {
     @GetMapping("/getOverView")
     public ResultVo<List<Overview>> getOverView(@RequestParam("ward") String ward,
                                                 @RequestParam("viewBabies") Boolean viewBabies) {
-        return service.getOverView(ward,viewBabies);
+        return service.getOverView(ward, viewBabies);
     }
 
     @GetMapping("/getInfo")
@@ -41,6 +41,12 @@ public class PatientController {
         return service.getDisPatient(patNo, times);
     }
 
+    @GetMapping("/getPatientAll")
+    public ResultVo<Patient> getPatientAll(@RequestParam("patNo") String patNo,
+                                           @RequestParam("times") Integer times) {
+        return service.getPatientAll(patNo, times);
+    }
+
     @GetMapping("/getDisDiag")
     public ResultVo<HashMap<String, Object>> getYbDiag(@RequestParam("inpatientNo") String inpatientNo,
                                                        @RequestParam("admissTimes") Integer admissTimes) {

+ 14 - 6
src/main/java/thyyxxk/webserver/service/inpatient/PatientService.java

@@ -78,7 +78,7 @@ public class PatientService {
                 if (parentRegion == 100000) {
                     parentRegion = data.getAdmdvs();
                 }
-                data.setAdmdvsCascader(new Integer[] { parentRegion, data.getAdmdvs() });
+                data.setAdmdvsCascader(new Integer[]{parentRegion, data.getAdmdvs()});
             }
         }
         setExpenseInformation(data);
@@ -95,12 +95,21 @@ public class PatientService {
         return ResultVoUtil.success(data);
     }
 
-    public Patient getPatientBaseInfo(String inpatientNo,Integer times,String inOutStatusFlag){
+    public ResultVo<Patient> getPatientAll(String inpatientNo, Integer times) {
+        Patient data = dao.getPatientInfo(inpatientNo, "view_zy_patient_all", times);
+        if (null == data) {
+            return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有住院号【" + inpatientNo + "】住院业务!");
+        }
+        setExpenseInformation(data);
+        return ResultVoUtil.success(data);
+    }
+
+    public Patient getPatientBaseInfo(String inpatientNo, Integer times, String inOutStatusFlag) {
 
-        Patient data = dao.getPatientInfo(inpatientNo, "1".equals(inOutStatusFlag) ? "zy_inactpatient":"zy_actpatient", times);
-        String msg ="1".equals(inOutStatusFlag)? "出院":"在院";
+        Patient data = dao.getPatientInfo(inpatientNo, "1".equals(inOutStatusFlag) ? "zy_inactpatient" : "zy_actpatient", times);
+        String msg = "1".equals(inOutStatusFlag) ? "出院" : "在院";
         if (null == data) {
-            throw  new BizException(ExceptionEnum.LOGICAL_ERROR,"没有住院号【" + inpatientNo + "】的"+msg +"业务!");
+            throw new BizException(ExceptionEnum.LOGICAL_ERROR, "没有住院号【" + inpatientNo + "】的" + msg + "业务!");
         }
         setExpenseInformation(data);
         return data;
@@ -206,7 +215,6 @@ public class PatientService {
     }
 
 
-
     /**
      * 设置患者费用信息
      *