# pradip-p/e-health-care architecture

> Architecture diagram of the GitHub repository pradip-p/e-health-care, 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/pradip-p/e-health-care
- Repository: https://github.com/pradip-p/e-health-care

## Overview

E-Health-Care is a Django healthcare app for patient self-service, basic disease prediction, doctor discovery, and appointment booking, with doctor and admin portals. The main patient workflow is to submit symptoms or health data (or an X-ray), receive a prediction, and use doctor search or appointment features; patients can also provide feedback. Doctors manage availability and appointments and can email precautions, while admins manage doctors, disease assignments, patients, predictions, and feedback. The graph includes chat and the REST disease API as additional capabilities. Some feature connections are documented only in the README; unsampled implementation details are not inferred.

Main entry points: [`patient/views.py`](https://github.com/pradip-p/e-health-care/blob/master/patient/views.py) (Patient portal), [`doctor/views.py`](https://github.com/pradip-p/e-health-care/blob/master/doctor/views.py) (Doctor portal), [`roleadmin/views.py`](https://github.com/pradip-p/e-health-care/blob/master/roleadmin/views.py) (Admin portal), [`doctor/models.py`](https://github.com/pradip-p/e-health-care/blob/master/doctor/models.py) (Doctor profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patient["Patient care"]
  node_patient_views["Patient portal<br/>[views.py]"]
  node_patient_data[("Patient records<br/>[models.py]")]
  node_feedback[("Patient feedback<br/>[models.py]")]
end

subgraph group_clinical["Prediction"]
  node_symptom_model["Symptom prediction<br/>[diseaseml.py]"]
  node_heart_model["Heart prediction<br/>[heart.py]"]
  node_diabetes_model["Diabetes prediction<br/>[Diabetes.py]"]
  node_pneumonia_model["Pneumonia prediction<br/>[pneumonia.py]"]
  node_image_model["Image processing<br/>[image_block.py]"]
  node_prediction_records[("Prediction history<br/>[models.py]")]
end

subgraph group_appointments["Appointments"]
  node_appointment_forms["Appointment forms<br/>[forms.py]"]
  node_appointment_records[("Appointment records<br/>[models.py]")]
end

subgraph group_operations["Care operations"]
  node_doctor_records[("Doctor profiles<br/>[models.py]")]
  node_admin_portal["Admin portal<br/>[views.py]"]
  node_doctor_portal["Doctor portal<br/>[views.py]"]
end

subgraph group_platform["Messaging and API"]
  node_chat_portal["Chat endpoints<br/>[views.py]"]
  node_chat_records[("Messages<br/>[models.py]")]
  node_api_endpoints["Disease API<br/>[views.py]"]
  node_api_serializers["API serializers<br/>[serializers.py]"]
  node_api_records[("API disease records<br/>[models.py]")]
end

node_patient_actor(("Patient"))
node_email_service["Email service"]

node_patient_actor -->|"uses"| node_patient_views
node_patient_views -->|"reads and updates"| node_patient_data
node_patient_views -->|"invokes"| node_symptom_model
node_patient_views -->|"invokes"| node_heart_model
node_patient_views -->|"invokes"| node_diabetes_model
node_patient_views -->|"invokes"| node_pneumonia_model
node_patient_views -->|"invokes"| node_image_model
node_patient_views -->|"records predictions"| node_prediction_records
node_patient_views -->|"searches doctors"| node_doctor_records
node_patient_views -->|"validates booking"| node_appointment_forms
node_patient_views -->|"books appointments"| node_appointment_records
node_patient_views -->|"reads feedback"| node_feedback
node_doctor_portal -->|"uses"| node_appointment_forms
node_doctor_portal -->|"manages appointments"| node_appointment_records
node_doctor_portal -->|"reads doctor profile"| node_doctor_records
node_doctor_portal -->|"sends precautions"| node_email_service
node_admin_portal -->|"manages doctors"| node_doctor_records
node_admin_portal -->|"manages patients"| node_patient_data
node_admin_portal -->|"reviews feedback"| node_feedback
node_chat_portal -->|"reads and writes"| node_chat_records
node_api_endpoints -->|"serializes"| node_api_serializers
node_api_endpoints -->|"invokes"| node_symptom_model
node_api_serializers -->|"serializes records"| node_api_records

click node_patient_views "https://github.com/pradip-p/e-health-care/blob/master/patient/views.py"
click node_patient_data "https://github.com/pradip-p/e-health-care/blob/master/patient/models.py"
click node_feedback "https://github.com/pradip-p/e-health-care/blob/master/patient/models.py"
click node_symptom_model "https://github.com/pradip-p/e-health-care/blob/master/api/diseaseml.py"
click node_heart_model "https://github.com/pradip-p/e-health-care/blob/master/patient/heart.py"
click node_diabetes_model "https://github.com/pradip-p/e-health-care/blob/master/patient/Diabetes.py"
click node_pneumonia_model "https://github.com/pradip-p/e-health-care/blob/master/patient/pneumonia.py"
click node_image_model "https://github.com/pradip-p/e-health-care/blob/master/patient/image_block.py"
click node_prediction_records "https://github.com/pradip-p/e-health-care/blob/master/patient/models.py"
click node_doctor_records "https://github.com/pradip-p/e-health-care/blob/master/doctor/models.py"
click node_admin_portal "https://github.com/pradip-p/e-health-care/blob/master/roleadmin/views.py"
click node_doctor_portal "https://github.com/pradip-p/e-health-care/blob/master/doctor/views.py"
click node_appointment_forms "https://github.com/pradip-p/e-health-care/blob/master/appointment/forms.py"
click node_appointment_records "https://github.com/pradip-p/e-health-care/blob/master/appointment/models.py"
click node_chat_portal "https://github.com/pradip-p/e-health-care/blob/master/chat/views.py"
click node_chat_records "https://github.com/pradip-p/e-health-care/blob/master/chat/models.py"
click node_api_endpoints "https://github.com/pradip-p/e-health-care/blob/master/api/views.py"
click node_api_serializers "https://github.com/pradip-p/e-health-care/blob/master/api/serializers.py"
click node_api_records "https://github.com/pradip-p/e-health-care/blob/master/api/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_views,node_patient_data,node_feedback toneBlue
class node_symptom_model,node_heart_model,node_diabetes_model,node_pneumonia_model,node_image_model,node_prediction_records toneAmber
class node_appointment_forms,node_appointment_records toneMint
class node_doctor_records,node_admin_portal,node_doctor_portal toneRose
class node_chat_portal,node_chat_records,node_api_endpoints,node_api_serializers,node_api_records,node_patient_actor,node_email_service toneIndigo
```

## Components

### Patient care

- [Patient portal](https://github.com/pradip-p/e-health-care/blob/master/patient/views.py): `patient/views.py`
- [Patient records](https://github.com/pradip-p/e-health-care/blob/master/patient/models.py): `patient/models.py`
- [Patient feedback](https://github.com/pradip-p/e-health-care/blob/master/patient/models.py): `patient/models.py`

### Prediction

- [Symptom prediction](https://github.com/pradip-p/e-health-care/blob/master/api/diseaseml.py): `api/diseaseml.py`
- [Heart prediction](https://github.com/pradip-p/e-health-care/blob/master/patient/heart.py): `patient/heart.py`
- [Diabetes prediction](https://github.com/pradip-p/e-health-care/blob/master/patient/Diabetes.py): `patient/Diabetes.py`
- [Pneumonia prediction](https://github.com/pradip-p/e-health-care/blob/master/patient/pneumonia.py): `patient/pneumonia.py`
- [Image processing](https://github.com/pradip-p/e-health-care/blob/master/patient/image_block.py): `patient/image_block.py`
- [Prediction history](https://github.com/pradip-p/e-health-care/blob/master/patient/models.py): `patient/models.py`

### Appointments

- [Appointment forms](https://github.com/pradip-p/e-health-care/blob/master/appointment/forms.py): `appointment/forms.py`
- [Appointment records](https://github.com/pradip-p/e-health-care/blob/master/appointment/models.py): `appointment/models.py`

### Care operations

- [Doctor profiles](https://github.com/pradip-p/e-health-care/blob/master/doctor/models.py): `doctor/models.py`
- [Admin portal](https://github.com/pradip-p/e-health-care/blob/master/roleadmin/views.py): `roleadmin/views.py`
- [Doctor portal](https://github.com/pradip-p/e-health-care/blob/master/doctor/views.py): `doctor/views.py`

### Messaging and API

- [Chat endpoints](https://github.com/pradip-p/e-health-care/blob/master/chat/views.py): `chat/views.py`
- [Messages](https://github.com/pradip-p/e-health-care/blob/master/chat/models.py): `chat/models.py`
- [Disease API](https://github.com/pradip-p/e-health-care/blob/master/api/views.py): `api/views.py`
- [API serializers](https://github.com/pradip-p/e-health-care/blob/master/api/serializers.py): `api/serializers.py`
- [API disease records](https://github.com/pradip-p/e-health-care/blob/master/api/models.py): `api/models.py`

### Other components

- **Patient**
- **Email service**

## Connections

- Patient → Patient portal: uses (evidence: `README.md`)
- Patient portal → Patient records: reads and updates (evidence: `patient/views.py`)
- Patient portal → Symptom prediction: invokes (evidence: `patient/views.py`)
- Patient portal → Heart prediction: invokes (evidence: `patient/views.py`)
- Patient portal → Diabetes prediction: invokes (evidence: `patient/views.py`)
- Patient portal → Pneumonia prediction: invokes (evidence: `patient/views.py`)
- Patient portal → Image processing: invokes (evidence: `patient/views.py`)
- Patient portal → Prediction history: records predictions (evidence: `patient/views.py`)
- Patient portal → Doctor profiles: searches doctors (evidence: `patient/views.py`)
- Patient portal → Appointment forms: validates booking (evidence: `patient/views.py`)
- Patient portal → Appointment records: books appointments (evidence: `patient/views.py`)
- Patient portal → Patient feedback: reads feedback (evidence: `patient/views.py`)
- Doctor portal → Appointment forms: uses (evidence: `doctor/views.py`)
- Doctor portal → Appointment records: manages appointments (evidence: `doctor/views.py`)
- Doctor portal → Doctor profiles: reads doctor profile (evidence: `doctor/views.py`)
- Doctor portal → Email service: sends precautions (evidence: `doctor/views.py`)
- Admin portal → Doctor profiles: manages doctors (evidence: `roleadmin/views.py`)
- Admin portal → Patient records: manages patients (evidence: `roleadmin/views.py`)
- Admin portal → Patient feedback: reviews feedback (evidence: `roleadmin/views.py`)
- Chat endpoints → Messages: reads and writes (evidence: `chat/views.py`)
- Disease API → API serializers: serializes (evidence: `api/views.py`)
- Disease API → Symptom prediction: invokes (evidence: `api/views.py`)
- API serializers → API disease records: serializes records (evidence: `api/serializers.py`)
