BusClinicEntity.java 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. package com.coffee.bus.entity;
  2. import com.baomidou.mybatisplus.annotation.FieldFill;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.baomidou.mybatisplus.annotation.TableLogic;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
  7. import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
  8. import com.coffee.bus.bean.HisInfo;
  9. import com.coffee.bus.service.dto.UndoDeviceConfig;
  10. import com.coffee.common.entity.TenantGenericEntity;
  11. import com.coffee.common.enums.SexEnum;
  12. import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  13. import io.swagger.annotations.ApiModel;
  14. import io.swagger.annotations.ApiModelProperty;
  15. import lombok.Data;
  16. import lombok.EqualsAndHashCode;
  17. import lombok.ToString;
  18. import org.hibernate.validator.constraints.Length;
  19. import java.util.*;
  20. /**
  21. * @author lifang
  22. * @version 1.0.0
  23. * @ClassName BusClinicEntity.java
  24. * @Description TODO
  25. * @createTime 2022年03月21日 11:17:00
  26. */
  27. @EqualsAndHashCode(callSuper = true)
  28. @Data
  29. @TableName(value = "bus_clinic",autoResultMap = true)
  30. @ApiModel(value="病人临床手术信息", description="病人临床手术信息实体类")
  31. @ToString
  32. public class BusClinicEntity extends TenantGenericEntity<String,String> {
  33. @ApiModelProperty(value = "临床手术名称")
  34. @Length(max = 255,message = "临床手术名称长度不得超过255个字节")
  35. private String name;
  36. @ApiModelProperty(value = "病号")
  37. @Length(max = 255,message = "病号长度不得超过255个字节")
  38. private String patientCode;
  39. @ApiModelProperty(value = "手术开始时间")
  40. private Date startTime;
  41. @TableField
  42. @ApiModelProperty("手术监护开始时间,即该临床手术后第一次上传数据时间")
  43. private Date monitorStartTime;
  44. @ApiModelProperty(value = "手术监护结束时间")
  45. private Date endTime;
  46. @ApiModelProperty(value = "患者姓名")
  47. @Length(max = 255,message = "患者姓名长度不得超过255个字节")
  48. private String patientName;
  49. @ApiModelProperty(value = "患者性别")
  50. private SexEnum patientGender;
  51. @ApiModelProperty(value = "患者年龄")
  52. private Integer patientAge;
  53. @ApiModelProperty(value = "病区")
  54. @Length(max = 255,message = "病区")
  55. private String ward;
  56. @ApiModelProperty(value = "病床号")
  57. @Length(max = 255,message = "病床号长度不得超过255个字节")
  58. private String bedNo;
  59. @ApiModelProperty(value = "体重")
  60. @Length(max = 255,message = "体重不得超过255个字节")
  61. private String weight;
  62. @ApiModelProperty(value = "身高")
  63. @Length(max = 255,message = "身高不得超过255个字节")
  64. private String height;
  65. @ApiModelProperty(value = "麻醉医生")
  66. @Length(max = 255,message = "麻醉医生不得超过255个字节")
  67. private String anaDoctor;
  68. @ApiModelProperty(value = "麻醉方式")
  69. private String anaType;
  70. @ApiModelProperty(value = "镇痛方式")
  71. private String analType;
  72. @ApiModelProperty(value = "手术医生")
  73. @Length(max = 255,message = "手术医生不得超过255个字节")
  74. private String surgeryDoctor;
  75. @ApiModelProperty(value = "配置人员")
  76. private String configPerson;
  77. @ApiModelProperty(value = "配方")
  78. @TableField(typeHandler = FastjsonTypeHandler.class,javaType = true)
  79. private List<FormulaDrugDomain> formula;
  80. @ApiModelProperty(value = "临床是否结束,0、未结束 1、结束 ")
  81. private Boolean finished;
  82. @ApiModelProperty(value = "临床使用过的设备号")
  83. @TableField(typeHandler = FastjsonTypeHandler.class,javaType = true)
  84. private Set<String> deviceCodes;
  85. @TableField(fill = FieldFill.INSERT)
  86. @TableLogic(value = "0",delval = "1")
  87. private Integer isDelete;
  88. @ApiModelProperty("结束管理(撤泵)配置,仅在 其他监控中使用")
  89. @TableField(typeHandler = FastjsonTypeHandler.class)
  90. private UndoDeviceConfig undoConfig;
  91. //todo
  92. @ApiModelProperty(value = "监护类型,1、有泵监护 0、无泵监护")
  93. @JsonIgnoreProperties(allowGetters = true)
  94. private Boolean monitorType;
  95. public static BusClinicEntity of(HisInfo hisInfo){
  96. BusClinicEntity clinic = new BusClinicEntity();
  97. clinic.setTenantId(hisInfo.getHospitalId());
  98. clinic.setPatientCode(hisInfo.getPatientCode());
  99. clinic.setPatientName(hisInfo.getPatientName());
  100. clinic.setPatientGender(hisInfo.getGender());
  101. clinic.setPatientAge(Integer.valueOf(hisInfo.getAge()));
  102. clinic.setWeight(hisInfo.getWeight());
  103. clinic.setHeight(hisInfo.getHeight());
  104. //病区 需新增 todo
  105. clinic.setWard(hisInfo.getWard());
  106. clinic.setBedNo(hisInfo.getBedNo());
  107. clinic.setName(hisInfo.getOperation());
  108. clinic.setSurgeryDoctor(hisInfo.getSurgeon());
  109. clinic.setStartTime(hisInfo.getOperationTime());
  110. //asa分级 todo
  111. //easymode todo
  112. // clinic.setFormula(hisInfo.getFormula());
  113. clinic.setConfigPerson(hisInfo.getConfigPerson());
  114. return clinic;
  115. }
  116. }