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

🏥 Healthcare · C4 Architecture · Pro

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.

More Healthcare templates

C4 Architecture diagrams are part of Pro. Anyone can view this one; generating and editing it needs Pro.

Drawing diagram…

What this diagram shows

  • Separate web apps for patients and hospital staff behind one API gateway
  • Appointments, EHR, billing and pharmacy as separate services with their own data
  • HL7/FHIR integration with external labs and insurance providers

Prompt used

A hospital management system with a patient mobile app and a staff web portal. Both call an API gateway that routes to appointment, EHR (electronic health records), billing and pharmacy services. EHR data is stored in PostgreSQL, documents and scans in object storage. Billing talks to an external insurance claims system, and the EHR service exchanges HL7/FHIR messages with an external lab system.

Mermaid code
C4Container
title Hospital Management System
Person(patient, "Patient", "Books visits, views reports")
Person(staff, "Doctor / Nurse", "Treats patients, updates records")
System_Boundary(hms, "Hospital Management System") {
  Container(mobile, "Patient App", "Flutter", "Appointments, reports, payments")
  Container(portal, "Staff Portal", "Angular", "Clinical and admin work")
  Container(gateway, "API Gateway", "Kong", "Auth, routing, rate limits")
  Container(appt, "Appointment Service", "Node.js", "Slots and bookings")
  Container(ehr, "EHR Service", "Java", "Medical records, HL7/FHIR")
  Container(billing, "Billing Service", "Node.js", "Invoices and claims")
  ContainerDb(db, "Clinical DB", "PostgreSQL", "Patients, visits, records")
}
System_Ext(lab, "Lab System", "Test orders and results")
System_Ext(insurer, "Insurance Provider", "Claims and approvals")
Rel(patient, mobile, "Uses")
Rel(staff, portal, "Uses")
Rel(mobile, gateway, "Calls", "HTTPS")
Rel(portal, gateway, "Calls", "HTTPS")
Rel(gateway, appt, "Routes")
Rel(gateway, ehr, "Routes")
Rel(gateway, billing, "Routes")
Rel(ehr, db, "Reads/writes")
Rel(ehr, lab, "Orders/results", "FHIR")
Rel(billing, insurer, "Submits claims")

Related templates

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.

Database ERDHealthcare

Hospital Database Schema

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

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.