# dodhykss/nusamedika architecture

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

- Interactive diagram: https://gitdiagram.com/dodhykss/nusamedika
- Repository: https://github.com/dodhykss/nusamedika

## Overview

NusaMedika is a web-based Indonesian hospital information system. Its principal workflow registers patients and service encounters, then supports care teams with encounter-linked electronic medical records and medication or diagnostic orders; inpatient bed management and pharmacy/ancillary work continue those operational stages. Administration maintains master data, users, and menu access. The graph reflects README capabilities and the supplied tree, with sampled controller excerpts supporting the EMR, order, bed, and dynamic-submenu relationships. Other subsystem wiring is not inferred where source was not sampled.

Main entry points: [`resources/views/layouts/app.blade.php`](https://github.com/dodhykss/nusamedika/blob/master/resources/views/layouts/app.blade.php) (Web interface), [`app/Http/Controllers/Registrasi/Pendaftaran/DaftarRajal/DaftarRajalController.php`](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Registrasi/Pendaftaran/DaftarRajal/DaftarRajalController.php) (Patient registration), [`app/Http/Controllers/EMR/DynamicFormController.php`](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/DynamicFormController.php) (Dynamic EMR), [`app/Helpers/EmrHelper.php`](https://github.com/dodhykss/nusamedika/blob/master/app/Helpers/EmrHelper.php) (EMR services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clinical["Patient Services"]
  node_registration["Patient registration"]
  node_patientdata["Patient records"]
  node_outpatient["Outpatient care"]
  node_inpatient["Inpatient care"]
  node_emergency["Emergency care"]
  node_mcu["Medical checkup"]
end

subgraph group_records["Clinical Records"]
  node_dynamicemr["Dynamic EMR"]
  node_soap["SOAP notes<br/>[SoapController.php]"]
  node_nursing["Nursing assessment"]
  node_consult["Consultations"]
  node_prescribing["Medication orders"]
  node_lab["Lab orders"]
  node_radiology["Radiology orders"]
  node_emrhelper["EMR services<br/>[EmrHelper.php]"]
end

subgraph group_operations["Hospital Operations"]
  node_pharmacy["Pharmacy dispensing"]
  node_ancillary["Ancillary services"]
  node_beds["Bed management"]
  node_inventory["Inventory management"]
end

subgraph group_platform["Application Core"]
  node_web["Web interface<br/>[app.blade.php]"]
  node_admin["Administration"]
  node_access["Menu and access"]
  node_database[("PostgreSQL")]
end

node_staff(("Hospital staff"))

node_staff -->|"uses"| node_web
node_web -->|"submits registration"| node_registration
node_web -->|"manages patients"| node_patientdata
node_registration -->|"records encounters"| node_database
node_patientdata -->|"stores patient data"| node_database
node_registration -->|"starts outpatient"| node_outpatient
node_registration -->|"starts inpatient"| node_inpatient
node_registration -->|"starts emergency"| node_emergency
node_registration -->|"starts checkup"| node_mcu
node_web -->|"opens EMR"| node_dynamicemr
node_dynamicemr -->|"delegates forms"| node_soap
node_dynamicemr -->|"delegates forms"| node_nursing
node_dynamicemr -->|"loads EMR data"| node_emrhelper
node_soap -->|"reads and writes"| node_emrhelper
node_nursing -->|"reads and writes"| node_emrhelper
node_web -->|"submits consultation"| node_consult
node_web -->|"submits prescription"| node_prescribing
node_web -->|"submits lab order"| node_lab
node_web -->|"submits imaging order"| node_radiology
node_prescribing -->|"stores prescriptions"| node_database
node_lab -->|"stores orders"| node_database
node_radiology -->|"stores orders"| node_database
node_web -->|"processes prescriptions"| node_pharmacy
node_web -->|"processes lab work"| node_ancillary
node_web -->|"manages bed allocation"| node_beds
node_beds -->|"updates bed state"| node_database
node_web -->|"manages stock"| node_inventory
node_web -->|"maintains master data"| node_admin
node_admin -->|"persists master data"| node_database
node_access -->|"loads submenu records"| node_database
node_access -->|"registers routes"| node_web

click node_web "https://github.com/dodhykss/nusamedika/blob/master/resources/views/layouts/app.blade.php"
click node_registration "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Registrasi/Pendaftaran/DaftarRajal/DaftarRajalController.php"
click node_patientdata "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Registrasi/Pasien/DaftarPasien/DaftarPasienController.php"
click node_outpatient "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/RawatJalan/Pasien/ListPasienRajal/ListPasienRajalController.php"
click node_inpatient "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/RawatInap/Pasien/ListPasienRanap/ListPasienRanapController.php"
click node_emergency "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/GawatDarurat/Pasien/ListPasienGawatDarurat/ListPasienGawatDaruratController.php"
click node_mcu "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/MedicalCheckup/Pasien/ListPasienMedicalCheckup/ListPasienMedicalCheckupController.php"
click node_dynamicemr "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/DynamicFormController.php"
click node_soap "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Soap/SoapController.php"
click node_nursing "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/PengkajianAwalKeperawatan/PengkajianAwalKeperawatanController.php"
click node_consult "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Konsultasi/KonsultasiController.php"
click node_prescribing "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/OrderResep/OrderResepController.php"
click node_lab "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Laboratorium/LaboratoriumController.php"
click node_radiology "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Radiologi/RadiologiController.php"
click node_pharmacy "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Farmasi/Resep/ListPesananResep/ListPesananResepController.php"
click node_ancillary "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/PenunjangMedis/Laboratorium/DaftarPesananLaboratorium/DaftarPesananLaboratoriumController.php"
click node_beds "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/RawatInap/Pasien/BedManagement/BedManagementController.php"
click node_inventory "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Inventory/Stock/StockBarang/StockBarangController.php"
click node_admin "https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Administrator/ManajemenMaster/Bagian/BagianController.php"
click node_access "https://github.com/dodhykss/nusamedika/blob/master/app/Providers/SubMenuRouteServiceProvider.php"
click node_emrhelper "https://github.com/dodhykss/nusamedika/blob/master/app/Helpers/EmrHelper.php"

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_patientdata,node_outpatient,node_inpatient,node_emergency,node_mcu toneBlue
class node_dynamicemr,node_soap,node_nursing,node_consult,node_prescribing,node_lab,node_radiology,node_emrhelper toneAmber
class node_pharmacy,node_ancillary,node_beds,node_inventory toneMint
class node_web,node_admin,node_access,node_database toneRose
class node_staff toneIndigo
```

## Components

### Patient Services

- [Patient registration](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Registrasi/Pendaftaran/DaftarRajal/DaftarRajalController.php): `app/Http/Controllers/Registrasi/Pendaftaran/DaftarRajal/DaftarRajalController.php`
- [Patient records](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Registrasi/Pasien/DaftarPasien/DaftarPasienController.php): `app/Http/Controllers/Registrasi/Pasien/DaftarPasien/DaftarPasienController.php`
- [Outpatient care](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/RawatJalan/Pasien/ListPasienRajal/ListPasienRajalController.php): `app/Http/Controllers/RawatJalan/Pasien/ListPasienRajal/ListPasienRajalController.php`
- [Inpatient care](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/RawatInap/Pasien/ListPasienRanap/ListPasienRanapController.php): `app/Http/Controllers/RawatInap/Pasien/ListPasienRanap/ListPasienRanapController.php`
- [Emergency care](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/GawatDarurat/Pasien/ListPasienGawatDarurat/ListPasienGawatDaruratController.php): `app/Http/Controllers/GawatDarurat/Pasien/ListPasienGawatDarurat/ListPasienGawatDaruratController.php`
- [Medical checkup](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/MedicalCheckup/Pasien/ListPasienMedicalCheckup/ListPasienMedicalCheckupController.php): `app/Http/Controllers/MedicalCheckup/Pasien/ListPasienMedicalCheckup/ListPasienMedicalCheckupController.php`

### Clinical Records

- [Dynamic EMR](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/DynamicFormController.php): `app/Http/Controllers/EMR/DynamicFormController.php`
- [SOAP notes](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Soap/SoapController.php): `app/Http/Controllers/EMR/Soap/SoapController.php`
- [Nursing assessment](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/PengkajianAwalKeperawatan/PengkajianAwalKeperawatanController.php): `app/Http/Controllers/EMR/PengkajianAwalKeperawatan/PengkajianAwalKeperawatanController.php`
- [Consultations](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Konsultasi/KonsultasiController.php): `app/Http/Controllers/EMR/Konsultasi/KonsultasiController.php`
- [Medication orders](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/OrderResep/OrderResepController.php): `app/Http/Controllers/EMR/OrderResep/OrderResepController.php`
- [Lab orders](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Laboratorium/LaboratoriumController.php): `app/Http/Controllers/EMR/Laboratorium/LaboratoriumController.php`
- [Radiology orders](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/EMR/Radiologi/RadiologiController.php): `app/Http/Controllers/EMR/Radiologi/RadiologiController.php`
- [EMR services](https://github.com/dodhykss/nusamedika/blob/master/app/Helpers/EmrHelper.php): `app/Helpers/EmrHelper.php`

### Hospital Operations

- [Pharmacy dispensing](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Farmasi/Resep/ListPesananResep/ListPesananResepController.php): `app/Http/Controllers/Farmasi/Resep/ListPesananResep/ListPesananResepController.php`
- [Ancillary services](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/PenunjangMedis/Laboratorium/DaftarPesananLaboratorium/DaftarPesananLaboratoriumController.php): `app/Http/Controllers/PenunjangMedis/Laboratorium/DaftarPesananLaboratorium/DaftarPesananLaboratoriumController.php`
- [Bed management](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/RawatInap/Pasien/BedManagement/BedManagementController.php): `app/Http/Controllers/RawatInap/Pasien/BedManagement/BedManagementController.php`
- [Inventory management](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Inventory/Stock/StockBarang/StockBarangController.php): `app/Http/Controllers/Inventory/Stock/StockBarang/StockBarangController.php`

### Application Core

- [Web interface](https://github.com/dodhykss/nusamedika/blob/master/resources/views/layouts/app.blade.php): `resources/views/layouts/app.blade.php`
- [Administration](https://github.com/dodhykss/nusamedika/blob/master/app/Http/Controllers/Administrator/ManajemenMaster/Bagian/BagianController.php): `app/Http/Controllers/Administrator/ManajemenMaster/Bagian/BagianController.php`
- [Menu and access](https://github.com/dodhykss/nusamedika/blob/master/app/Providers/SubMenuRouteServiceProvider.php): `app/Providers/SubMenuRouteServiceProvider.php`
- **PostgreSQL**

### Other components

- **Hospital staff**

## Connections

- Hospital staff → Web interface: uses
- Web interface → Patient registration: submits registration
- Web interface → Patient records: manages patients
- Patient registration → PostgreSQL: records encounters
- Patient records → PostgreSQL: stores patient data
- Patient registration → Outpatient care: starts outpatient
- Patient registration → Inpatient care: starts inpatient
- Patient registration → Emergency care: starts emergency
- Patient registration → Medical checkup: starts checkup
- Web interface → Dynamic EMR: opens EMR
- Dynamic EMR → SOAP notes: delegates forms
- Dynamic EMR → Nursing assessment: delegates forms
- Dynamic EMR → EMR services: loads EMR data
- SOAP notes → EMR services: reads and writes
- Nursing assessment → EMR services: reads and writes
- Web interface → Consultations: submits consultation
- Web interface → Medication orders: submits prescription
- Web interface → Lab orders: submits lab order
- Web interface → Radiology orders: submits imaging order
- Medication orders → PostgreSQL: stores prescriptions
- Lab orders → PostgreSQL: stores orders
- Radiology orders → PostgreSQL: stores orders
- Web interface → Pharmacy dispensing: processes prescriptions
- Web interface → Ancillary services: processes lab work
- Web interface → Bed management: manages bed allocation
- Bed management → PostgreSQL: updates bed state
- Web interface → Inventory management: manages stock
- Web interface → Administration: maintains master data
- Administration → PostgreSQL: persists master data
- Menu and access → PostgreSQL: loads submenu records
- Menu and access → Web interface: registers routes
