|
@@ -200,12 +200,9 @@ public class DeviceInfoListener implements IIotMsgHandler {
|
|
|
private void handleIntelligent(BusDeviceRunningEntity device, DeviceOperator deviceOperator, List<Supplier<?>> cacheOperation) {
|
|
private void handleIntelligent(BusDeviceRunningEntity device, DeviceOperator deviceOperator, List<Supplier<?>> cacheOperation) {
|
|
|
//开机数据不进行加减档判定
|
|
//开机数据不进行加减档判定
|
|
|
if (!DeviceStatusEnum.StartUp.equals(device.getRunState())) {
|
|
if (!DeviceStatusEnum.StartUp.equals(device.getRunState())) {
|
|
|
- if(DeviceTypeEnum.intelligent.equals(device.getType())
|
|
|
|
|
- &&FlowStatusEnum.None==device.getWarnFlow()
|
|
|
|
|
|
|
+ boolean flowLimit = deviceOperator.isFlowLimit();
|
|
|
|
|
+ if(FlowStatusEnum.None==device.getWarnFlow()
|
|
|
&& Boolean.FALSE.equals(device.isNewInfusion())){
|
|
&& Boolean.FALSE.equals(device.isNewInfusion())){
|
|
|
- boolean flowLimit = deviceOperator.isFlowLimit();
|
|
|
|
|
- //同一输注过程中,只有减档才能够消除加档受限
|
|
|
|
|
-
|
|
|
|
|
BigDecimal lastContinueDose = deviceOperator.getContinueDose();
|
|
BigDecimal lastContinueDose = deviceOperator.getContinueDose();
|
|
|
if(lastContinueDose!=null){
|
|
if(lastContinueDose!=null){
|
|
|
if(CompareUtil.compare(device.getContinueDose(),lastContinueDose)>0){
|
|
if(CompareUtil.compare(device.getContinueDose(),lastContinueDose)>0){
|
|
@@ -222,11 +219,13 @@ public class DeviceInfoListener implements IIotMsgHandler {
|
|
|
}
|
|
}
|
|
|
cacheOperation.add(()->{
|
|
cacheOperation.add(()->{
|
|
|
deviceOperator.setContinueDose(device.getContinueDose());
|
|
deviceOperator.setContinueDose(device.getContinueDose());
|
|
|
- if(FlowStatusEnum.Down.equals(device.getWarnFlow())){
|
|
|
|
|
- //减档或者非加档受限的新输注
|
|
|
|
|
- deviceOperator.setFlowLimit(false);
|
|
|
|
|
- }else if(FlowStatusEnum.Limited.equals(device.getWarnFlow())){
|
|
|
|
|
- deviceOperator.setFlowLimit(true);
|
|
|
|
|
|
|
+ if(flowLimit&&Boolean.FALSE.equals(device.isNewInfusion())){
|
|
|
|
|
+ //同一输注过程中,只有减档才能够消除加档受限
|
|
|
|
|
+ if(FlowStatusEnum.Down.equals(device.getWarnFlow())){
|
|
|
|
|
+ deviceOperator.setFlowLimit(false);
|
|
|
|
|
+ }
|
|
|
|
|
+ }else {
|
|
|
|
|
+ deviceOperator.setFlowLimit(FlowStatusEnum.Limited.equals(device.getWarnFlow()));
|
|
|
}
|
|
}
|
|
|
return null;
|
|
return null;
|
|
|
});
|
|
});
|
|
@@ -350,7 +349,9 @@ public class DeviceInfoListener implements IIotMsgHandler {
|
|
|
device.setClinicId(patientOperator.getClinicId());
|
|
device.setClinicId(patientOperator.getClinicId());
|
|
|
device.setPatientId(patientOperator.getPatientId());
|
|
device.setPatientId(patientOperator.getPatientId());
|
|
|
//处理智能泵数据
|
|
//处理智能泵数据
|
|
|
- handleIntelligent(device,deviceOperator,cacheOperation);
|
|
|
|
|
|
|
+ if(DeviceTypeEnum.intelligent.equals(device.getType())){
|
|
|
|
|
+ handleIntelligent(device,deviceOperator,cacheOperation);
|
|
|
|
|
+ }
|
|
|
//处理追加量数据
|
|
//处理追加量数据
|
|
|
handleAppendDose(device,deviceOperator,cacheOperation);
|
|
handleAppendDose(device,deviceOperator,cacheOperation);
|
|
|
BusInfusionHistoryEntity infusionHistory = BusInfusionHistoryEntity.parseRunningInfo(device);
|
|
BusInfusionHistoryEntity infusionHistory = BusInfusionHistoryEntity.parseRunningInfo(device);
|