A web-based telemedicine and emergency response platform built with Streamlit (frontend) and FastAPI (backend), using SQL Server for data storage.
- User Authentication (patients & medical staff)
- Symptom Submission (patients)
- Medical Record Viewing (medics)
- Diagnosis & Treatment Guidance (medics)
- Video & Chat Sessions
- Trigger & View Alerts
- Medical Supplies Management (view, update, delete)
- Delivery Logistics (request and track deliveries)
- Search and Rescue (SAR) Requests (with satellite/geolocation support)
- Dashboard (admin/medic utility)
- GNSS/Geolocation: Accurate mapping and location management.
- Satellite Earth Observation: Sentinel-2 for SAR operations.
- Satellite-based SAR Services: Enhanced emergency coordination.
- Python 3.8+
- Streamlit
- FastAPI
- Uvicorn
- pandas
- requests
- pyodbc (for SQL Server)
- SQL Server (for production mode)
Install dependencies:
pip install streamlit fastapi uvicorn pandas requests pyodbc
Here is your complete **README.md** file, including the corrected Nominatim link and a section for the space technologies used:
---
```markdown
## Requirements
- Python 3.8+
- [Streamlit](https://streamlit.io/)
- [FastAPI](https://fastapi.tiangolo.com/)
- [Uvicorn](https://www.uvicorn.org/)
- [pandas](https://pandas.pydata.org/)
- [requests](https://docs.python-requests.org/)
- [pyodbc](https://github.com/mkleehammer/pyodbc) (for SQL Server)
- SQL Server (for production mode)
Install dependencies:
```sh
pip install streamlit fastapi uvicorn pandas requests pyodbc
In the folder with telemedicine.py
:
uvicorn telemedicine:app --reload
In the folder with app.py
:
streamlit run app.py
The app will open in your browser at http://localhost:8501.
- Edit
API_URL
inapp.py
if your backend runs on a different host/port. - Database connection settings are in
telemedicine.py
(edit for your SQL Server).
- Patients: Log in and submit symptoms, join video/chat sessions, and trigger alerts.
- Medical Staff: Log in to view patient records, manage supplies, respond to alerts, and coordinate SAR operations.
You should have at least the following tables in your SQL Server database:
CREATE TABLE Symptoms (
id INT IDENTITY(1,1) PRIMARY KEY,
patient NVARCHAR(100) NOT NULL,
symptom NVARCHAR(100) NOT NULL,
user_severity INT NOT NULL,
calculated_severity INT NOT NULL,
timestamp DATETIME NOT NULL,
diagnosis NVARCHAR(255) NULL,
treatment_guidance NVARCHAR(255) NULL
);
CREATE TABLE MedicalSupplies (
id INT IDENTITY(1,1) PRIMARY KEY,
item NVARCHAR(100) NOT NULL,
quantity INT NOT NULL,
updates INT NOT NULL DEFAULT 0
);
CREATE TABLE Alerts (
alert_id INT IDENTITY(1,1) PRIMARY KEY,
patient NVARCHAR(100) NOT NULL,
status NVARCHAR(50) NOT NULL,
trigger_time DATETIME NOT NULL
);
CREATE TABLE SARRequests (
id INT IDENTITY(1,1) PRIMARY KEY,
emergency_type NVARCHAR(100) NOT NULL,
location NVARCHAR(255) NOT NULL,
urgency NVARCHAR(50) NOT NULL,
description NVARCHAR(255),
contact_number NVARCHAR(50),
satellite_data NVARCHAR(MAX)
);
Some key backend endpoints:
POST /token
— User authenticationPOST /submit-symptoms
— Submit symptoms (patient)GET /patient-symptoms
— Get symptoms for a patient (medic)POST /update-diagnosis
— Update diagnosis/treatment (medic)GET /medical-supplies
— List medical suppliesPOST /update-supply
— Update/add supplyDELETE /delete-supply
— Delete supplyPOST /trigger-alert
— Trigger alertGET /active-alerts
— List active alertsPOST /sar-request
— Submit SAR requestGET /sar-requests
— List SAR requestsGET /tables
— List all tablesGET /table/{table_name}
— Dashboard table viewDELETE /delete-row/{table_name}
— Delete a row by id
- Make sure your SQL Server database is set up with the required tables.
- For geolocation, the app uses the Nominatim OpenStreetMap API.
- For satellite features, see the SAR and satellite request sections.
- The app can be accessed from a mobile device browser as well as desktop.
MIT License
- [Konstantinos Trepas](mail to:ktrepas@gmail.com)
- European Space Agency (ESA) Copernicus/Sentinel-2
- OpenStreetMap Nominatim
- Streamlit, FastAPI, Uvicorn, Pandas