fromCode static method
Returns the appointment status based on the string code, and returns entered-in-error if no match is found
Implementation
static AppointmentStatus? fromCode(String code) => switch (code) {
('proposed') => AppointmentStatus.proposed,
('booked') => AppointmentStatus.booked,
('arrived') => AppointmentStatus.arrived,
('fulfilled') => AppointmentStatus.fulfilled,
('cancelled') => AppointmentStatus.cancelled,
('noshow') => AppointmentStatus.noshow,
('entered-in-error') => AppointmentStatus.enteredInError,
_ => null,
};