Fhir Bulk Data API v10
Fhir Bulk Data API v10
Agenda
• Why a FHIR Bulk Data API?
• Technical Architecture & what’s new in 2.0
• Open Source Tools
• Adoption!
• Next steps and how to get involved
2
FHIR APIs
3
Use Cases
• Internal clinical data warehouse for study cohort identification
• Claims in EHR to provide comprehensive view
• Machine learning startup obtaining training data from cloud EHR
• Integration population health system with EHR system
• Transferring records from one EHR to another
• Payer database to assess care quality
• Reportable disease submission or other registry
4
Let’s enhance to support population level data
access
• FHIR Resources as a standard data model to simplify data parsing and
mapping
• FHIR Operation API to initiate the data extracts
• SMART Backend Services Authorization as security model
5
Focused Scope + Complementary Technologies
• Legal framework for sharing data between partners needs to be set
up out-of-band (BAAs, SLAs, DUAs)
• Real-time data - data loaded through bulk APIs can be supplemented
with real time FHIR REST API calls or subscriptions
• Patient matching - it’s possible to include identifiers like subscriber
number in Bulk Export FHIR resources
• Data transformation - can serve as a foundation for data pipeline
6
Technical Architecture
Bulk Data Access Implementation Guide
7
Bulk Data Access IG Versions
8
Kick-off Request
Bulk Data Kick-off Request Bulk Data
Client Server
(destination) (source)
9
Kick-off Request
• Asynchronous requests with status polling (HTTP GET only in v1, GET or POST in v2) Updated
Prefer: respond-async in v2
• FHIR Operation for all data on all patients (all data in the patient “compartment”)
[FHIR Server Base]/Patient/$export
• FHIR Operation for all data on a group of patients (eg. research cohort, plan members)
[FHIR Server Base]/Group/[group id]/$export
10
Kick-off Operation Parameters
_outputFormat The format for the generated bulk data files
Currently, only ndjson is supported
11
Kick-off Operation Parameters New in
v2
12
Kick-off Response
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
13
Kick-off Response Header
Status: 202 Accepted
Content-Location: [URL for status or deleting request]
14
Status Request #1
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
15
Status Response #1
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
16
In-Progress Status Response Header
Status: 202 Accepted
X-Progress: “50% complete”
Retry-After: 120
17
Status Request #2
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
18
Status Response #2
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
JSON manifest
19
Status Complete Response Body
1 "transactionTime" : "2020-07-13T13:28:17.239Z",
2 "request" : "https://example.com/Patient/$export?_type=Patient,Observation",
3 "requiresAccessToken" : true,
4 "output" : [{
"type" : "Patient",
"url" : "https://example.com/files/patient_file_1.ndjson"
},{
"type" : "Patient",
"url" : "https://example.com/files/patient_file_2.ndjson"
},{
"type" : "Observation",
"url" : "https://example.com/filesw/observation_file_1.ndjson"
}],
5 "deleted" : [{
New in "type" : "Bundle",
v2
"url" : "https://example.com/output/del_file_1.ndjson"
}],
6
"error" : [{
Updated "type" : "OperationOutcome",
in v2
"url" : "https://example.com/files/error_file_1.ndjson"
}]
20
File Request
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
JSON manifest
21
File Response
Bulk Data Kickoff Request Bulk Data
Client Server
(destination) (source)
Content Location
JSON manifest
22
FHIR Resources
Data models representing discrete clinical and administrative units (patient, practitioner,
allergy, medication order, etc.)
23
NDJSON
,
,
24
SMART Backend Services Authorization
• Out-of-band app registration (can use Dynamic Client Registration or
portal)
• Apps can register public key (JWKS format) or URL for public key
• Token requests signed with private key
• System level scope (parallels SMART “user” and “patient” scopes)
system/[resourceType].read
25
Registration Flow (once)
Backend Service Configure Public Key and other OAuth settings Bulk
Admin Data
Server
OAuth Client Id
26
Authorization Flow (min. once per request)
Backend Service Configure Public Key and other OAuth settings Bulk
Admin Data
Server
OAuth Client Id
27
Tutorial (Python): EHR Export to SQL Exploration
https://colab.research.google.com/drive/1HhEEB3MJ8LbMP2ta946s8OARPc5RflHu
28
Enhancements
in v2
29
Historical Group Data
30
Attachments New in
v2
OR
url element with an absolute URL for the file accessible using the same
authentication as the ndjson files
31
Open Source Tools
32
SMART Reference Server Implementation
https://bulk-data.smarthealthit.org
33
SMART Sample Client
https://github.com/smart-on-fhir/sample-apps-stu3/tree/master/fhir-downloader
34
ONC Inferno Testing Tool
https://inferno.healthit.gov/community
35
FHIR Data Census Tool
https://github.com/sync-for-science/data-census
36
Adoption
37
Growing number of implementations!
Open Source FHIR Servers EHRs
• Microsoft • Epic
• HAPI • Cerner (prototype)
• IBM • T-System (prototype)
38
US Regulatory Requirements
39
Next Steps
40
Get Involved!
• Use the APIs in real-world use cases and collect ideas for v3
• Open source modules (eg. de-identification, filtering, NLP)
• Define Bulk Import Operation (updates coming soon!)
Early draft proposals at https://github.com/smart-on-fhir/bulk-import/blob/master/import-pnp.md
41
slides: https://bit.ly/fhir-bulk-api
Resources
• Bulk Data Implementation Guide
STU2 (v2): https://hl7.org/fhir/uv/bulkdata/
STU1 (v1): http://hl7.org/fhir/uv/bulkdata/
• Bulk Data Discussion Group (Bulk Data Stream on FHIR Zulip Chat)
https://chat.fhir.org/#narrow/stream/bulk.20data
42