ENT-5196 handle errors during flow initialisation (#6378)

Changes to `StaffedFlowHospital` after merging from earlier releases.
This commit is contained in:
LankyDan 2020-07-08 14:43:24 +01:00
parent 2204f44332
commit b05c0f0cc1

View File

@ -355,7 +355,7 @@ class StaffedFlowHospital(private val flowMessaging: FlowMessaging,
}
fun timesResuscitated(currentState: StateMachineState): Int {
val lastAdmittanceSuspendCount = currentState.checkpoint.numberOfSuspends
val lastAdmittanceSuspendCount = currentState.checkpoint.checkpointState.numberOfSuspends
return records.count { ResuscitationSpecialist in it.by && it.suspendCount == lastAdmittanceSuspendCount }
}
@ -392,9 +392,9 @@ class StaffedFlowHospital(private val flowMessaging: FlowMessaging,
}
}
enum class Outcome(val event: Event?) {
enum class Outcome(val event: Event) {
DISCHARGE(Event.RetryFlowFromSafePoint),
OVERNIGHT_OBSERVATION(null),
OVERNIGHT_OBSERVATION(Event.OvernightObservation),
UNTREATABLE(Event.StartErrorPropagation)
}