Переглянути джерело

update
修改疼痛评价结构

18339543638 4 місяців тому
батько
коміт
d2e56a5be7

+ 4 - 3
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/AppClinicRoomController.java

@@ -6,6 +6,7 @@ import cn.tr.core.validation.Insert;
 import cn.tr.module.smart.app.controller.dto.AppDoctorClinicFinishDTO;
 import cn.tr.module.smart.app.controller.dto.AppDoctorClinicQueryByPatientCodeDTO;
 import cn.tr.module.smart.app.controller.dto.AppDoctorClinicRoomDTO;
+import cn.tr.module.smart.app.controller.vo.AppDoctorInfusionHistoryVO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorClinicRoomThumbnailVO;
 import cn.tr.module.smart.app.controller.vo.DoctorClinicRoomVO;
 import cn.tr.module.smart.common.service.IBizClinicRoomService;
@@ -52,9 +53,9 @@ public class AppClinicRoomController extends BaseController {
 
     @ApiOperationSupport(author = "wangzl", order = 3)
     @ApiOperation(value = "输注信息", notes = "权限: 无")
-    @GetMapping("/infuse/{clinicId}")
-    public CommonResult<Object> getInfuseInfo(@PathVariable String clinicId) {
-        return CommonResult.success();
+    @GetMapping("/infusion/{clinicId}")
+    public CommonResult<AppDoctorInfusionHistoryVO> getInfuseInfo(@PathVariable("clinicId") String clinicId) {
+        return CommonResult.success(clinicRoomService.selectByClinicRoomAndPatientByClinicId(clinicId));
     }
 
     @ApiOperationSupport(author = "wangzl", order = 4)

+ 180 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/vo/AppDoctorInfusionHistoryVO.java

@@ -0,0 +1,180 @@
+package cn.tr.module.smart.app.controller.vo;
+
+import cn.tr.plugin.mybatis.pojo.TenantPO;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 输注-输注历史记录表实体
+ *
+ * @author lf
+ * @date  2025/08/05 10:31
+ **/
+@Data
+@ToString
+public class AppDoctorInfusionHistoryVO implements Serializable {
+
+    /** 主键 */
+    @ApiModelProperty(value = "主键", position = 1)
+    private String id;
+
+    /** 设备唯一编码 */
+    @ApiModelProperty(value = "设备唯一编码", position = 2)
+    private String deviceId;
+
+    /** 设备数据标识 */
+    @ApiModelProperty(value = "设备数据标识", position = 3)
+    private String classification;
+
+    /** 输注过程中的数据编号 */
+    @ApiModelProperty(value = "输注过程中的数据编号", position = 4)
+    private Integer dataNum;
+
+    /** 住院号(设备上传的住院号) */
+    @ApiModelProperty(value = "住院号(设备上传的住院号)", position = 5)
+    private String patientCode;
+
+    /** 总量 */
+    @ApiModelProperty(value = "总量", position = 6)
+    private Integer totalDose;
+
+    /** 公共-首次量 */
+    @ApiModelProperty(value = "公共-首次量", position = 7)
+    private Integer firstDose;
+
+    /** 公共-剩余量 */
+    @ApiModelProperty(value = "公共-剩余量", position = 8)
+    private BigDecimal remainDose;
+
+    /** 公共-已输入量 */
+    @ApiModelProperty(value = "公共-已输入量", position = 9)
+    private BigDecimal inputDose;
+
+    /** 公共-追加量 */
+    @ApiModelProperty(value = "公共-追加量", position = 10)
+    private BigDecimal appendDose;
+
+    /** 公共-追加锁时 */
+    @ApiModelProperty(value = "公共-追加锁时", position = 11)
+    private BigDecimal appendLockTime;
+
+    /** 公共-极限量 */
+    @ApiModelProperty(value = "公共-极限量", position = 12)
+    private BigDecimal maxDose;
+
+    /** 公共-自控次数 */
+    @ApiModelProperty(value = "公共-自控次数", position = 13)
+    private Integer selfControlCount;
+
+    /** 公共-自控锁时 */
+    @ApiModelProperty(value = "公共-自控锁时", position = 14)
+    private BigDecimal selfControlLockTime;
+
+    /** 公共-有效次数 */
+    @ApiModelProperty(value = "公共-有效次数", position = 15)
+    private Integer pcaValidCount;
+
+    /** 公共-无效次数 */
+    @ApiModelProperty(value = "公共-无效次数", position = 16)
+    private Integer pcaInvalidCount;
+
+    /** 公共-总按次数 */
+    @ApiModelProperty(value = "公共-总按次数", position = 17)
+    private Integer pcaTotalCount;
+
+    /** 持续-持续量 */
+    @ApiModelProperty(value = "持续-持续量", position = 18)
+    private BigDecimal continueDose;
+
+    /** 脉冲-脉冲量 */
+    @ApiModelProperty(value = "脉冲-脉冲量", position = 19)
+    private Integer pulseDose;
+
+    /** 脉冲-脉冲锁时 */
+    @ApiModelProperty(value = "脉冲-脉冲锁时", position = 20)
+    private Integer pulseLockTime;
+
+    /** 脉冲-脉冲首次锁时 */
+    @ApiModelProperty(value = "脉冲-脉冲首次锁时", position = 21)
+    private Integer pulseFirstLockTime;
+
+    /** 智能-加档周期 */
+    @ApiModelProperty(value = "智能-加档周期", position = 22)
+    private BigDecimal flowUpCycle;
+
+    /** 智能-减档周期 */
+    @ApiModelProperty(value = "智能-减档周期", position = 23)
+    private BigDecimal flowDownCycle;
+
+    /** 智能-计次 */
+    @ApiModelProperty(value = "智能-计次", position = 24)
+    private Integer flowCount;
+
+    /** 智能-上限 */
+    @ApiModelProperty(value = "智能-上限", position = 25)
+    private BigDecimal flowUpLimit;
+
+    /** 智能-下限 */
+    @ApiModelProperty(value = "智能-下限", position = 26)
+    private BigDecimal flowDownLimit;
+
+    /** 智能-自调比例 */
+    @ApiModelProperty(value = "智能-自调比例", position = 27)
+    private BigDecimal flowAdjustRate;
+
+    /** 智能-输注过程中是否出现过加档受限 */
+    @ApiModelProperty(value = "智能-输注过程中是否出现过加档受限", position = 28)
+    private String flowRestricted;
+
+    /** 智能-加减档提示 */
+    @ApiModelProperty(value = "智能-加减档提示", position = 29)
+    private String warnFlow;
+
+    /** 电量 */
+    @ApiModelProperty(value = "电量", position = 30)
+    private Integer electricQuantity;
+
+    /** 镇痛泵运行状态 */
+    @ApiModelProperty(value = "镇痛泵运行状态", position = 31)
+    private String deviceRunState;
+
+    /** 输液将结束(0:否,1:是) */
+    @ApiModelProperty(value = "输液将结束(0:否,1:是)", position = 32)
+    private Boolean warnWillFinished;
+
+    /** 镇痛不足(0:否,1:是) */
+    @ApiModelProperty(value = "镇痛不足(0:否,1:是)", position = 33)
+    private Boolean warnAnalgesicPoor;
+
+    /** 电量偏低(0:否,1:是) */
+    @ApiModelProperty(value = "电量偏低(0:否,1:是)", position = 34)
+    private Boolean warnLowBattery;
+
+    /** 报警信息 */
+    @ApiModelProperty(value = "报警信息", position = 35)
+    private String deviceAlarm;
+
+    /** 开始时间 */
+    @ApiModelProperty(value = "开始时间", position = 36)
+    private Date infusionStartTime;
+
+    /** 一次输注最后上传时间 */
+    @ApiModelProperty(value = "一次输注最后上传时间", position = 37)
+    private Date lastUploadTime;
+
+    /** 设备类型 */
+    @ApiModelProperty(value = "设备类型", position = 38)
+    private String deviceType;
+
+    /** 医院编码 */
+    @ApiModelProperty(value = "医院编码", position = 40)
+    private String hospitalCode;
+}

+ 0 - 19
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/dto/BizInfusionHistoryQueryDTO.java

@@ -1,19 +0,0 @@
-package cn.tr.module.smart.common.dto;
-
-import lombok.ToString;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import java.util.*;
-/**
- * 输注-输注历史记录表查询参数
- *
- * @author lf
- * @date  2025/08/05 10:31
- **/
-@Data
-@ApiModel("输注-输注历史记录表查询参数")
-@ToString
-public class BizInfusionHistoryQueryDTO  {
-    private static final long serialVersionUID = 1L;
-}

+ 2 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/mapper/BizInfusionHistoryMapper.java

@@ -1,5 +1,6 @@
 package cn.tr.module.smart.common.mapper;
 
+import cn.tr.module.smart.app.controller.vo.AppDoctorInfusionHistoryVO;
 import cn.tr.module.smart.common.dto.NbPumpInfusionDTO;
 import cn.tr.module.smart.common.po.BizInfusionHistoryPO;
 import cn.tr.module.smart.web.vo.BizDeviceAndClinicDetailVO;
@@ -36,4 +37,5 @@ public interface BizInfusionHistoryMapper {
     })
     BizInfusionInfoVO convertInfusionInfoVo(BizDeviceAndClinicDetailVO source);
 
+    AppDoctorInfusionHistoryVO convertAPPVO(BizInfusionHistoryPO bizInfusionHistoryPO);
 }

+ 3 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/IBizClinicRoomService.java

@@ -1,6 +1,7 @@
 package cn.tr.module.smart.common.service;
 
 import cn.tr.module.smart.app.controller.dto.*;
+import cn.tr.module.smart.app.controller.vo.AppDoctorInfusionHistoryVO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorClinicRoomThumbnailVO;
 import cn.tr.module.smart.app.controller.vo.DoctorClinicRoomVO;
 import cn.tr.module.smart.common.dto.BizClinicRoomDTO;
@@ -122,4 +123,6 @@ public interface IBizClinicRoomService {
     Boolean validateCardNo(BizWxUserCheckCardNoDTO source) throws IOException;
 
     List<WxDoctorClinicRoomThumbnailVO> queryPatientCode(AppDoctorClinicQueryByPatientCodeDTO source);
+
+    AppDoctorInfusionHistoryVO selectByClinicRoomAndPatientByClinicId(String clinicId);
 }

+ 20 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizClinicRoomServiceImpl.java

@@ -6,11 +6,13 @@ import cn.hutool.core.util.StrUtil;
 import cn.tr.core.exception.TRExcCode;
 import cn.tr.core.strategy.LoginUserStrategy;
 import cn.tr.module.smart.app.controller.dto.*;
+import cn.tr.module.smart.app.controller.vo.AppDoctorInfusionHistoryVO;
 import cn.tr.module.smart.app.controller.vo.DoctorClinicRoomVO;
 import cn.tr.module.smart.app.controller.vo.WxDoctorClinicRoomThumbnailVO;
 import cn.tr.module.smart.common.dto.BizDeptDTO;
 import cn.tr.module.smart.common.enums.ClinicPhaseEnums;
 import cn.tr.module.smart.common.enums.UserTypeEnums;
+import cn.tr.module.smart.common.mapper.BizInfusionHistoryMapper;
 import cn.tr.module.smart.common.po.*;
 import cn.tr.module.smart.common.repository.*;
 import cn.tr.module.smart.common.service.*;
@@ -82,8 +84,14 @@ public class BizClinicRoomServiceImpl implements IBizClinicRoomService {
     @Autowired
     private BizClinicRoomDoctorUserRepository roomDoctorUserRepository;
 
+    @Autowired
+    private BizInfusionClinicRepository infusionClinicRepository;
+
     @Autowired
     private BizIdCardRepository idCardRepository;
+
+    @Autowired
+    private BizInfusionHistoryRepository infusionHistoryRepository;
     @Override
     public List<BizWxAppletClinicDetailVO> stdSelectWxAppletClinicList(BizWxAppletClinicQueryDTO query) {
         return baseRepository.stdSelectWxAppletClinicList(query);
@@ -429,6 +437,18 @@ public class BizClinicRoomServiceImpl implements IBizClinicRoomService {
         return baseRepository.selectListByPatientCode(source);
     }
 
+    @Override
+    public AppDoctorInfusionHistoryVO selectByClinicRoomAndPatientByClinicId(String clinicId) {
+        BizInfusionClinicPO infusionClinic = infusionClinicRepository.selectOne(new LambdaQueryWrapper<BizInfusionClinicPO>()
+                .eq(BizInfusionClinicPO::getClinicId, clinicId)
+                .last("limit 1"));
+        if (ObjectUtil.isNull(infusionClinic)) {
+            return null;
+        }
+
+        return  BizInfusionHistoryMapper.INSTANCE.convertAPPVO(infusionHistoryRepository.selectById(infusionClinic.getInfusionId()));
+    }
+
     /**
      * 微信小程序基于医生已填写的信息更新数据
      */