Technical Setup Guide
Implementation details for EHR integration
Architecture Overview
EHR System → SMART Authorization → EuTxGNN App → FHIR API
Registration Requirements
App Metadata
| Field | Value |
|---|---|
| App Name | EuTxGNN Drug Repurposing |
| Launch URL | https://eutxgnn.yao.care/smart/launch.html |
| Redirect URL | https://eutxgnn.yao.care/smart/app.html |
| App Type | Public client |
Required Scopes
launch
patient/Patient.read
patient/MedicationRequest.read
Optional Scopes
patient/Condition.read
patient/AllergyIntolerance.read
OAuth 2.0 Flow
1. Launch Request
GET /smart/launch.html?iss={ehr_fhir_url}&launch={launch_token}
2. Authorization
The app redirects to the EHR’s authorization endpoint:
GET {authorize_url}?
response_type=code
&client_id={client_id}
&redirect_uri=https://eutxgnn.yao.care/smart/app.html
&scope=launch patient/Patient.read patient/MedicationRequest.read
&state={state}
&aud={fhir_url}
3. Token Exchange
POST {token_url}
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&code={authorization_code}
&redirect_uri={redirect_uri}
FHIR Resources Used
MedicationRequest
Query patient’s active medications:
GET {fhir_url}/MedicationRequest?patient={patient_id}&status=active
Patient
Get patient demographics:
GET {fhir_url}/Patient/{patient_id}
EuTxGNN API Integration
Query Drug Predictions
GET https://eutxgnn.yao.care/fhir/ClinicalUseDefinition?subject=MedicationKnowledge/{drugbank_id}
Response Format
FHIR R4 ClinicalUseDefinition resources containing:
- Predicted indication
- Evidence level
- Prediction confidence score
Security Considerations
- HTTPS Required: All communications must use TLS
- Token Handling: Access tokens are not stored server-side
- Data Minimization: Only required patient data is accessed
- Audit Logging: All accesses are logged for compliance
Testing
SMART App Launcher
Use the SMART App Launcher for testing:
- Select “Launch App”
- Enter EuTxGNN launch URL
- Select sample patient
- Verify app functionality
Support
For implementation support: