|
|
@@ -1,9 +1,12 @@
|
|
|
package com.coffee.bus.entity;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
|
|
import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
import com.coffee.bus.enums.*;
|
|
|
import com.coffee.common.enums.SexEnum;
|
|
|
+import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
@@ -53,10 +56,6 @@ public class PatientMonitorDomain {
|
|
|
@ApiModelProperty(value = "公共参数-首次量")
|
|
|
private Integer firstDose;
|
|
|
|
|
|
- @ApiModelProperty(value = "加减档提示",readOnly = true)
|
|
|
- @TableField(updateStrategy = FieldStrategy.DEFAULT)
|
|
|
- private FlowStatusEnum warnFlow;
|
|
|
-
|
|
|
@ApiModelProperty(value = "公共参数-电量",readOnly = true)
|
|
|
private Integer electricQuantity;
|
|
|
|
|
|
@@ -127,15 +126,6 @@ public class PatientMonitorDomain {
|
|
|
@ApiModelProperty(value = "报警信息")
|
|
|
private DeviceAlarmEnum deviceAlarm;
|
|
|
|
|
|
- @ApiModelProperty(value = "输注即将结束提醒")
|
|
|
- private Boolean warnWillFinished;
|
|
|
-
|
|
|
- @ApiModelProperty(value = "镇痛不足提醒")
|
|
|
- private Boolean warnAnalgesicPoor;
|
|
|
-
|
|
|
- @ApiModelProperty(value = "电量偏低提醒")
|
|
|
- private Boolean warnLowBattery;
|
|
|
-
|
|
|
@ApiModelProperty(value = "输注开始时间,即本次运行开机时间")
|
|
|
private Date infusionStartTime;
|
|
|
|
|
|
@@ -169,4 +159,74 @@ public class PatientMonitorDomain {
|
|
|
|
|
|
@ApiModelProperty("当前病人监护开始时间")
|
|
|
private Date monitorStartTime;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "输注即将结束提醒",hidden = true)
|
|
|
+ @JsonIgnore
|
|
|
+ private Boolean warnWillFinished;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "镇痛不足提醒",hidden = true)
|
|
|
+ @JsonIgnore
|
|
|
+ private Boolean warnAnalgesicPoor;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "电量偏低提醒",hidden = true)
|
|
|
+ @JsonIgnore
|
|
|
+ private Boolean warnLowBattery;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "加减档提示",readOnly = true)
|
|
|
+ @JsonIgnore
|
|
|
+ private FlowStatusEnum warnFlow;
|
|
|
+
|
|
|
+ @ApiModelProperty("提醒字段")
|
|
|
+ private String warns;
|
|
|
+
|
|
|
+ private void judgeWarnWillFinished() {
|
|
|
+ if(!Boolean.TRUE.equals(this.warnWillFinished)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StrUtil.isEmpty(this.warns)) {
|
|
|
+ this.warns="输注即将结束;";
|
|
|
+ }else {
|
|
|
+ this.warns=this.warns+"输注即将结束;";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void judgeWarnAnalgesicPoor() {
|
|
|
+ if(!Boolean.TRUE.equals(this.warnAnalgesicPoor)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StrUtil.isEmpty(this.warns)) {
|
|
|
+ this.warns="镇痛不足;";
|
|
|
+ }else {
|
|
|
+ this.warns=this.warns+"镇痛不足;";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void judgeWarnLowBattery() {
|
|
|
+ if(!Boolean.TRUE.equals(this.warnLowBattery)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StrUtil.isEmpty(this.warns)) {
|
|
|
+ this.warns="电量偏低;";
|
|
|
+ }else {
|
|
|
+ this.warns=this.warns+"电量偏低;";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void judgeWarnFlow() {
|
|
|
+ if(this.warnFlow==null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (StrUtil.isEmpty(this.warns)) {
|
|
|
+ this.warns=warnFlow.getText()+";";
|
|
|
+ }else {
|
|
|
+ this.warns=this.warns+warnFlow.getText()+";";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void handleWarn(){
|
|
|
+ judgeWarnAnalgesicPoor();
|
|
|
+ judgeWarnFlow();
|
|
|
+ judgeWarnLowBattery();
|
|
|
+ judgeWarnWillFinished();
|
|
|
+ }
|
|
|
}
|