# ahmadwirawan74-ui/medpro-all-in-one architecture

> Architecture diagram of the GitHub repository ahmadwirawan74-ui/medpro-all-in-one, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmadwirawan74-ui/medpro-all-in-one
- Repository: https://github.com/ahmadwirawan74-ui/medpro-all-in-one

## Overview

MedPro is an offline Obsidian medical-reference and clinical-workflow plugin. The user opens it through Obsidian’s ribbon or command; the plugin creates or reveals its hub, which routes to feature pages. Those pages provide reference content, calculators, patient documentation, and handoff tools, with plugin data stored locally. The graph preserves the README’s major capabilities; several feature links are documented by the README or hub routing, while unsampled implementation details and unverified relationships are omitted.

Main entry points: [`src/hub-view.ts`](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/hub-view.ts) (Hub and router), [`src/med-cppt.ts`](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-cppt.ts) (CPPT and patients), [`src/main.ts`](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/main.ts) (Plugin entry), [`src/med-anat.ts`](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-anat.ts) (Anatomy atlas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Plugin shell"]
  node_plugin["Plugin entry<br/>[main.ts]"]
  node_hub["Hub and router<br/>[hub-view.ts]"]
  node_localdata[("Local plugin data")]
  node_sound["Sound engine<br/>[sound.ts]"]
end

subgraph group_reference["Clinical reference"]
  node_diseaseui["Disease reference<br/>[medis3.ts]"]
  node_diseasedata[("Disease dataset<br/>[med-dis.ts]")]
  node_physical["Physical exam<br/>[med-pfui.ts]"]
  node_drugui["Drug reference<br/>[medis.ts]"]
  node_drugdata[("Drug data<br/>[med-data.ts]")]
  node_engine["Dose and interaction engine<br/>[med-engine.ts]"]
end

subgraph group_anatomy["Anatomy atlas"]
  node_anatomyui["Anatomy atlas<br/>[med-anat.ts]"]
  node_viewer["3D model viewer<br/>[anat3d-viewer.ts]"]
  node_anatomystore[("Anatomy model data<br/>[anat3d-store.ts]")]
  node_anatomycontent[("Anatomy learning content<br/>[anat3d-content.ts]")]
end

subgraph group_workflow["Patient workflow"]
  node_cppt["CPPT and patients<br/>[med-cppt.ts]"]
  node_jaga["Jaga and SBAR<br/>[med-jaga.ts]"]
  node_prescription["Prescription<br/>[medis3.ts]"]
  node_pdf["PDF export<br/>[med-pdf.ts]"]
end

subgraph group_tools["Clinical tools"]
  node_lab["Lab and blood gas<br/>[med-lab.ts]"]
  node_ekg["ECG and radiology<br/>[med-ekg.ts]"]
  node_antidote["Antidote calculators<br/>[med-antidot.ts]"]
  node_calculators["Clinical calculators<br/>[medis2.ts]"]
end

node_clinician(("Clinician"))
node_obsidian["Obsidian"]

node_clinician -->|"opens plugin"| node_obsidian
node_obsidian -->|"loads plugin"| node_plugin
node_plugin -->|"registers and opens"| node_hub
node_hub -->|"routes to"| node_diseaseui
node_hub -->|"routes to"| node_physical
node_hub -->|"routes to"| node_drugui
node_hub -->|"routes to"| node_anatomyui
node_hub -->|"routes to"| node_cppt
node_hub -->|"routes to"| node_jaga
node_hub -->|"routes to"| node_prescription
node_hub -->|"routes to"| node_lab
node_hub -->|"routes to"| node_ekg
node_hub -->|"routes to"| node_antidote
node_hub -->|"routes to"| node_calculators
node_diseaseui -->|"looks up disease"| node_diseasedata
node_diseasedata -.->|"uses linked prescriptions"| node_drugdata
node_drugui -->|"uses dosing logic"| node_engine
node_engine -->|"reads drug records"| node_drugdata
node_engine -->|"reads BNF interactions"| node_drugdata
node_anatomyui -->|"controls viewer"| node_viewer
node_anatomyui -->|"queries structures"| node_anatomystore
node_anatomyui -->|"shows learning content"| node_anatomycontent
node_viewer -->|"reads model data"| node_anatomystore
node_cppt -->|"provides handoff context"| node_jaga
node_cppt -->|"inserts prescription"| node_prescription
node_cppt -->|"exports notes"| node_pdf
node_jaga -->|"uses patient notes"| node_cppt
node_jaga -->|"exports handoff"| node_pdf
node_prescription -->|"exports prescription"| node_pdf
node_plugin -->|"configures sound"| node_sound
node_plugin -->|"stores patient data"| node_localdata

click node_plugin "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/main.ts"
click node_hub "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/hub-view.ts"
click node_sound "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/sound.ts"
click node_diseaseui "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis3.ts"
click node_diseasedata "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-dis.ts"
click node_physical "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-pfui.ts"
click node_drugui "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis.ts"
click node_drugdata "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-data.ts"
click node_engine "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-engine.ts"
click node_anatomyui "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-anat.ts"
click node_viewer "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/anat3d-viewer.ts"
click node_anatomystore "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/anat3d-store.ts"
click node_anatomycontent "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/anat3d-content.ts"
click node_cppt "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-cppt.ts"
click node_jaga "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-jaga.ts"
click node_prescription "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis3.ts"
click node_pdf "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-pdf.ts"
click node_lab "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-lab.ts"
click node_ekg "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-ekg.ts"
click node_antidote "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-antidot.ts"
click node_calculators "https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis2.ts"

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_plugin,node_hub,node_localdata,node_sound toneBlue
class node_diseaseui,node_diseasedata,node_physical,node_drugui,node_drugdata,node_engine toneAmber
class node_anatomyui,node_viewer,node_anatomystore,node_anatomycontent toneMint
class node_cppt,node_jaga,node_prescription,node_pdf toneRose
class node_lab,node_ekg,node_antidote,node_calculators,node_clinician,node_obsidian toneIndigo
```

## Components

### Plugin shell

- [Plugin entry](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/main.ts): `src/main.ts`
- [Hub and router](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/hub-view.ts): `src/hub-view.ts`
- **Local plugin data**
- [Sound engine](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/sound.ts): `src/sound.ts`

### Clinical reference

- [Disease reference](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis3.ts): `src/medis3.ts`
- [Disease dataset](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-dis.ts): `src/med-dis.ts`
- [Physical exam](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-pfui.ts): `src/med-pfui.ts`
- [Drug reference](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis.ts): `src/medis.ts`
- [Drug data](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-data.ts): `src/med-data.ts`
- [Dose and interaction engine](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-engine.ts): `src/med-engine.ts`

### Anatomy atlas

- [Anatomy atlas](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-anat.ts): `src/med-anat.ts`
- [3D model viewer](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/anat3d-viewer.ts): `src/anat3d-viewer.ts`
- [Anatomy model data](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/anat3d-store.ts): `src/anat3d-store.ts`
- [Anatomy learning content](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/anat3d-content.ts): `src/anat3d-content.ts`

### Patient workflow

- [CPPT and patients](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-cppt.ts): `src/med-cppt.ts`
- [Jaga and SBAR](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-jaga.ts): `src/med-jaga.ts`
- [Prescription](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis3.ts): `src/medis3.ts`
- [PDF export](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-pdf.ts): `src/med-pdf.ts`

### Clinical tools

- [Lab and blood gas](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-lab.ts): `src/med-lab.ts`
- [ECG and radiology](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-ekg.ts): `src/med-ekg.ts`
- [Antidote calculators](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/med-antidot.ts): `src/med-antidot.ts`
- [Clinical calculators](https://github.com/ahmadwirawan74-ui/medpro-all-in-one/blob/main/src/medis2.ts): `src/medis2.ts`

### Other components

- **Clinician**
- **Obsidian**

## Connections

- Clinician → Obsidian: opens plugin (evidence: `README.md`)
- Obsidian → Plugin entry: loads plugin (evidence: `README.md`)
- Plugin entry → Hub and router: registers and opens (evidence: `src/main.ts`)
- Hub and router → Disease reference: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Physical exam: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Drug reference: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Anatomy atlas: routes to (evidence: `src/hub-view.ts`)
- Hub and router → CPPT and patients: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Jaga and SBAR: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Prescription: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Lab and blood gas: routes to (evidence: `src/hub-view.ts`)
- Hub and router → ECG and radiology: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Antidote calculators: routes to (evidence: `src/hub-view.ts`)
- Hub and router → Clinical calculators: routes to (evidence: `src/hub-view.ts`)
- Disease reference → Disease dataset: looks up disease (evidence: `src/medis3.ts`)
- Disease dataset → Drug data: uses linked prescriptions
- Drug reference → Dose and interaction engine: uses dosing logic (evidence: `src/medis.ts`)
- Dose and interaction engine → Drug data: reads drug records (evidence: `src/med-engine.ts`)
- Dose and interaction engine → Drug data: reads BNF interactions (evidence: `src/med-engine.ts`)
- Anatomy atlas → 3D model viewer: controls viewer (evidence: `src/med-anat.ts`)
- Anatomy atlas → Anatomy model data: queries structures (evidence: `src/med-anat.ts`)
- Anatomy atlas → Anatomy learning content: shows learning content (evidence: `src/med-anat.ts`)
- 3D model viewer → Anatomy model data: reads model data (evidence: `src/anat3d-viewer.ts`)
- CPPT and patients → Jaga and SBAR: provides handoff context (evidence: `src/med-cppt.ts`)
- CPPT and patients → Prescription: inserts prescription (evidence: `src/med-cppt.ts`)
- CPPT and patients → PDF export: exports notes (evidence: `src/med-cppt.ts`)
- Jaga and SBAR → CPPT and patients: uses patient notes (evidence: `src/med-jaga.ts`)
- Jaga and SBAR → PDF export: exports handoff (evidence: `src/med-jaga.ts`)
- Prescription → PDF export: exports prescription (evidence: `src/medis.ts`)
- Plugin entry → Sound engine: configures sound (evidence: `src/main.ts`)
- Plugin entry → Local plugin data: stores patient data (evidence: `README.md`)
