CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Healthcare

🏥 Healthcare · Database ERD

Hospital Database Schema

A core relational schema for a hospital: patients, doctors, departments, appointments, admissions, beds, prescriptions and bills.

More Healthcare templates

Drawing diagram…

What this diagram shows

  • Appointments link patients to doctors, admissions to beds
  • Prescriptions belong to a visit and list medicines
  • Every admission produces one bill with many line items

Prompt used

ERD for a hospital system: Department has Doctors; Patient books Appointments with a Doctor; Patient has Admissions assigned to a Bed in a Ward; Appointments produce Prescriptions with PrescriptionItems referencing Medicines; each Admission has one Bill with BillItems.

Mermaid code
erDiagram
  DEPARTMENT ||--o{ DOCTOR : employs
  PATIENT ||--o{ APPOINTMENT : books
  DOCTOR ||--o{ APPOINTMENT : attends
  APPOINTMENT ||--o| PRESCRIPTION : produces
  PRESCRIPTION ||--|{ PRESCRIPTION_ITEM : lists
  MEDICINE ||--o{ PRESCRIPTION_ITEM : "prescribed in"
  PATIENT ||--o{ ADMISSION : has
  WARD ||--|{ BED : contains
  BED ||--o{ ADMISSION : "assigned to"
  ADMISSION ||--|| BILL : generates
  BILL ||--|{ BILL_ITEM : contains
  PATIENT {
    int id PK
    string mrn
    string name
    date dob
  }
  DOCTOR {
    int id PK
    int department_id FK
    string name
    string specialty
  }
  APPOINTMENT {
    int id PK
    int patient_id FK
    int doctor_id FK
    datetime slot
  }
  ADMISSION {
    int id PK
    int patient_id FK
    int bed_id FK
    datetime admitted_at
  }
  BILL {
    int id PK
    int admission_id FK
    decimal total
  }

Related templates

C4 ArchitectureProHealthcare

Hospital Management System Architecture

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.

SequenceHealthcare

Patient Appointment Booking Sequence

How a patient books a doctor's appointment online: checking free slots, holding one, paying the consultation fee and getting a confirmation.

FlowchartHealthcare

EHR Integration via HL7 / FHIR

How a hospital's EHR exchanges data with labs, radiology and insurers through an integration engine, translating between HL7 v2 and FHIR.

SequenceHealthcare

Telemedicine Video Consultation

An online doctor consultation from booking to e-prescription: payment, a secure video room, consultation notes and the prescription sent to the patient.

SequenceHealthcare

Cashless Hospitalisation Pre-Authorisation

How a cashless health insurance claim works at a hospital: pre-authorisation with the TPA, treatment, and final bill settlement directly with the insurer.

State MachineHealthcare

Lab Test Order to Result

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.