SYSTEM

The database model is part of the product story.

The supplied SQL dump contains 43 tables. This page lets a technical reader inspect the conceptual groups without turning the public site into a raw SQL dump.

SOURCE-DERIVED SCHEMA

44 core table names represented in this public model.

Patient identity & continuity10
patientsappointmentspatient_pmhpatient_chronic_conditionspatient_surgical_historypatient_home_medicationspatient_immunizationspatient_documentspatient_feedbackpatient_outreach_tasks
Platform foundation1
id_sequences
OPD & clinical care6
opd_visitsprescriptionsprescription_itemsprescription_templatesprescription_template_itemsicd10_codes
Medicines & pediatric dosing2
medicine_mastermedicine_visibility
Diagnostics & laboratory7
investigation_masterinvestigation_panelsinvestigation_panel_itemsinvestigation_requestslab_orderslab_testslab_results
People, locations & access15
clinicsclinic_locationsdepartmentsdoctor_defaultsdoctor_opd_locationsusersstaff_profilesstaff_credentialsstaff_documentsstaff_trainingstaff_financialstaff_clinical_privilegespermission_changesprofile_change_requestsuser_activity_log
Outreach & communication4
patient_feedbackpatient_outreach_tasksbroadcast_templatesbroadcast_log
Clinical intelligence1
clinical_alerts
RELATIONSHIPS

The interesting part is how the entities stay distinct.

These are the relationships that allow the workflow to scale without turning everything into one record or one status field.

Patient → Encounter

A patient persists. Each visit is a separate encounter.

Encounter → Prescription

A prescription belongs to the exact clinical encounter.

Encounter → Investigation

Orders point back to clinical context; results have their own lifecycle.

Prescription → Pharmacy

Dispensing is a later state, not an assumption made at prescribing.

User → Capability

Organization position, system role and capability remain separate.

Action → Audit

Important changes leave an attributable history.