Respiratory Diagnostic Assistant
przez Arthur Skinner Neto @amfarm_3d
- 208
- 0
- 0
Introdução
In this final project, I created a customized GPT-based tool designed to automate preliminary diagnostic analysis for chronic respiratory diseases. The assistant was built with the goal of supporting healthcare professionals working in public hospital environments, where time and accuracy are both critical.
By collecting key respiratory test results from patient records — including RMF Test, Peak Flow, and Pulse Oximetry — and comparing them to consolidated reference tables, the GPT is able to generate a structured preliminary diagnosis, including alerts for potential hypoxemia and respiratory muscle weakness.
This tool empowers clinicians to act earlier, communicate more clearly with patients, and prioritize high-risk cases for specialized evaluation.

Suprimentos
To build this GPT-powered assistant, I used the following tools and resources:
Software & Tools
- OpenAI GPT Builder – to create a custom GPT with tailored instructions
- Python 3.11 – for data merging, logic testing, and report automation
- Pandas – for working with patient reference data tables
- FPDF & Streamlit (optional) – to create PDF outputs or interface prototypes
- Excel/CSV files – as the source for reference ranges by gender and age group
Data Sources
- Tabela_RMF_Referencia.xlsx – PImax & PEmax values with lower limits
- Tabela_PeakFlow_Referencia.xlsx – Peak Flow reference values
- Tabela_Oximetria_SpO2_Referencia.xlsx – Minimum SpO₂ values by age
- A final, consolidated file: Tabela_Referencia_Respiratoria_Adultos_V2.xlsx
All three tables were merged into one unified reference table to simplify comparison and improve the model's reasoning process.
Project: “Respiratory Diagnostic Assistant”
The Respiratory Diagnostic Assistant is a fully functional GPT trained to:
1. Collect the following from the healthcare provider:
- Gender and age
- PImax, PEmax, and their lower limits of normality (LLN)
- Peak Flow value
- SpO₂ percentage
2. Automatically compare these values against a reference table based on the patient’s sex and age group.
3. Classify the values as:
- Normal
- Reduced
- Severely Reduced
- Or in the case of SpO₂: mild, moderate, or severe hypoxemia
4. Generate a structured preliminary diagnosis including:
- Observations on each parameter
- A caution note stating that this is not a final diagnosis and should be reviewed by a pulmonologist
How It Works:
The GPT uses Python (Code Interpreter) to analyze structured data inputs and generate precise, medically guided feedback in real-time. Users upload the reference file once, and then enter each patient's data directly in the chat.
Example Conversation Flow:
User:
- Gender: M
- Age: 45
- PImax: 92
- PEmax: 105
- PImax LLM: 100
- PEmax LLM: 120
- Peak Flow: 480
- SpO₂: 91
GPT Response:
- PImax below the lower limit of normality (possible inspiratory muscle weakness).
- PEmax below normal (possible expiratory muscle weakness).
- Peak Flow slightly reduced.
- SpO₂ moderate hypoxemia.
⚠️ This is a preliminary automated report. Clinical confirmation is required ⚠️
Why It Matters:
This project demonstrates how GPTs can be leveraged ethically, efficiently, and practically in real-world healthcare workflows — especially in resource-limited public hospitals, where automation and early triage can dramatically improve outcomes.
The goal is not to replace medical professionals, but to assist them intelligently, and to inspire others to build GPTs that solve real-world problems with empathy and accuracy.





0 komentarzy
Zaloguj się lub dołącz bezpłatnie, aby móc komentować