# diwakarreddyl/final-year-capstone-project architecture

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

- Interactive diagram: https://gitdiagram.com/diwakarreddyl/final-year-capstone-project
- Repository: https://github.com/diwakarreddyl/final-year-capstone-project

## Overview

MediSmart is a Django hospital-workflow application for patients, receptionists, doctors, and testers. Users enter through role-specific routes and dashboards; the main workflow covers appointment booking and doctor assignment, followed by test request approval, result upload, and clinician review with AI-assisted report analysis. Doctors can also create prescriptions. The excerpts establish the core forms, models, routes, and parts of the view logic; several feature relationships are documented only in the README, so those edges cite it rather than imply unsampled implementation details.

Main entry points: [`hospital/views.py`](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py) (Workflow views), [`hospital/urls.py`](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/urls.py) (Role routes), [`hospital/models.py`](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py) (Appointments), [`hospital/forms.py`](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/forms.py) (Role forms)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Hospital workflow"]
  node_views["Workflow views<br/>[views.py]"]
  node_appointments["Appointments<br/>[models.py]"]
  node_assignment["Doctor assignment<br/>[views.py]"]
end

subgraph group_clinical["Clinical records"]
  node_test_requests["Test requests<br/>[models.py]"]
  node_test_results["Test results<br/>[models.py]"]
  node_prescriptions["Prescriptions<br/>[models.py]"]
  node_sqlite[("SQLite database")]
end

subgraph group_intelligence["Report intelligence"]
  node_analysis["Report analysis<br/>[views.py]"]
  node_cnn["CNN prediction<br/>[views.py]"]
end

subgraph group_presentation["Web interface"]
  node_routes["Role routes<br/>[urls.py]"]
  node_forms["Role forms<br/>[forms.py]"]
  node_templates["Role dashboards"]
end

node_patient(("Patient"))
node_receptionist(("Receptionist"))
node_doctor(("Doctor"))
node_tester(("Tester"))

node_patient -->|"opens patient routes"| node_routes
node_receptionist -->|"opens reception routes"| node_routes
node_doctor -->|"opens doctor routes"| node_routes
node_tester -->|"opens tester routes"| node_routes
node_routes -->|"dispatches to"| node_views
node_views -->|"uses forms"| node_forms
node_views -->|"manages appointments"| node_appointments
node_views -->|"assigns doctors"| node_assignment
node_views -->|"manages requests"| node_test_requests
node_views -->|"accesses results"| node_test_results
node_views -->|"manages prescriptions"| node_prescriptions
node_views -->|"renders pages"| node_templates
node_views -->|"analyzes reports"| node_analysis
node_analysis -->|"predicts disease"| node_cnn
node_appointments -->|"persists records"| node_sqlite
node_test_requests -->|"has uploaded result"| node_test_results
node_prescriptions -->|"records treatment for"| node_appointments

click node_routes "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/urls.py"
click node_views "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py"
click node_forms "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/forms.py"
click node_templates "https://github.com/diwakarreddyl/final-year-capstone-project/tree/main/hospital/templates/hospital"
click node_appointments "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py"
click node_assignment "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py"
click node_test_requests "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py"
click node_test_results "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py"
click node_prescriptions "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py"
click node_analysis "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py"
click node_cnn "https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.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_views,node_appointments,node_assignment toneBlue
class node_test_requests,node_test_results,node_prescriptions,node_sqlite toneAmber
class node_analysis,node_cnn toneMint
class node_routes,node_forms,node_templates toneRose
class node_patient,node_receptionist,node_doctor,node_tester toneIndigo
```

## Components

### Hospital workflow

- [Workflow views](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py): `hospital/views.py`
- [Appointments](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py): `hospital/models.py`
- [Doctor assignment](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py): `hospital/views.py`

### Clinical records

- [Test requests](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py): `hospital/models.py`
- [Test results](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py): `hospital/models.py`
- [Prescriptions](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/models.py): `hospital/models.py`
- **SQLite database**

### Report intelligence

- [Report analysis](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py): `hospital/views.py`
- [CNN prediction](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/views.py): `hospital/views.py`

### Web interface

- [Role routes](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/urls.py): `hospital/urls.py`
- [Role forms](https://github.com/diwakarreddyl/final-year-capstone-project/blob/main/hospital/forms.py): `hospital/forms.py`
- [Role dashboards](https://github.com/diwakarreddyl/final-year-capstone-project/tree/main/hospital/templates/hospital): `hospital/templates/hospital`

### Other components

- **Patient**
- **Receptionist**
- **Doctor**
- **Tester**

## Connections

- Patient → Role routes: opens patient routes (evidence: `hospital/urls.py`)
- Receptionist → Role routes: opens reception routes (evidence: `hospital/urls.py`)
- Doctor → Role routes: opens doctor routes (evidence: `hospital/urls.py`)
- Tester → Role routes: opens tester routes (evidence: `hospital/urls.py`)
- Role routes → Workflow views: dispatches to (evidence: `hospital/urls.py`)
- Workflow views → Role forms: uses forms (evidence: `hospital/views.py`)
- Workflow views → Appointments: manages appointments (evidence: `hospital/views.py`)
- Workflow views → Doctor assignment: assigns doctors (evidence: `hospital/views.py`)
- Workflow views → Test requests: manages requests (evidence: `hospital/views.py`)
- Workflow views → Test results: accesses results (evidence: `hospital/views.py`)
- Workflow views → Prescriptions: manages prescriptions (evidence: `hospital/views.py`)
- Workflow views → Role dashboards: renders pages (evidence: `hospital/views.py`)
- Workflow views → Report analysis: analyzes reports (evidence: `hospital/views.py`)
- Report analysis → CNN prediction: predicts disease (evidence: `hospital/views.py`)
- Appointments → SQLite database: persists records (evidence: `README.md`)
- Test requests → Test results: has uploaded result (evidence: `hospital/models.py`)
- Prescriptions → Appointments: records treatment for (evidence: `hospital/models.py`)
