https://github.com/tdiprima/smart-app
SMART on FHIR
https://github.com/tdiprima/smart-app
smart-on-fhir
Last synced: 3 months ago
JSON representation
SMART on FHIR
- Host: GitHub
- URL: https://github.com/tdiprima/smart-app
- Owner: tdiprima
- License: mit
- Created: 2025-04-17T18:12:32.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-01T17:54:53.000Z (6 months ago)
- Last Synced: 2025-06-07T07:36:42.189Z (4 months ago)
- Topics: smart-on-fhir
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## ๐ฉบ SMART-on-FHIR Patient Dashboard
A simple Flask-based SMART-on-FHIR app that securely launches inside an EHR-like environment, requests authorization via SMART, and visualizes clinical data (Conditions, Medications, Observations) for a selected patient.
### ๐ Features
- SMART on FHIR compliant (using OAuth 2.0)
- Automatically discovers `.well-known/smart-configuration` to find auth endpoints
- Displays:
- ๐งโโ๏ธ Patient name
- ๐ Conditions
- ๐ Medications
- ๐ฌ Vital sign Observations
- ๐ Plotly chart of vitals over time
- Works with public SMART App Launcher### ๐งช Data Source
This app uses **synthetic patient data** provided by the [SMART Health IT App Launcher](https://launch.smarthealthit.org), which simulates a real SMART-on-FHIR environment using the HAPI FHIR server underneath.
### ๐ฆ Requirements
- Python 3.8+
- `pip install flask requests`### ๐งฐ How to Run It
```bash
export FLASK_SECRET_KEY="replace-this-with-a-secure-random-value"
python app.py
```Then go to:
**[https://launch.smarthealthit.org](https://launch.smarthealthit.org)**- Select **"EHR Launch"**
- Paste in:
```
http://localhost:8000/launch
```
- Pick a patient
- Click **Launch App**### โ Supported SMART Flow
- [x] EHR Launch (`?iss=...&launch=...`)
- [x] SMART discovery from `.well-known/smart-configuration`
- [x] Token exchange via `POST`
- [x] Patient-specific FHIR resource fetching with `access_token`### ๐ก๏ธ Security Notes
- This app uses `client_id="my-smart-app"` for the public sandbox.
- No client secrets required.
- For real deployment, use HTTPS, secure secrets, and register a private client.