# bahmni/openmrs-module-bahmniapps architecture

> Architecture diagram of the GitHub repository bahmni/openmrs-module-bahmniapps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bahmni/openmrs-module-bahmniapps
- Repository: https://github.com/bahmni/openmrs-module-bahmniapps

## Overview

Bahmni Apps is the frontend for the Bahmni EMR: primarily AngularJS, with React used for form viewing and newer micro-frontends. The broad user journey is patient registration or search, followed by clinical encounter work and review of patient records; operational and administrative modules provide separate workflows. The graph preserves the major areas visible in the tree and README. Evidence is limited: only selected source was sampled, so unverified connections between legacy modules are shown as dashed rather than asserted as calls.

Main entry points: [`ui/app/clinical/consultation`](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/consultation) (Consultation), [`ui/app/clinical/dashboard`](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/dashboard) (Patient Dashboard), [`micro-frontends/src/next-ui/Containers/formDisplayControl/FormDisplayControl.jsx`](https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Containers/formDisplayControl/FormDisplayControl.jsx) (Form Display), [`micro-frontends/src/ipd/CareViewDashboard.jsx`](https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/ipd/CareViewDashboard.jsx) (IPD Care View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Patient Entry"]
  node_registration["Registration"]
  node_patient_search["Patient Search"]
end

subgraph group_clinical["Clinical Care"]
  node_clinical_consult["Consultation"]
  node_clinical_common["Visit Context"]
  node_patient_dashboard["Patient Dashboard"]
  node_display_controls["Clinical Displays"]
  node_orders["Orders"]
end

subgraph group_operations["Hospital Operations"]
  node_admin["Administration"]
  node_adt["Admissions"]
  node_beds["Bed Management"]
  node_ot["Operating Theatre"]
  node_reports["Reports"]
  node_documents["Document Upload"]
end

subgraph group_platform["Shared UI Services"]
  node_common_domain["Domain Services"]
  node_auth["Authentication"]
end

subgraph group_react["React Micro-frontends"]
  node_mfe_forms["Form Display"]
  node_mfe_allergies["Allergy Management"]
  node_mfe_dose["Variable Dose"]
  node_mfe_careview["IPD Care View"]
end

node_user(("Care staff"))
node_ipd_remote["IPD Remote"]

node_user -.->|"registers patients"| node_registration
node_user -.->|"searches patients"| node_patient_search
node_user -.->|"records care"| node_clinical_consult
node_user -.->|"reviews records"| node_patient_dashboard
node_user -.->|"manages setup"| node_admin
node_user -.->|"manages admissions"| node_adt
node_user -.->|"manages beds"| node_beds
node_user -.->|"plans theatre"| node_ot
node_user -.->|"views reports"| node_reports
node_user -.->|"uploads documents"| node_documents
node_clinical_consult -.->|"uses visit context"| node_clinical_common
node_clinical_consult -.->|"uses domain services"| node_common_domain
node_patient_dashboard -.->|"shows clinical data"| node_display_controls
node_clinical_consult -.->|"creates orders"| node_orders
node_mfe_forms -->|"React form viewer"| node_mfe_forms
node_mfe_careview -->|"loads remote"| node_ipd_remote

click node_registration "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/registration"
click node_patient_search "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/common/patient-search"
click node_clinical_consult "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/consultation"
click node_clinical_common "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/common"
click node_patient_dashboard "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/dashboard"
click node_display_controls "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/displaycontrols"
click node_orders "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/orders"
click node_admin "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/admin"
click node_adt "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/adt"
click node_beds "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/bedmanagement"
click node_ot "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/ot"
click node_reports "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/reports"
click node_documents "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/document-upload"
click node_common_domain "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/common/domain"
click node_auth "https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/common/auth"
click node_mfe_forms "https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Containers/formDisplayControl/FormDisplayControl.jsx"
click node_mfe_allergies "https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx"
click node_mfe_dose "https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Components/VariableDoseProtocol/VariableDoseProtocolModal.jsx"
click node_mfe_careview "https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/ipd/CareViewDashboard.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registration,node_patient_search toneBlue
class node_clinical_consult,node_clinical_common,node_patient_dashboard,node_display_controls,node_orders toneAmber
class node_admin,node_adt,node_beds,node_ot,node_reports,node_documents toneMint
class node_common_domain,node_auth toneRose
class node_mfe_forms,node_mfe_allergies,node_mfe_dose,node_mfe_careview,node_user,node_ipd_remote toneIndigo
```

## Components

### Patient Entry

- [Registration](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/registration): `ui/app/registration`
- [Patient Search](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/common/patient-search): `ui/app/common/patient-search`

### Clinical Care

- [Consultation](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/consultation): `ui/app/clinical/consultation`
- [Visit Context](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/common): `ui/app/clinical/common`
- [Patient Dashboard](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/dashboard): `ui/app/clinical/dashboard`
- [Clinical Displays](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/clinical/displaycontrols): `ui/app/clinical/displaycontrols`
- [Orders](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/orders): `ui/app/orders`

### Hospital Operations

- [Administration](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/admin): `ui/app/admin`
- [Admissions](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/adt): `ui/app/adt`
- [Bed Management](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/bedmanagement): `ui/app/bedmanagement`
- [Operating Theatre](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/ot): `ui/app/ot`
- [Reports](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/reports): `ui/app/reports`
- [Document Upload](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/document-upload): `ui/app/document-upload`

### Shared UI Services

- [Domain Services](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/common/domain): `ui/app/common/domain`
- [Authentication](https://github.com/bahmni/openmrs-module-bahmniapps/tree/master/ui/app/common/auth): `ui/app/common/auth`

### React Micro-frontends

- [Form Display](https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Containers/formDisplayControl/FormDisplayControl.jsx): `micro-frontends/src/next-ui/Containers/formDisplayControl/FormDisplayControl.jsx`
- [Allergy Management](https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx): `micro-frontends/src/next-ui/Containers/patientAlergies/PatientAlergiesControl.jsx`
- [Variable Dose](https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/next-ui/Components/VariableDoseProtocol/VariableDoseProtocolModal.jsx): `micro-frontends/src/next-ui/Components/VariableDoseProtocol/VariableDoseProtocolModal.jsx`
- [IPD Care View](https://github.com/bahmni/openmrs-module-bahmniapps/blob/master/micro-frontends/src/ipd/CareViewDashboard.jsx): `micro-frontends/src/ipd/CareViewDashboard.jsx`

### Other components

- **Care staff**
- **IPD Remote**

## Connections

- Care staff → Registration: registers patients
- Care staff → Patient Search: searches patients
- Care staff → Consultation: records care
- Care staff → Patient Dashboard: reviews records
- Care staff → Administration: manages setup
- Care staff → Admissions: manages admissions
- Care staff → Bed Management: manages beds
- Care staff → Operating Theatre: plans theatre
- Care staff → Reports: views reports
- Care staff → Document Upload: uploads documents
- Consultation → Visit Context: uses visit context
- Consultation → Domain Services: uses domain services
- Patient Dashboard → Clinical Displays: shows clinical data
- Consultation → Orders: creates orders
- Form Display → Form Display: React form viewer (evidence: `micro-frontends/src/next-ui/Containers/formDisplayControl/FormDisplayControl.jsx`)
- IPD Care View → IPD Remote: loads remote (evidence: `micro-frontends/src/ipd/CareViewDashboard.jsx`)
