# diya411/data_logging_system_for_physiological_parameters architecture

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

- Interactive diagram: https://gitdiagram.com/diya411/data_logging_system_for_physiological_parameters
- Repository: https://github.com/diya411/data_logging_system_for_physiological_parameters

## Overview

VITAL-CORE is a prototype for acquiring physiological measurements, logging them locally, and presenting live/history monitoring with ECG visualization, AI summaries, voice retrieval, and emergency alerts. The main documented workflow runs from MCU sensor acquisition over UART through CSV logging to a monitoring dashboard; separate scripts provide HL7 generation/conversion and network alert reception. The sampled files show several parallel or mismatched implementations, so uncertain connections—especially GUI-to-assistant wiring—are left out.

Main entry points: [`patient_data.csv`](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/patient_data.csv) (Patient CSV), [`AI_voice_assistence.py`](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/AI_voice_assistence.py) (Voice data retrieval), [`icu.py`](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py) (ICU monitor), [`Signal_Gen.c`](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/Signal_Gen.c) (MCU firmware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_acquisition["Acquisition"]
  node_sensors(("Vital sensors"))
  node_firmware["MCU firmware<br/>[Signal_Gen.c]"]
  node_uart_logger["UART CSV logger"]
  node_patient_csv[("Patient CSV<br/>[patient_data.csv]")]
end

subgraph group_monitoring["Monitoring"]
  node_dashboard["Monitoring dashboard"]
  node_cms["CSV dashboard<br/>[cms.py]"]
  node_icu["ICU monitor<br/>[icu.py]"]
  node_ecg["ECG simulation<br/>[ecg.py]"]
  node_live_json["Live HR data<br/>[icu.py]"]
end

subgraph group_intelligence["Intelligence"]
  node_ai_summary["AI trend summary<br/>[AI_summary.py]"]
  node_voice_assistant["Voice data retrieval"]
  node_patient_csv1[("Voice records CSV<br/>[patient_data1.csv]")]
  node_gemini["Gemini API"]
  node_groq["Groq API"]
  node_speech["Speech services"]
end

subgraph group_alerts["Alerts and Interop"]
  node_udp_alert["UDP alert sender<br/>[icu.py]"]
  node_nurse_station["Nurse alert receiver<br/>[receiver.py]"]
  node_hl7_generator["HL7 generator<br/>[hl7.py]"]
  node_hl7_file["HL7 records<br/>[hl7.py]"]
  node_converter["HL7 converter<br/>[convertion.py]"]
end

node_sensors -->|"measure"| node_firmware
node_firmware -->|"UART stream"| node_uart_logger
node_uart_logger -->|"append records"| node_patient_csv
node_patient_csv -->|"read history"| node_dashboard
node_patient_csv -->|"read history"| node_cms
node_patient_csv -->|"read records"| node_icu
node_dashboard -.->|"request analysis"| node_ai_summary
node_ai_summary -.->|"generate summary"| node_gemini
node_icu -->|"write HR"| node_live_json
node_live_json -->|"read HR"| node_ecg
node_voice_assistant -->|"read records"| node_patient_csv1
node_voice_assistant -.->|"query service"| node_groq
node_voice_assistant -.->|"recognize and speak"| node_speech
node_icu -->|"send alert"| node_udp_alert
node_udp_alert -->|"UDP broadcast"| node_nurse_station
node_hl7_generator -->|"append messages"| node_hl7_file
node_hl7_file -->|"read messages"| node_converter
node_converter -->|"append rows"| node_patient_csv

click node_firmware "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/Signal_Gen.c"
click node_uart_logger "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/accept_data_from_mcu.py"
click node_patient_csv "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/patient_data.csv"
click node_dashboard "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/central_monitor_gui.py"
click node_cms "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/cms.py"
click node_icu "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py"
click node_ecg "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/ecg.py"
click node_live_json "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py"
click node_ai_summary "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/AI_summary.py"
click node_voice_assistant "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/AI_voice_assistence.py"
click node_patient_csv1 "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/patient_data1.csv"
click node_udp_alert "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py"
click node_nurse_station "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/receiver.py"
click node_hl7_generator "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/hl7.py"
click node_hl7_file "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/hl7.py"
click node_converter "https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/convertion.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_sensors,node_firmware,node_uart_logger,node_patient_csv toneBlue
class node_dashboard,node_cms,node_icu,node_ecg,node_live_json toneAmber
class node_ai_summary,node_voice_assistant,node_patient_csv1,node_gemini,node_groq,node_speech toneMint
class node_udp_alert,node_nurse_station,node_hl7_generator,node_hl7_file,node_converter toneRose
```

## Components

### Acquisition

- **Vital sensors**
- [MCU firmware](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/Signal_Gen.c): `Signal_Gen.c`
- [UART CSV logger](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/accept_data_from_mcu.py): `accept_data_from_mcu.py`
- [Patient CSV](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/patient_data.csv): `patient_data.csv`

### Monitoring

- [Monitoring dashboard](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/central_monitor_gui.py): `central_monitor_gui.py`
- [CSV dashboard](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/cms.py): `cms.py`
- [ICU monitor](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py): `icu.py`
- [ECG simulation](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/ecg.py): `ecg.py`
- [Live HR data](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py): `icu.py`

### Intelligence

- [AI trend summary](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/AI_summary.py): `AI_summary.py`
- [Voice data retrieval](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/AI_voice_assistence.py): `AI_voice_assistence.py`
- [Voice records CSV](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/patient_data1.csv): `patient_data1.csv`
- **Gemini API**
- **Groq API**
- **Speech services**

### Alerts and Interop

- [UDP alert sender](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/icu.py): `icu.py`
- [Nurse alert receiver](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/receiver.py): `receiver.py`
- [HL7 generator](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/hl7.py): `hl7.py`
- [HL7 records](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/hl7.py): `hl7.py`
- [HL7 converter](https://github.com/diya411/data_logging_system_for_physiological_parameters/blob/main/convertion.py): `convertion.py`

## Connections

- Vital sensors → MCU firmware: measure
- MCU firmware → UART CSV logger: UART stream
- UART CSV logger → Patient CSV: append records
- Patient CSV → Monitoring dashboard: read history
- Patient CSV → CSV dashboard: read history
- Patient CSV → ICU monitor: read records
- Monitoring dashboard → AI trend summary: request analysis
- AI trend summary → Gemini API: generate summary
- ICU monitor → Live HR data: write HR
- Live HR data → ECG simulation: read HR
- Voice data retrieval → Voice records CSV: read records
- Voice data retrieval → Groq API: query service
- Voice data retrieval → Speech services: recognize and speak
- ICU monitor → UDP alert sender: send alert
- UDP alert sender → Nurse alert receiver: UDP broadcast
- HL7 generator → HL7 records: append messages
- HL7 records → HL7 converter: read messages
- HL7 converter → Patient CSV: append rows
