Browse Source

add
平板技改项目

18339543638 8 months ago
parent
commit
a214793ec4

+ 6 - 0
nb-service-api/web-service-api/src/main/java/com/nb/web/api/feign/result/DoctorPatientMonitorResult.java

@@ -160,6 +160,12 @@ public class DoctorPatientMonitorResult implements Serializable {
     @ApiModelProperty("提醒字段")
     private String warns;
 
+    @ApiModelProperty("是否异常,0、不异常 1、异常")
+    private Boolean abnormal;
+
+    @ApiModelProperty("异常情况说明")
+    private String abnormalRemark;
+
     private void judgeWarnWillFinished() {
         if(!Boolean.TRUE.equals(this.warnWillFinished)){
             return;

+ 29 - 9
nb-service/app-doctor/src/main/java/com/nb/app/doctor/controller/PatientMonitorController.java

@@ -150,14 +150,6 @@ public class PatientMonitorController {
         return R.success(results);
     }
 
-    @PostMapping("/monitor/no_page")
-    @Log(title = "输注列表(平板技改)")
-    @ApiOperation(value = "输注列表(平板技改)")
-    public R<List<DoctorPatientMonitorResult>> doctorSelectPatientList(@RequestBody DoctorPatientMonitorQuery query) {
-        query.setTenantId(SecurityUtil.getTenantId());
-        return R.success(patientClient.doctorSelectPatientList(query));
-    }
-
     @ApiOperation("修改看护位置")
     @PostMapping("/edit/manage")
     @DistributeLock(value = "#vo.clinicId", waitTime = 0)
@@ -341,6 +333,34 @@ public class PatientMonitorController {
         }
         return R.success(constantService.list(query));
     }
-    
+
+    /**
+     * @description: 网络泵技改项目
+     * ①增加病区筛选功能:移动软件主界面增加病区快速筛选,可以点击不同的病区,将同一个病区的患者显示在一列;
+     * ②增加床号筛选或排序功能:可以对床号进行递增或递减进行排序
+     * ③筛查已评价患者和未评价患者
+     * @date 2025-04-17
+     * @author lifang
+     */
+    @PostMapping("/monitor/no_page")
+    @ApiOperation(value = "输注列表(平板技改)")
+    public R<List<DoctorPatientMonitorResult>> doctorSelectPatientList(@RequestBody DoctorPatientMonitorQuery query) {
+        query.setTenantId(SecurityUtil.getTenantId());
+        return R.success(patientClient.doctorSelectPatientList(query));
+    }
+
+    /**
+     * @description: 网络泵技改项目
+     * ①在主界面添加患者的异常表示
+     * @author lifang
+     * @date 2025-04-17
+     */
+    @PostMapping("/addAbnormalMark")
+    @ApiOperation(value = "添加异常标识(平板技改)")
+    public R<List<DoctorPatientMonitorResult>> addAbnormalMark(@RequestBody DoctorPatientMonitorQuery query) {
+        query.setTenantId(SecurityUtil.getTenantId());
+        return R.success(patientClient.doctorSelectPatientList(query));
+    }
+
 
 }

+ 36 - 13
nb-service/web-service/src/main/resources/mapper/bus/BusPatientMapper.xml

@@ -603,11 +603,7 @@
         <!-- 设备表左连接(若 device_alias 来自设备表) -->
         LEFT JOIN bus_device d ON i.device_id = d.id
         <where>
-            i.is_undo='0' and c.finished=0
-            <!-- 租户过滤(必选) -->
-            <if test="query.tenantId != null">
-                AND p.tenant_id = #{query.tenantId}
-            </if>
+            i.is_undo='0' and c.finished=0 and p.tenant_id = #{query.tenantId}
             <!-- 患者基础条件 -->
             <if test="query.patientCode != null">
                 AND p.code LIKE CONCAT('%', #{query.patientCode}, '%')
@@ -615,8 +611,9 @@
             <if test="query.patientName != null">
                 AND c.patient_name LIKE CONCAT('%', #{query.patientName}, '%')
             </if>
+            <!--todo-->
             <if test="query.abnormal != null">
-                AND p.patient_abnormal = #{query.abnormal}  <!-- 假设患者异常字段为 patient_abnormal -->
+                AND c.patient_abnormal = #{query.abnormal}  <!-- 假设患者异常字段为 patient_abnormal -->
             </if>
             <!-- 临床与病区条件 -->
             <if test="query.wards != null and query.wards.size > 0">
@@ -626,7 +623,7 @@
                 </foreach>
             </if>
             <if test="query.bedNo != null">
-                AND c.bed_no = #{query.bedNo}
+                AND c.bed_no LIKE CONCAT('%', #{query.bedNo}, '%')
             </if>
             <if test="query.anaDoctor != null">
                 AND c.ana_doctor LIKE CONCAT('%', #{query.anaDoctor}, '%')
@@ -635,7 +632,7 @@
                 AND c.surgery_name LIKE CONCAT('%', #{query.surgeName}, '%')
             </if>
             <if test="query.anaType != null">
-                AND c.ana_type = #{query.anaType}
+                AND c.ana_type LIKE CONCAT('%', #{query.anaType}, '%')
             </if>
             <!-- 设备与输注条件 -->
             <if test="query.types != null and types.size > 0">
@@ -650,13 +647,24 @@
                     #{status}
                 </foreach>
             </if>
-            <if test="query.alarm != null">
-                AND i.device_alarm = #{query.alarm}  <!-- 是否有报警 -->
+            <!-- 无报警 -->
+            <if test="query.alarm != null and query.alarm=false">
+                AND i.device_alarm = 0
+            </if>
+            <!-- 有报警 -->
+            <if test="query.alarm != null and query.alarm=true">
+                AND i.device_alarm != 0
+            </if>
+
+            <!--无提醒-->
+            <if test="query.warn != null and query.warn = false">
+                AND (i.warn_flow = 0 and i.warn_low_battery = 0 and i.warn_will_finished=0 and i.warn_analgesic_poor=0)
             </if>
-            <if test="query.warn != null">
-                <!-- 简化提醒条件,可根据实际字段扩展 -->
-                AND (i.warn_flow = 1 OR i.warn_low_battery = 1)
+            <!--有提醒-->
+            <if test="query.warn != null and query.warn = true">
+                AND (i.warn_flow = 1 or i.warn_low_battery = 1 or i.warn_will_finished=1 or i.warn_analgesic_poor=1)
             </if>
+
             <if test="query.timeRange != null and query.timeRange.size == 1">
                 AND c.monitor_start_time &gt;= #{query.timeRange[0]}
             </if>
@@ -664,6 +672,21 @@
             <if test="query.timeRange != null and query.timeRange.size > 1">
                 AND c.monitor_start_time &lt;= #{query.timeRange[1]}
             </if>
+
+            <!-- 已评价 -->
+            <if test="query.evaluate != null and query.evaluate = 1">
+                AND c.eval_time = #{query.manageType}
+            </if>
+            <!-- 待评价 -->
+            <if test="query.evaluate != null and query.evaluate = 2">
+                AND c.eval_time = #{query.manageType}
+            </if>
+            <!-- 未评价 -->
+            <if test="query.evaluate != null and query.evaluate = 3">
+                AND c.eval_time is null
+            </if>
+
+
             <!-- 管理类型 -->
             <if test="query.manageType != null">
                 AND c.manage_type = #{query.manageType}