Classes in this class diagram
- Person — 4 members
- Patient — 3 members
- Doctor — 3 members
- Appointment — 4 members
- Admission — 3 members
- Ward — 3 members
- Prescription — 3 members
- MedicalRecord — 3 members
How to use this class diagram template
- Click Open in the editor. The class diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
- Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
- Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
- Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
- Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.
Mermaid source
The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.
classDiagram
class Person {
<<abstract>>
+String name
+Date dateOfBirth
+String phone
}
class Patient {
+String mrn
+String bloodType
+String insuranceId
}
class Doctor {
+String licenseNo
+String specialty
+prescribe(Patient p) Prescription
}
class Appointment {
+DateTime slot
+String reason
+String status
+reschedule(DateTime slot) void
}
class Admission {
+Date admittedOn
+Date dischargedOn
+discharge() void
}
class Ward {
+String name
+int beds
+freeBeds() int
}
class Prescription {
+String drug
+String dosage
+int days
}
class MedicalRecord {
+String diagnosis
+String notes
+Date recordedOn
}
Person <|-- Patient
Person <|-- Doctor
Patient "1" --> "*" Appointment : books
Doctor "1" --> "*" Appointment : attends
Patient "1" --> "*" Admission : admitted
Admission "*" --> "1" Ward : in
Patient "1" *-- "*" MedicalRecord : history
Doctor ..> Prescription : writes
Related: Mermaid editor · All uml: sequence, class & state templates · All 521 templates