浏览代码

患者信息查询

xiaochan 1 年之前
父节点
当前提交
0cb31ff6f5

+ 3 - 0
src/main/java/thyyxxk/webserver/controller/inpatient/ChargeListController.java

@@ -2,6 +2,7 @@ package thyyxxk.webserver.controller.inpatient;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import thyyxxk.webserver.config.auth.PassToken;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.inpatient.chargelist.BriefPatInfo;
@@ -38,6 +39,7 @@ public class ChargeListController {
     }
 
     @PostMapping("/selectBriefPatInfo")
+    @PassToken
     public ResultVo<BriefPatInfo> selectBriefPatInfo(@RequestBody PatOverview overview) {
         BriefPatInfo result = service.selectBriefPatInfo(overview);
         if (null == result) {
@@ -47,6 +49,7 @@ public class ChargeListController {
     }
 
     @PostMapping("/selectChargeList")
+    @PassToken
     public ResultVo<Map<String, Object>> selectChargeList(@RequestBody PatOverview overview) {
         Map<String, Object> resultMap = service.selectChargeList(overview);
         if (null == resultMap || resultMap.isEmpty()) {

+ 3 - 1
src/main/java/thyyxxk/webserver/controller/inpatient/casefrontsheet/CaseFrontSheetController.java

@@ -35,11 +35,13 @@ public class CaseFrontSheetController {
     }
 
     @GetMapping("/getAllDictionary")
+    @PassToken
     public ResultVo<Map<String, List<CodeName>>> getAllDictionary() {
         return service.getAllDictionary();
     }
 
     @GetMapping("/resetDictionary")
+    @PassToken
     public ResultVo<String> resetDictionary() {
         return service.resetDictionary();
     }
@@ -245,7 +247,7 @@ public class CaseFrontSheetController {
 
     @GetMapping("/getLendOutDetail")
     public ResultVo<LendOutRequest> getLendOutDetail(@RequestParam("bah") String bah,
-                                                         @RequestParam("times") int times) {
+                                                     @RequestParam("times") int times) {
         LendOutRequest request = service.getLendOutDetail(bah, times);
         if (null == request) {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);

+ 35 - 1
src/main/java/thyyxxk/webserver/controller/view/Patient360Controller.java

@@ -3,12 +3,20 @@ package thyyxxk.webserver.controller.view;
 import com.alibaba.fastjson.JSONObject;
 import org.springframework.web.bind.annotation.*;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
+import thyyxxk.webserver.entity.casefrontsheet.JieShouHuiZhenPojo;
+import thyyxxk.webserver.entity.casefrontsheet.YshHzRecord;
+import thyyxxk.webserver.entity.casefrontsheet.request.SheetOverview;
 import thyyxxk.webserver.entity.view.patient360.MedicalTrack;
 import thyyxxk.webserver.entity.view.patient360.PatientInfo360;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.EmrPatientData;
 import thyyxxk.webserver.entity.zhuyuanyisheng.emr.YzTemperatureParam;
 import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.XinZhenYzActOrder;
+import thyyxxk.webserver.service.inpatient.casefrontsheet.CaseFrontSheetMainService;
+import thyyxxk.webserver.service.inpatient.casefrontsheet.JieShouHuiZhenService;
 import thyyxxk.webserver.service.view.Patient360Server;
+import thyyxxk.webserver.service.zhuyuanyisheng.HuiZhenShenQingService;
+import thyyxxk.webserver.utils.ResultVoUtil;
 
 import java.util.List;
 
@@ -17,9 +25,17 @@ import java.util.List;
 @RequestMapping("/patient360")
 public class Patient360Controller {
     private final Patient360Server server;
+    private final CaseFrontSheetMainService caseFrontSheetMainService;
 
-    public Patient360Controller(Patient360Server server) {
+    private final HuiZhenShenQingService hzService;
+
+    private final JieShouHuiZhenService jshzService;
+
+    public Patient360Controller(Patient360Server server, CaseFrontSheetMainService caseFrontSheetMainService, HuiZhenShenQingService hzService, JieShouHuiZhenService jshzService) {
         this.server = server;
+        this.caseFrontSheetMainService = caseFrontSheetMainService;
+        this.hzService = hzService;
+        this.jshzService = jshzService;
     }
 
     @GetMapping("/getMedicalTrack")
@@ -45,5 +61,23 @@ public class Patient360Controller {
         return server.getEmrData(p);
     }
 
+    @PostMapping("/hosp/getSheetInfo")
+    public ResultVo<CaseFrontsheetMain> getPatientInfo(@RequestBody SheetOverview overview) {
+        return ResultVoUtil.success(caseFrontSheetMainService.getPatientInfo(overview));
+    }
+
+    @GetMapping("/hosp/hzInfo")
+    public ResultVo<List<YshHzRecord>> chaKanHuiZhenShenQing(@RequestParam("inpatientNo") String inpatientNo,
+                                                             @RequestParam("admissTimes") Integer admissTimes) {
+        return hzService.chaKanHuiZhenShenQing(inpatientNo, admissTimes);
+    }
+
+    @GetMapping("/hosp/hzDetails")
+    public ResultVo<JieShouHuiZhenPojo> getHuanZheXinXi(@RequestParam("admissTimes") Integer admissTimes,
+                                                        @RequestParam("reqTimes") Integer reqTimes,
+                                                        @RequestParam("inpatientNo") String inpatientNo) {
+        return jshzService.getHuanZheXinXi(admissTimes, reqTimes, inpatientNo);
+    }
+
 
 }

+ 2 - 1
src/main/java/thyyxxk/webserver/controller/zhuyuanyizheng/HuiZhenShenQingController.java

@@ -48,7 +48,8 @@ public class HuiZhenShenQingController {
     }
 
     @GetMapping("/chaKanHuiZhenShenQing")
-    public ResultVo<List<YshHzRecord>> chaKanHuiZhenShenQing(String inpatientNo, int admissTimes) {
+    public ResultVo<List<YshHzRecord>> chaKanHuiZhenShenQing(@RequestParam("inpatientNo") String inpatientNo,
+                                                             @RequestParam("admissTimes") Integer admissTimes) {
         return service.chaKanHuiZhenShenQing(inpatientNo, admissTimes);
     }
 

+ 6 - 0
src/main/java/thyyxxk/webserver/dao/his/inpatient/ChargeListDao.java

@@ -40,6 +40,12 @@ public interface ChargeListDao {
             "execute dbo.zy_cxtj_mxqd_new #{patNo},#{times}")
     List<ChargeItem> selectChargeList(String patNo, int times);
 
+    @Select("execute dbo.zy_cxtj_mxqd_new #{patNo},#{times}")
+    List<ChargeItem> selectChargeList2(String patNo, int times);
+
+    @Select("select count(1) from zy_actpatient where inpatient_no=#{patNo} and admiss_times=#{times}")
+    Integer isDischargedPatients(String patNo, int times);
+
     @Select("select count(1) from zy_actpatient where inpatient_no=#{patNo} and admiss_times=#{times}")
     int selectInhospCount(String patNo, int times);
 

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -178,7 +178,7 @@ public interface YiZhuLuRuDao {
             "    parent_no_c=           -1000, " +
             "                           reg_flag, " +
             "    parent_flag='', " +
-            "                           yb_self_flag, " +
+            "                           rtrim(yb_self_flag) as yb_self_flag, " +
             "                           kf_flag, " +
             "                           refer_physician, " +
             "                           consult_physician, " +

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/zhuyuanyisheng/yizhuluru/XinZhenYzActOrder.java

@@ -403,4 +403,8 @@ public class XinZhenYzActOrder {
         return "";
     }
 
+    public String getYbSelfFlagName() {
+        if ("1".equals(ybSelfFlag)) return "是";
+        return "否";
+    }
 }

+ 8 - 1
src/main/java/thyyxxk/webserver/service/inpatient/ChargeListService.java

@@ -65,7 +65,14 @@ public class ChargeListService {
     }
 
     public Map<String, Object> selectChargeList(PatOverview overview) {
-        List<ChargeItem> chargeList = dao.selectChargeList(overview.getPatNo(), overview.getTimes());
+
+        List<ChargeItem> chargeList;
+        if (dao.isDischargedPatients(overview.getPatNo(), overview.getTimes()) > 0) {
+            chargeList = dao.selectChargeList(overview.getPatNo(), overview.getTimes());
+        } else {
+            chargeList = dao.selectChargeList2(overview.getPatNo(), overview.getTimes());
+        }
+
         Map<String, List<ChargeItem>> chargeListMap = new HashMap<>();
         Map<String, BigDecimal> sumsTempMap = new HashMap<>();
         sumsTempMap.put("总计", BigDecimal.ZERO);