package cn.lihu.jh.module.ecg.service.queue;
|
|
import lombok.Data;
|
import org.jetbrains.annotations.NotNull;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
@Data
|
public class BedBO implements Comparable<BedBO> {
|
String bedNo;
|
Long roomId;
|
String roomName;
|
Integer[] checkTypes;
|
|
/**
|
* @see cn.lihu.jh.module.ecg.enums.BedOpTypeEnum
|
*/
|
Integer opType;
|
|
/**
|
* @see cn.lihu.jh.module.ecg.enums.BedStatusEnum
|
*/
|
Integer status;
|
|
/**
|
* 这两个字段 用于分流控制, 参与分流的工位使用
|
* 【候诊中】患者数 、最大允许数
|
*/
|
Integer readyPatNum = 0;
|
Integer maxReadyPatNum = 0;
|
|
/**
|
* 【需求3】停止候诊开关。
|
* <p>
|
* true = 该工位暂停接收**新的**候诊患者(已有的候诊患者仍可正常叫号);
|
* false = 正常接收。
|
* <p>
|
* 与 {@code BedStatusEnum.DOCTOR_PAUSE} 的区别:医生"暂停"走的是
|
* {@code updateStop},会顺手把就诊中(30)强制完成、并把候诊中(20)的行
|
* {@code room_id=0/bed_no=' '} 踢走(患者凭空消失),不满足
|
* "已有候诊病人继续叫号"的要求;故本开关**独立实现**,只拦截新增。
|
* <p>
|
* 该字段需**落库**({@code clinic_room.stop_ready}),否则每次
|
* {@code bedReload}(开诊/重启)都会丢失。
|
*/
|
Boolean stopReady = false;
|
|
@Override
|
public int compareTo(@NotNull BedBO o) {
|
return Integer.compare(this.readyPatNum, o.readyPatNum);
|
}
|
}
|