|
|
@@ -1,9 +1,14 @@
|
|
|
package com.coffee.bus.entity;
|
|
|
|
|
|
import com.baomidou.mybatisplus.annotation.*;
|
|
|
+import com.coffee.aliyun.utils.Items;
|
|
|
+import com.coffee.aliyun.utils.PumpParams;
|
|
|
import com.coffee.bus.enums.DeviceAlarmEnum;
|
|
|
-import com.coffee.bus.enums.DeviceEnum;
|
|
|
+import com.coffee.bus.enums.DeviceTypeEnum;
|
|
|
import com.coffee.bus.enums.DeviceStatusEnum;
|
|
|
+import com.coffee.bus.enums.FlowStatusEnum;
|
|
|
+import com.coffee.common.entity.RecordCreationEntity;
|
|
|
+import com.coffee.common.entity.RecordModifierEntity;
|
|
|
import com.coffee.common.entity.TenantGenericEntity;
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
@@ -32,16 +37,33 @@ import java.util.Date;
|
|
|
@Accessors(chain = true)
|
|
|
@TableName(value = "bus_infusion_history",autoResultMap = true)
|
|
|
@ApiModel(value="设备输注历史信息记录", description="设备的classification标识每改变一次,就算一次新的输注记录")
|
|
|
-public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String> {
|
|
|
+public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String> implements RecordCreationEntity, RecordModifierEntity {
|
|
|
@ApiModelProperty(value = "网络泵id",readOnly = true)
|
|
|
private String deviceId;
|
|
|
|
|
|
- @ApiModelProperty(value = "病号")
|
|
|
- private String patientCode;
|
|
|
-
|
|
|
@ApiModelProperty(value = "临床号")
|
|
|
private String clinicId;
|
|
|
|
|
|
+ @ApiModelProperty(value = "患者编号")
|
|
|
+ private String patientId;
|
|
|
+
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "数据分类号,标识某些数据属于同一个输注",readOnly = true)
|
|
|
+ @JsonIgnoreProperties(allowSetters = true)
|
|
|
+ private String classification;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "数据编号",readOnly = true)
|
|
|
+ @JsonIgnoreProperties(allowSetters = true)
|
|
|
+ private String dataNumber;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "泵类型",readOnly = true)
|
|
|
+ @TableField(updateStrategy = FieldStrategy.NEVER)
|
|
|
+ private DeviceTypeEnum deviceType;
|
|
|
+
|
|
|
+ @ApiModelProperty(value = "住院号")
|
|
|
+ private String patientCode;
|
|
|
+
|
|
|
+
|
|
|
/***************临床固定数据*****************/
|
|
|
@ApiModelProperty(value = "病区")
|
|
|
private String ward;
|
|
|
@@ -147,6 +169,10 @@ public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String>
|
|
|
@DecimalMin(value = "0",message ="自调比例最小值不得超过0" )
|
|
|
private BigDecimal flowAdjustRate;
|
|
|
|
|
|
+ @ApiModelProperty(value = "加减档提示",readOnly = true)
|
|
|
+ @TableField(updateStrategy = FieldStrategy.IGNORED)
|
|
|
+ private FlowStatusEnum warnFlow;
|
|
|
+
|
|
|
|
|
|
@ApiModelProperty(value = "泵运行状态",readOnly = true)
|
|
|
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
|
|
@@ -175,14 +201,6 @@ public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String>
|
|
|
@ApiModelProperty(value = "备注")
|
|
|
private String remark;
|
|
|
|
|
|
- @ApiModelProperty(value = "分包标记位",readOnly = true)
|
|
|
- @JsonIgnoreProperties(allowSetters = true)
|
|
|
- private String classification;
|
|
|
-
|
|
|
- @ApiModelProperty(value = "泵类型",readOnly = true)
|
|
|
- @TableField(updateStrategy = FieldStrategy.NEVER)
|
|
|
- private DeviceEnum type;
|
|
|
-
|
|
|
@ApiModelProperty(value = "当前输注记录数据最后上传时间",readOnly = true,hidden = true)
|
|
|
@JsonIgnoreProperties(allowSetters = true)
|
|
|
private Date lastUploadTime;
|
|
|
@@ -205,12 +223,28 @@ public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String>
|
|
|
@ApiModelProperty(value = "该次输注是否已结束")
|
|
|
private Boolean finished;
|
|
|
|
|
|
+ @TableField(fill = FieldFill.INSERT_UPDATE)
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ @TableField(fill = FieldFill.INSERT_UPDATE)
|
|
|
+ private String createBy;
|
|
|
+
|
|
|
+ @TableField(fill = FieldFill.UPDATE)
|
|
|
+ private String updateBy;
|
|
|
+
|
|
|
+ @TableField(fill = FieldFill.UPDATE)
|
|
|
+ private Date updateTime;
|
|
|
+
|
|
|
+ @TableField(fill = FieldFill.INSERT)
|
|
|
+ @TableLogic(value = "0",delval = "1")
|
|
|
+ private Integer isDelete;
|
|
|
+
|
|
|
public static BusInfusionHistoryEntity parseRunningInfo(BusDeviceRunningEntity running){
|
|
|
BusInfusionHistoryEntity entity = new BusInfusionHistoryEntity();
|
|
|
entity.setDeviceId(running.getDeviceId());
|
|
|
entity.setClinicId(running.getClinicId());
|
|
|
entity.setPatientCode(running.getPatientCode());
|
|
|
- entity.setType(running.getType());
|
|
|
+ entity.setDeviceType(running.getType());
|
|
|
entity.setWard(running.getWard());
|
|
|
entity.setBedNo(running.getBedNo());
|
|
|
entity.setClassification(running.getClassification());
|
|
|
@@ -258,4 +292,16 @@ public class BusInfusionHistoryEntity extends TenantGenericEntity<String,String>
|
|
|
entity.setClinicStartTime(new Date(31510861L));
|
|
|
return entity;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据阿里云传回数据的items,设置输注的属性
|
|
|
+ * @param items
|
|
|
+ */
|
|
|
+ public void setFiledsByItems(Items items) {
|
|
|
+ this.patientCode = items.getString(PumpParams.patientCode);
|
|
|
+ this.classification = items.getString(PumpParams.classification);
|
|
|
+ this.dataNumber = items.getString(PumpParams.dataNumber);
|
|
|
+ this.totalDose = items.getInteger(PumpParams.totalDose);
|
|
|
+ this.inputDose = items.getBigDecimal(PumpParams.finishedDosis);
|
|
|
+ }
|
|
|
}
|