Skip to content
Mermaid templates

Hospital Schema (ER)

Patients, doctors, appointments, and prescriptions.

Template previewMermaid
Rendering…

Make it your own.

erDiagram
    PATIENT ||--o{ APPOINTMENT : books
    DOCTOR ||--o{ APPOINTMENT : attends
    APPOINTMENT ||--o{ PRESCRIPTION : produces
    PATIENT {
      uuid id PK
      string name
      date dob
    }
    DOCTOR {
      uuid id PK
      string name
      string specialty
    }
    APPOINTMENT {
      uuid id PK
      uuid patient_id FK
      uuid doctor_id FK
      datetime scheduled
      string status
    }
    PRESCRIPTION {
      uuid id PK
      uuid appointment_id FK
      string drug
      string dosage
    }