# sneha-20/clinical_mgmt architecture

> Architecture diagram of the GitHub repository sneha-20/clinical_mgmt, 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/sneha-20/clinical_mgmt
- Repository: https://github.com/sneha-20/clinical_mgmt

## Overview

Clinical_Mgmt is a clinic operations system: reception staff register patients and visits, audiologists manage clinical history, tests and trials, and staff handle service requests, billing, inventory and reporting. The frontend calls a Django REST API; backend domain records are represented by Django models. The graph emphasizes documented patient/service workflows and major README or route-index capabilities. Unsampled route handlers and much of the frontend service wiring limit evidence for several links, so those relationships are omitted rather than inferred.

Main entry points: [`Frontend/lib/api/client.js`](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/api/client.js) (Browser API client), [`Backend/Python/clinical/models.py`](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py) (Clinical records), [`Frontend/components/modules/receptionist/TgaServicePage.jsx`](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/TgaServicePage.jsx) (Service workspace), [`Backend/Python/clinical_be/urls.py`](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical_be/urls.py) (API routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Clinic frontend"]
  node_reception["Patient intake<br/>[usePatientData.js]"]
  node_clinical_ui["Audiology workflow"]
  node_service_page["Service workspace<br/>[TgaServicePage.jsx]"]
  node_service_list["Service queue<br/>[ServiceList.jsx]"]
  node_service_detail["Service actions<br/>[ServiceDetails.jsx]"]
  node_billing_ui["Billing screens<br/>[page.jsx]"]
  node_inventory_ui["Inventory screens"]
  node_analytics_ui["Clinic reports<br/>[page.jsx]"]
end

subgraph group_backend["Clinical API"]
  node_django_routes["API routing<br/>[urls.py]"]
  node_account_api["Accounts API<br/>[views.py]"]
  node_clinical_api["Clinical API<br/>[views.py]"]
  node_service_api["Service operations"]
  node_report_api["Clinic reports<br/>[admin_services.py]"]
end

subgraph group_domain["Clinic records"]
  node_account_records[("User accounts<br/>[models.py]")]
  node_clinic_records[("Clinical records<br/>[models.py]")]
  node_billing_records[("Bills and transactions<br/>[models.py]")]
  node_inventory_records[("Inventory and devices<br/>[models.py]")]
end

subgraph group_shared["API access"]
  node_client_api["Browser API client<br/>[client.js]"]
  node_axios["HTTP transport<br/>[axios.js]"]
  node_api_config["API endpoint config<br/>[config.js]"]
end

node_staff(("Clinic staff"))

node_staff -->|"registers visits"| node_reception
node_reception -.->|"requests patient data"| node_client_api
node_client_api -->|"sends HTTP"| node_axios
node_client_api -->|"gets API base"| node_api_config
node_axios -->|"configures base URL"| node_api_config
node_client_api -.->|"calls API"| node_django_routes
node_staff -->|"records assessments"| node_clinical_ui
node_clinical_ui -.->|"submits clinical data"| node_client_api
node_staff -->|"manages requests"| node_service_page
node_service_page -->|"renders"| node_service_list
node_service_page -->|"routes to details"| node_service_detail
node_service_list -.->|"selects service"| node_service_detail
node_service_detail -.->|"updates service"| node_clinical_api
node_service_api -->|"reads service visit"| node_clinic_records
node_service_api -->|"updates bill items"| node_billing_records
node_staff -->|"manages charges"| node_billing_ui
node_billing_ui -.->|"requests billing"| node_client_api
node_staff -->|"manages stock"| node_inventory_ui
node_inventory_ui -.->|"requests inventory"| node_client_api
node_staff -->|"reviews reports"| node_analytics_ui
node_analytics_ui -.->|"requests reports"| node_client_api
node_django_routes -.->|"routes accounts"| node_account_api
node_django_routes -.->|"routes clinical"| node_clinical_api
node_account_api -.->|"manages users"| node_account_records
node_clinical_api -.->|"manages visits"| node_clinic_records
node_report_api -->|"queries patients"| node_clinic_records
node_clinic_records -->|"references accounts"| node_account_records

click node_reception "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/hooks/usePatientData.js"
click node_clinical_ui "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/audiologist/case-history-form.jsx"
click node_service_page "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/TgaServicePage.jsx"
click node_service_list "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/component/ServiceList.jsx"
click node_service_detail "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/component/ServiceDetails.jsx"
click node_billing_ui "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/app/dashboard/billing/%5BvisitId%5D/page.jsx"
click node_inventory_ui "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/InventoryManagement/inventory-management.jsx"
click node_analytics_ui "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/app/dashboard/analytics/page.jsx"
click node_client_api "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/api/client.js"
click node_axios "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/axios.js"
click node_api_config "https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/utils/config.js"
click node_django_routes "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical_be/urls.py"
click node_account_api "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/accounts/views.py"
click node_clinical_api "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/views.py"
click node_service_api "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/api_for_services.py"
click node_report_api "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/admin_services.py"
click node_account_records "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/accounts/models.py"
click node_clinic_records "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py"
click node_billing_records "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py"
click node_inventory_records "https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py"

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_reception,node_clinical_ui,node_service_page,node_service_list,node_service_detail,node_billing_ui,node_inventory_ui,node_analytics_ui toneBlue
class node_django_routes,node_account_api,node_clinical_api,node_service_api,node_report_api toneAmber
class node_account_records,node_clinic_records,node_billing_records,node_inventory_records toneMint
class node_client_api,node_axios,node_api_config toneRose
class node_staff toneIndigo
```

## Components

### Clinic frontend

- [Patient intake](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/hooks/usePatientData.js): `Frontend/lib/hooks/usePatientData.js`
- [Audiology workflow](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/audiologist/case-history-form.jsx): `Frontend/components/modules/audiologist/case-history-form.jsx`
- [Service workspace](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/TgaServicePage.jsx): `Frontend/components/modules/receptionist/TgaServicePage.jsx`
- [Service queue](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/component/ServiceList.jsx): `Frontend/components/modules/receptionist/component/ServiceList.jsx`
- [Service actions](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/receptionist/component/ServiceDetails.jsx): `Frontend/components/modules/receptionist/component/ServiceDetails.jsx`
- [Billing screens](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/app/dashboard/billing/%5BvisitId%5D/page.jsx): `Frontend/app/dashboard/billing/[visitId]/page.jsx`
- [Inventory screens](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/components/modules/InventoryManagement/inventory-management.jsx): `Frontend/components/modules/InventoryManagement/inventory-management.jsx`
- [Clinic reports](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/app/dashboard/analytics/page.jsx): `Frontend/app/dashboard/analytics/page.jsx`

### Clinical API

- [API routing](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical_be/urls.py): `Backend/Python/clinical_be/urls.py`
- [Accounts API](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/accounts/views.py): `Backend/Python/accounts/views.py`
- [Clinical API](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/views.py): `Backend/Python/clinical/views.py`
- [Service operations](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/api_for_services.py): `Backend/Python/clinical/api_for_services.py`
- [Clinic reports](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/admin_services.py): `Backend/Python/clinical/admin_services.py`

### Clinic records

- [User accounts](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/accounts/models.py): `Backend/Python/accounts/models.py`
- [Clinical records](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py): `Backend/Python/clinical/models.py`
- [Bills and transactions](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py): `Backend/Python/clinical/models.py`
- [Inventory and devices](https://github.com/sneha-20/clinical_mgmt/blob/main/Backend/Python/clinical/models.py): `Backend/Python/clinical/models.py`

### API access

- [Browser API client](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/api/client.js): `Frontend/lib/api/client.js`
- [HTTP transport](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/axios.js): `Frontend/lib/axios.js`
- [API endpoint config](https://github.com/sneha-20/clinical_mgmt/blob/main/Frontend/lib/utils/config.js): `Frontend/lib/utils/config.js`

### Other components

- **Clinic staff**

## Connections

- Clinic staff → Patient intake: registers visits (evidence: `README.md`)
- Patient intake → Browser API client: requests patient data
- Browser API client → HTTP transport: sends HTTP (evidence: `Frontend/lib/api/client.js`)
- Browser API client → API endpoint config: gets API base (evidence: `Frontend/lib/api/client.js`)
- HTTP transport → API endpoint config: configures base URL (evidence: `Frontend/lib/axios.js`)
- Browser API client → API routing: calls API
- Clinic staff → Audiology workflow: records assessments (evidence: `README.md`)
- Audiology workflow → Browser API client: submits clinical data
- Clinic staff → Service workspace: manages requests (evidence: `Frontend/components/modules/receptionist/TgaServicePage.jsx`)
- Service workspace → Service queue: renders (evidence: `Frontend/components/modules/receptionist/TgaServicePage.jsx`)
- Service workspace → Service actions: routes to details (evidence: `Frontend/components/modules/receptionist/TgaServicePage.jsx`)
- Service queue → Service actions: selects service
- Service actions → Clinical API: updates service
- Service operations → Clinical records: reads service visit (evidence: `Backend/Python/clinical/api_for_services.py`)
- Service operations → Bills and transactions: updates bill items (evidence: `Backend/Python/clinical/api_for_services.py`)
- Clinic staff → Billing screens: manages charges
- Billing screens → Browser API client: requests billing
- Clinic staff → Inventory screens: manages stock
- Inventory screens → Browser API client: requests inventory
- Clinic staff → Clinic reports: reviews reports
- Clinic reports → Browser API client: requests reports
- API routing → Accounts API: routes accounts
- API routing → Clinical API: routes clinical
- Accounts API → User accounts: manages users
- Clinical API → Clinical records: manages visits
- Clinic reports → Clinical records: queries patients (evidence: `Backend/Python/clinical/admin_services.py`)
- Clinical records → User accounts: references accounts (evidence: `Backend/Python/clinical/models.py`)
