Create a state diagram for the bookings and give an explanation of the diagram.
A private hospital would like to implement a Java application to manage patient-specialist appointment. The hospital has five specialists, in different areas of medicine (e.g. cardiac, renal, paediatric). These specialists have regular slots for appointments every week. For example, the cardiac specialist may have six slots available on Monday, Wednesday and Friday; for simplicity, we assume each slot starts on the hour (e.g. 9am, 10am etc).
The system should be used by patients to schedule an appointment with a specialist. Each patient will first enter their unique hospital id number, and then the specialist they want to meet and desired date. The system will list the available slots for that specialist. The patient may then select one of the available
slots, select a different date, or a different specialist. The patient should also be shown a list of all booked appointments, which they have yet to attend. When the patient arrives for their appointment, they need to enter their hospital id number and
booking code. The system then records them as ‘waiting’. When the specialist is free, the appointment will be ‘in progress’. Finally, when finished, the appointment is recorded as ‘finished’. Sometimes a specialist has to cancel their appointments at short notice. If either the patient or specialist fails to attend the appointment, it is recorded as ‘cancelled’.
The specialist is able to view all their appointments for a given day, getting the patient’s name and hospital ID number. An administrator is able to view all appointments for a month and produce a report of how many appointments each specialist took each month, how many were completed and how many cancelled.
Create a state diagram for the bookings and give an explanation of the diagram.
Step by step
Solved in 6 steps with 6 images