The following UML activity diagram for hospital management shows how patients book appointments and leave the hospital. It begins with a patient scheduling an appointment, arriving at the hospital, and interacting with the doctor.
According to the consultation, the patient takes tests or is given a prescription. For those who do require the testing, the flow is essentially test-order, get results, and then process transactions/payment on exit from the hospital. This diagram highlights the decision points based on test requirements and the paths patients take within the hospital system.