# pernamittasumanthreddy/project-4 architecture

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

- Interactive diagram: https://gitdiagram.com/pernamittasumanthreddy/project-4
- Repository: https://github.com/pernamittasumanthreddy/project-4

## Overview

This repository is a multi-tenant hospital management platform; the files shown here represent its billing, finance, and revenue-cycle domain. The documented user journey runs from invoice and tariff management through payer claims and payment settlement to accounting and tax compliance, with analytics as a reporting layer. The README supports these capabilities, but most backend wiring was not sampled; dashed, uncited links therefore indicate documented or plausible integration points rather than verified calls.

Main entry points: [`HMS_Member6_Finance_Billing/frontend/src/views/InvoiceManagementView.tsx`](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/frontend/src/views/InvoiceManagementView.tsx) (Finance screens), [`HMS_Member6_Finance_Billing/backend/apps/billing/views.py`](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/views.py) (Billing endpoints), [`HMS_Member6_Finance_Billing/backend/apps/accounting/views.py`](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/views.py) (Accounting endpoints), [`HMS_Member6_Finance_Billing/frontend/src/services/api.ts`](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/frontend/src/services/api.ts) (Finance API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Finance workspace"]
  node_finance_ui["Finance screens"]
  node_finance_api["Finance API client<br/>[api.ts]"]
end

subgraph group_billing["Billing and tariffs"]
  node_billing_views["Billing endpoints<br/>[views.py]"]
  node_billing_records[("Billing records<br/>[models.py]")]
  node_specialty_tariffs["Specialty tariffs"]
end

subgraph group_claims["Insurance claims"]
  node_insurance_views["Claims endpoints<br/>[views.py]"]
  node_edi837i["837I claim engine"]
end

subgraph group_settlement["Payments and tax"]
  node_payment_views["Payment endpoints<br/>[views.py]"]
  node_gateway_recon["Gateway reconciliation"]
  node_tax_views["Tax endpoints<br/>[views.py]"]
  node_room_gst["Room-rent GST"]
end

subgraph group_accounting["Accounting and analytics"]
  node_accounting_views["Accounting endpoints<br/>[views.py]"]
  node_ledger[("Accounting records<br/>[models.py]")]
  node_revenue_recognition["IFRS 15 revenue"]
  node_analytics["RCM analytics"]
end

node_staff(("Hospital finance staff"))

node_staff -.->|"uses"| node_finance_ui
node_finance_ui -.->|"requests data"| node_finance_api
node_finance_api -.->|"calls API"| node_billing_views
node_billing_views -.->|"manages"| node_billing_records
node_billing_views -.->|"prices services"| node_specialty_tariffs
node_billing_views -.->|"supports claims"| node_insurance_views
node_insurance_views -.->|"prepares claims"| node_edi837i
node_finance_ui -.->|"manages payments"| node_payment_views
node_payment_views -.->|"reconciles settlements"| node_gateway_recon
node_finance_ui -.->|"configures tax"| node_tax_views
node_tax_views -.->|"checks room GST"| node_room_gst
node_finance_ui -.->|"reviews accounts"| node_accounting_views
node_accounting_views -.->|"manages ledger"| node_ledger
node_accounting_views -.->|"recognizes revenue"| node_revenue_recognition
node_finance_ui -.->|"reviews analytics"| node_analytics

click node_finance_ui "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/frontend/src/views/InvoiceManagementView.tsx"
click node_finance_api "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/frontend/src/services/api.ts"
click node_billing_views "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/views.py"
click node_billing_records "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/models.py"
click node_specialty_tariffs "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/catalogs/radiology_tariff_engine.py"
click node_insurance_views "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/insurance/views.py"
click node_edi837i "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/insurance/edi_specs/edi_837i_transaction_engine.py"
click node_payment_views "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/payments/views.py"
click node_gateway_recon "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/payments/reconciliation/payment_gateway_reconciliation_engine.py"
click node_tax_views "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/taxes/views.py"
click node_room_gst "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/taxes/gst_matrices/gst_room_rent_compliance_engine.py"
click node_accounting_views "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/views.py"
click node_ledger "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/models.py"
click node_revenue_recognition "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/standards/revenue_recognition_ifrs15_engine.py"
click node_analytics "https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/analytics/rcm_engines/rcm_analytics_predictive_engine.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_finance_ui,node_finance_api toneBlue
class node_billing_views,node_billing_records,node_specialty_tariffs toneAmber
class node_insurance_views,node_edi837i toneMint
class node_payment_views,node_gateway_recon,node_tax_views,node_room_gst toneRose
class node_accounting_views,node_ledger,node_revenue_recognition,node_analytics,node_staff toneIndigo
```

## Components

### Finance workspace

- [Finance screens](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/frontend/src/views/InvoiceManagementView.tsx): `HMS_Member6_Finance_Billing/frontend/src/views/InvoiceManagementView.tsx`
- [Finance API client](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/frontend/src/services/api.ts): `HMS_Member6_Finance_Billing/frontend/src/services/api.ts`

### Billing and tariffs

- [Billing endpoints](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/views.py): `HMS_Member6_Finance_Billing/backend/apps/billing/views.py`
- [Billing records](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/models.py): `HMS_Member6_Finance_Billing/backend/apps/billing/models.py`
- [Specialty tariffs](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/billing/catalogs/radiology_tariff_engine.py): `HMS_Member6_Finance_Billing/backend/apps/billing/catalogs/radiology_tariff_engine.py`

### Insurance claims

- [Claims endpoints](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/insurance/views.py): `HMS_Member6_Finance_Billing/backend/apps/insurance/views.py`
- [837I claim engine](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/insurance/edi_specs/edi_837i_transaction_engine.py): `HMS_Member6_Finance_Billing/backend/apps/insurance/edi_specs/edi_837i_transaction_engine.py`

### Payments and tax

- [Payment endpoints](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/payments/views.py): `HMS_Member6_Finance_Billing/backend/apps/payments/views.py`
- [Gateway reconciliation](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/payments/reconciliation/payment_gateway_reconciliation_engine.py): `HMS_Member6_Finance_Billing/backend/apps/payments/reconciliation/payment_gateway_reconciliation_engine.py`
- [Tax endpoints](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/taxes/views.py): `HMS_Member6_Finance_Billing/backend/apps/taxes/views.py`
- [Room-rent GST](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/taxes/gst_matrices/gst_room_rent_compliance_engine.py): `HMS_Member6_Finance_Billing/backend/apps/taxes/gst_matrices/gst_room_rent_compliance_engine.py`

### Accounting and analytics

- [Accounting endpoints](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/views.py): `HMS_Member6_Finance_Billing/backend/apps/accounting/views.py`
- [Accounting records](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/models.py): `HMS_Member6_Finance_Billing/backend/apps/accounting/models.py`
- [IFRS 15 revenue](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/accounting/standards/revenue_recognition_ifrs15_engine.py): `HMS_Member6_Finance_Billing/backend/apps/accounting/standards/revenue_recognition_ifrs15_engine.py`
- [RCM analytics](https://github.com/pernamittasumanthreddy/project-4/blob/main/HMS_Member6_Finance_Billing/backend/apps/analytics/rcm_engines/rcm_analytics_predictive_engine.py): `HMS_Member6_Finance_Billing/backend/apps/analytics/rcm_engines/rcm_analytics_predictive_engine.py`

### Other components

- **Hospital finance staff**

## Connections

- Hospital finance staff → Finance screens: uses
- Finance screens → Finance API client: requests data
- Finance API client → Billing endpoints: calls API
- Billing endpoints → Billing records: manages
- Billing endpoints → Specialty tariffs: prices services
- Billing endpoints → Claims endpoints: supports claims
- Claims endpoints → 837I claim engine: prepares claims
- Finance screens → Payment endpoints: manages payments
- Payment endpoints → Gateway reconciliation: reconciles settlements
- Finance screens → Tax endpoints: configures tax
- Tax endpoints → Room-rent GST: checks room GST
- Finance screens → Accounting endpoints: reviews accounts
- Accounting endpoints → Accounting records: manages ledger
- Accounting endpoints → IFRS 15 revenue: recognizes revenue
- Finance screens → RCM analytics: reviews analytics
