# dhanush342/e_smart_health_care_system architecture

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

## Overview

E-Health-Care is a Django healthcare platform. Patients use its portal for account and profile tasks, symptom or image-based checks, doctor search, appointments, feedback, and chat; doctors manage schedules and consultations, while administrators oversee users and disease mappings. The graph highlights the patient-to-diagnosis path and the separate scheduling, communication, and administration capabilities documented in the README. Source excerpts show selected model and view behavior; some additional feature links rely on the README or source-index references.

Main entry points: [`patient/views.py`](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/views.py) (Patient portal), [`api/views.py`](https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/views.py) (REST API), [`roleadmin/views.py`](https://github.com/dhanush342/e_smart_health_care_system/blob/main/roleadmin/views.py) (Admin portal), [`chat/views.py`](https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/views.py) (Chat service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portals["User Portals"]
  node_patient["Patient portal<br/>[views.py]"]
  node_doctor["Doctor portal<br/>[views.py]"]
end

subgraph group_clinical["Clinical Diagnostics"]
  node_diagnosis["Symptom prediction<br/>[diseaseml.py]"]
  node_heart["Heart risk model<br/>[heart.py]"]
  node_diabetes["Diabetes model<br/>[Diabetes.py]"]
  node_pneumonia["Pneumonia model<br/>[pneumonia.py]"]
  node_imagevalidator["X-ray validator<br/>[image_block.py]"]
  node_api["REST API<br/>[views.py]"]
  node_api_models[("API records<br/>[models.py]")]
end

subgraph group_care["Care Coordination"]
  node_patientdata[("Patient records<br/>[models.py]")]
  node_doctors[("Doctor profiles<br/>[models.py]")]
  node_appointments[("Appointment slots<br/>[models.py]")]
  node_appointmentforms["Booking forms<br/>[forms.py]"]
  node_chat["Chat service<br/>[views.py]"]
  node_chatdata[("Messages and presence<br/>[models.py]")]
  node_chatui["Chat interface<br/>[chat.js]"]
end

subgraph group_oversight["Administration"]
  node_admin["Admin portal<br/>[views.py]"]
  node_feedback[("Feedback and history<br/>[models.py]")]
end

node_user(("Patient"))
node_clinician(("Doctor"))
node_administrator(("Administrator"))

node_user -->|"uses portal"| node_patient
node_patient -->|"requests prediction"| node_diagnosis
node_patient -->|"runs assessment"| node_heart
node_patient -->|"runs assessment"| node_diabetes
node_patient -->|"runs scan"| node_pneumonia
node_patient -->|"validates image"| node_imagevalidator
node_patient -->|"searches doctors"| node_doctors
node_patient -->|"submits booking"| node_appointmentforms
node_appointmentforms -->|"creates booking"| node_appointments
node_doctor -->|"manages slots"| node_appointments
node_patient -->|"opens chat"| node_chat
node_chat -->|"reads and writes"| node_chatdata
node_chatui -.->|"uses chat service"| node_chat
node_patient -->|"updates records"| node_patientdata
node_patient -->|"submits feedback"| node_feedback
node_administrator -->|"uses portal"| node_admin
node_admin -->|"manages roster"| node_doctors
node_admin -->|"oversees records"| node_patientdata
node_patient -.->|"uses endpoints"| node_api
node_api -->|"serializes records"| node_api_models
node_api -->|"calls predictor"| node_diagnosis
node_clinician -->|"uses portal"| node_doctor

click node_patient "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/views.py"
click node_doctor "https://github.com/dhanush342/e_smart_health_care_system/blob/main/doctor/views.py"
click node_admin "https://github.com/dhanush342/e_smart_health_care_system/blob/main/roleadmin/views.py"
click node_diagnosis "https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/diseaseml.py"
click node_heart "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/heart.py"
click node_diabetes "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/Diabetes.py"
click node_pneumonia "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/pneumonia.py"
click node_imagevalidator "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/image_block.py"
click node_patientdata "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/models.py"
click node_doctors "https://github.com/dhanush342/e_smart_health_care_system/blob/main/doctor/models.py"
click node_appointments "https://github.com/dhanush342/e_smart_health_care_system/blob/main/appointment/models.py"
click node_appointmentforms "https://github.com/dhanush342/e_smart_health_care_system/blob/main/appointment/forms.py"
click node_chat "https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/views.py"
click node_chatdata "https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/models.py"
click node_chatui "https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/static/js/chat.js"
click node_api "https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/views.py"
click node_api_models "https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/models.py"
click node_feedback "https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/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_patient,node_doctor toneBlue
class node_diagnosis,node_heart,node_diabetes,node_pneumonia,node_imagevalidator,node_api,node_api_models toneAmber
class node_patientdata,node_doctors,node_appointments,node_appointmentforms,node_chat,node_chatdata,node_chatui toneMint
class node_admin,node_feedback toneRose
class node_user,node_clinician,node_administrator toneIndigo
```

## Components

### User Portals

- [Patient portal](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/views.py): `patient/views.py`
- [Doctor portal](https://github.com/dhanush342/e_smart_health_care_system/blob/main/doctor/views.py): `doctor/views.py`

### Clinical Diagnostics

- [Symptom prediction](https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/diseaseml.py): `api/diseaseml.py`
- [Heart risk model](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/heart.py): `patient/heart.py`
- [Diabetes model](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/Diabetes.py): `patient/Diabetes.py`
- [Pneumonia model](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/pneumonia.py): `patient/pneumonia.py`
- [X-ray validator](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/image_block.py): `patient/image_block.py`
- [REST API](https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/views.py): `api/views.py`
- [API records](https://github.com/dhanush342/e_smart_health_care_system/blob/main/api/models.py): `api/models.py`

### Care Coordination

- [Patient records](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/models.py): `patient/models.py`
- [Doctor profiles](https://github.com/dhanush342/e_smart_health_care_system/blob/main/doctor/models.py): `doctor/models.py`
- [Appointment slots](https://github.com/dhanush342/e_smart_health_care_system/blob/main/appointment/models.py): `appointment/models.py`
- [Booking forms](https://github.com/dhanush342/e_smart_health_care_system/blob/main/appointment/forms.py): `appointment/forms.py`
- [Chat service](https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/views.py): `chat/views.py`
- [Messages and presence](https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/models.py): `chat/models.py`
- [Chat interface](https://github.com/dhanush342/e_smart_health_care_system/blob/main/chat/static/js/chat.js): `chat/static/js/chat.js`

### Administration

- [Admin portal](https://github.com/dhanush342/e_smart_health_care_system/blob/main/roleadmin/views.py): `roleadmin/views.py`
- [Feedback and history](https://github.com/dhanush342/e_smart_health_care_system/blob/main/patient/models.py): `patient/models.py`

### Other components

- **Patient**
- **Doctor**
- **Administrator**

## Connections

- Patient → Patient portal: uses portal (evidence: `README.md`)
- Patient portal → Symptom prediction: requests prediction (evidence: `patient/views.py`)
- Patient portal → Heart risk model: runs assessment (evidence: `patient/views.py`)
- Patient portal → Diabetes model: runs assessment (evidence: `patient/views.py`)
- Patient portal → Pneumonia model: runs scan (evidence: `patient/views.py`)
- Patient portal → X-ray validator: validates image (evidence: `patient/views.py`)
- Patient portal → Doctor profiles: searches doctors (evidence: `patient/views.py`)
- Patient portal → Booking forms: submits booking (evidence: `patient/views.py`)
- Booking forms → Appointment slots: creates booking (evidence: `appointment/forms.py`)
- Doctor portal → Appointment slots: manages slots (evidence: `doctor/views.py`)
- Patient portal → Chat service: opens chat (evidence: `README.md`)
- Chat service → Messages and presence: reads and writes (evidence: `chat/views.py`)
- Chat interface → Chat service: uses chat service
- Patient portal → Patient records: updates records (evidence: `patient/views.py`)
- Patient portal → Feedback and history: submits feedback (evidence: `README.md`)
- Administrator → Admin portal: uses portal (evidence: `README.md`)
- Admin portal → Doctor profiles: manages roster (evidence: `roleadmin/views.py`)
- Admin portal → Patient records: oversees records (evidence: `roleadmin/views.py`)
- Patient portal → REST API: uses endpoints
- REST API → API records: serializes records (evidence: `api/views.py`)
- REST API → Symptom prediction: calls predictor (evidence: `api/views.py`)
- Doctor → Doctor portal: uses portal (evidence: `README.md`)
