FlowDiagram
UML: sequence, class & stateMermaid

Hospital patient domain class diagram template

Models patients, doctors, appointments, admissions, wards, prescriptions and medical records for a hospital information system; used by health-tech developers and analysts. This class diagram has 8 classes and 8 relationships. It imports as editable UML class boxes with inheritance, composition and association arrows.

Open in the editor →
  • Free — no account, no trial, no watermark
  • Fully editable shapes and connectors, not a screenshot
  • Export PNG, SVG or PDF, or share it as a link
  • Private: the diagram never leaves your browser

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

  1. Click Open in the editor. The class diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
  2. Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
  3. 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.
  4. Prefer text? Edit the Mermaid source below and paste it in through ☰ → Import diagram (see the Mermaid editor); it imports as an editable diagram.
  5. 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