
🏥 Healthcare · Sequence
How a patient books a doctor's appointment online: checking free slots, holding one, paying the consultation fee and getting a confirmation.
Drawing diagram…
Sequence for a patient booking a doctor appointment: the patient app asks the appointment service for free slots, the patient picks one and it is held for 5 minutes, the payment service charges the consultation fee through a payment gateway, then the appointment is confirmed and the notification service sends SMS to the patient and an alert to the doctor.
sequenceDiagram actor P as Patient participant App as Patient App participant AS as Appointment Service participant Pay as Payment Service participant PG as Payment Gateway participant N as Notification Service P->>App: Choose doctor and date App->>AS: Get free slots AS-->>App: Available slots P->>App: Pick 10:30 slot App->>AS: Hold slot (5 min) AS-->>App: Slot held App->>Pay: Pay consultation fee Pay->>PG: Charge PG-->>Pay: Payment success Pay-->>App: Paid App->>AS: Confirm booking AS->>N: Booking confirmed N-->>P: SMS confirmation N-->>AS: Doctor notified
A container-level view of a hospital management system: patient and staff apps, the core services behind them, and the external systems a hospital depends on, such as insurers and labs.
How a hospital's EHR exchanges data with labs, radiology and insurers through an integration engine, translating between HL7 v2 and FHIR.
An online doctor consultation from booking to e-prescription: payment, a secure video room, consultation notes and the prescription sent to the patient.
How a cashless health insurance claim works at a hospital: pre-authorisation with the TPA, treatment, and final bill settlement directly with the insurer.
A core relational schema for a hospital: patients, doctors, departments, appointments, admissions, beds, prescriptions and bills.
The lifecycle of a lab test in a hospital, from the doctor's order to the result in the patient's record, including recollection and critical values.