# swayamshoubinsahoo/pulselens architecture

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

- Interactive diagram: https://gitdiagram.com/swayamshoubinsahoo/pulselens
- Repository: https://github.com/swayamshoubinsahoo/pulselens

## Overview

PulseLens is a Streamlit clinical tele-triage assistant. A clinic user enters demographics and symptoms, uploads or captures an image, and runs an assessment; the app validates the inputs, discovers usable Gemini models, submits the clinical context for analysis, and displays a triage tier and SOAP-style report. Intake, analysis, and reporting are implemented together in app.py rather than separate modules. The documented low-bandwidth/browser intent and clinical disclaimer are product context; no separate subsystem is shown for them.

Main entry points: [`app.py`](https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py) (Triage Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Patient Intake"]
  node_intake_ui["Patient Intake<br/>[app.py]"]
  node_visual_input["Image Input<br/>[app.py]"]
end

subgraph group_analysis["Triage Analysis"]
  node_assessment["Triage Workflow<br/>[app.py]"]
  node_soap_report["Triage Report<br/>[app.py]"]
end

subgraph group_integration["AI Integration"]
  node_model_discovery["Model Discovery<br/>[app.py]"]
  node_gemini{{"Gemini API"}}
end

node_clinic_user(("Clinic User"))

node_clinic_user -->|"enters details"| node_intake_ui
node_clinic_user -->|"provides image"| node_visual_input
node_intake_ui -->|"submits profile"| node_assessment
node_visual_input -->|"adds image"| node_assessment
node_assessment -->|"requests models"| node_model_discovery
node_model_discovery -->|"lists models"| node_gemini
node_assessment -->|"generates assessment"| node_gemini
node_assessment -->|"displays response"| node_soap_report
node_gemini -->|"returns assessment"| node_soap_report

click node_intake_ui "https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py"
click node_visual_input "https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py"
click node_assessment "https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py"
click node_model_discovery "https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py"
click node_soap_report "https://github.com/swayamshoubinsahoo/pulselens/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_intake_ui,node_visual_input,node_clinic_user toneBlue
class node_assessment,node_soap_report toneAmber
class node_model_discovery,node_gemini toneMint
```

## Components

### Patient Intake

- [Patient Intake](https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py): `app.py`
- [Image Input](https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py): `app.py`

### Triage Analysis

- [Triage Workflow](https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py): `app.py`
- [Triage Report](https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py): `app.py`

### AI Integration

- [Model Discovery](https://github.com/swayamshoubinsahoo/pulselens/blob/main/app.py): `app.py`
- **Gemini API**

### Other components

- **Clinic User**

## Connections

- Clinic User → Patient Intake: enters details (evidence: `app.py`)
- Clinic User → Image Input: provides image (evidence: `app.py`)
- Patient Intake → Triage Workflow: submits profile (evidence: `app.py`)
- Image Input → Triage Workflow: adds image (evidence: `app.py`)
- Triage Workflow → Model Discovery: requests models (evidence: `app.py`)
- Model Discovery → Gemini API: lists models (evidence: `app.py`)
- Triage Workflow → Gemini API: generates assessment (evidence: `app.py`)
- Triage Workflow → Triage Report: displays response (evidence: `app.py`)
- Gemini API → Triage Report: returns assessment (evidence: `app.py`)
