# tejbaraiya2438-rgb/life-linksih2026 architecture

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

- Interactive diagram: https://gitdiagram.com/tejbaraiya2438-rgb/life-linksih2026
- Repository: https://github.com/tejbaraiya2438-rgb/life-linksih2026

## Overview

LIFE LINK is a patient case-taking and medical-history application. Its documented journey is patient identification and guided input, optional document processing, history organization, draft summarization, doctor review, and consultation; emergency retrieval is a separate path. The sampled JavaScript confirms browser requests to patient API endpoints, while the README describes broader proposed capabilities. The Flask backend and data file are present in the tree, but their implementation was not sampled, so their internal relationships and the proposed AI, OCR, and access-control flows remain unverified.

Main entry points: [`static/js/app.js`](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js) (Guided case-taking), [`templates/doctor.html`](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/templates/doctor.html) (Doctor dashboard), [`app.py`](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/app.py) (Flask API), [`data/patients.json`](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/data/patients.json) (Patient history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Patient and clinician interaction"]
  node_patient_ui["Patient interface<br/>[app.js]"]
  node_guided_intake["Guided case-taking<br/>[app.js]"]
  node_doctor_ui["Doctor dashboard<br/>[doctor.html]"]
  node_emergency_access["Emergency access<br/>[app.js]"]
end

subgraph group_records["Medical history and records"]
  node_document_input["Document scanning"]
  node_document_extraction["Clinical extraction"]
  node_patient_history[("Patient history<br/>[patients.json]")]
  node_history_organization["History organization"]
end

subgraph group_review["Clinical review"]
  node_draft_summary["AI draft summary"]
  node_doctor_review["Doctor review<br/>[app.js]"]
  node_consultation["Consultation"]
end

subgraph group_platform["Application platform"]
  node_flask_api["Flask API<br/>[app.py]"]
end

node_patient(("Patient"))
node_care_team(("Doctor / care team"))

node_patient -->|"provides input"| node_guided_intake
node_guided_intake -.->|"uses"| node_patient_ui
node_patient_ui -->|"requests patient data"| node_flask_api
node_patient -.->|"provides documents"| node_document_input
node_document_input -.->|"scans documents"| node_document_extraction
node_document_extraction -.->|"extracts information"| node_history_organization
node_guided_intake -.->|"organizes information"| node_history_organization
node_history_organization -.->|"prepares draft"| node_draft_summary
node_draft_summary -.->|"presents draft"| node_doctor_review
node_care_team -.->|"uses"| node_doctor_ui
node_doctor_ui -.->|"supports review"| node_doctor_review
node_doctor_review -.->|"informs"| node_consultation
node_patient -.->|"is identified"| node_emergency_access
node_emergency_access -.->|"retrieves history"| node_patient_history
node_flask_api -.->|"uses records"| node_patient_history

click node_patient_ui "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js"
click node_guided_intake "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js"
click node_doctor_ui "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/templates/doctor.html"
click node_emergency_access "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js"
click node_patient_history "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/data/patients.json"
click node_doctor_review "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js"
click node_flask_api "https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/app.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_ui,node_guided_intake,node_doctor_ui,node_emergency_access toneBlue
class node_document_input,node_document_extraction,node_patient_history,node_history_organization toneAmber
class node_draft_summary,node_doctor_review,node_consultation toneMint
class node_flask_api toneRose
class node_patient,node_care_team toneIndigo
```

## Components

### Patient and clinician interaction

- [Patient interface](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js): `static/js/app.js`
- [Guided case-taking](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js): `static/js/app.js`
- [Doctor dashboard](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/templates/doctor.html): `templates/doctor.html`
- [Emergency access](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js): `static/js/app.js`

### Medical history and records

- **Document scanning**
- **Clinical extraction**
- [Patient history](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/data/patients.json): `data/patients.json`
- **History organization**

### Clinical review

- **AI draft summary**
- [Doctor review](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/static/js/app.js): `static/js/app.js`
- **Consultation**

### Application platform

- [Flask API](https://github.com/tejbaraiya2438-rgb/life-linksih2026/blob/main/app.py): `app.py`

### Other components

- **Patient**
- **Doctor / care team**

## Connections

- Patient → Guided case-taking: provides input (evidence: `README.md`)
- Guided case-taking → Patient interface: uses (evidence: `static/js/app.js`)
- Patient interface → Flask API: requests patient data (evidence: `static/js/app.js`)
- Patient → Document scanning: provides documents
- Document scanning → Clinical extraction: scans documents (evidence: `README.md`)
- Clinical extraction → History organization: extracts information (evidence: `README.md`)
- Guided case-taking → History organization: organizes information (evidence: `README.md`)
- History organization → AI draft summary: prepares draft (evidence: `README.md`)
- AI draft summary → Doctor review: presents draft (evidence: `README.md`)
- Doctor / care team → Doctor dashboard: uses
- Doctor dashboard → Doctor review: supports review
- Doctor review → Consultation: informs (evidence: `README.md`)
- Patient → Emergency access: is identified (evidence: `README.md`)
- Emergency access → Patient history: retrieves history (evidence: `README.md`)
- Flask API → Patient history: uses records
