fromCode static method
Returns the slot status based on the string code, and returns entered-in-error if no match is found
Implementation
static SlotStatus fromCode(String code) => switch (code) {
('busy') => SlotStatus.busy,
('free') => SlotStatus.free,
('busy-unavailable') => SlotStatus.busyUnavailable,
('busy-tentative') => SlotStatus.busyTentative,
('entered-in-error') => SlotStatus.enteredInError,
_ => throw Exception('Unknown SlotStatus code $code'),
};