An open API service indexing awesome lists of open source software.

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

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.