Skip to main content

FHIR Bundle Exporter

Export Flywheel Subjects as FHIR Bundles in json files.

Overview

Summary

Export Flywheel Subjects as FHIR Bundles in json files. See below for details on the Flywheel Hierarchy to FHIR mapping.

License

License: MIT

Classification

Category: Analysis

Gear Level:

  • Project
  • Subject
  • Session
  • Acquisition
  • Analysis

Usage

The FHIR Bundle Exporter gear is executed over a single subject or all subjects of a project. The output is a json file for each subject as output to both the gear and as an attachment to the corresponding Flywheel subject container. This json file is known as a FHIR Bundle. Each FHIR Bundle is a collection of resources that can be used to group and transmit resources across API requests.

Each exported FHIR Bundle maps concepts from the Flywheel Hierarchy (e.g. Subjects, Sessions, Acquisitions) to a collection of FHIR Resources (e.g. Patient, Encounter, Imaging Study ) and encoded references to specific file types.

Details of the Flywheel->FHIR Resource mapping are given in the linked FHIR Bundle Contents document.

This gear is intended to be used in conjunction with a project export process within same the project that this gear was/will be run. File paths in the Document Reference resources of the FHIR Bundle are relative to the project export directory.

Requirements

For the FHIR Bundle Exporter gear to produce a sufficiently representative FHIR Bundle, the following requirements should be met.

  • A valid Flywheel subject birthday OR non-Null age_days attribute for each Flywheel session
  • DICOM Tags are required or need to be de-identified before this gear is run
  • To export with references to NIfTI files, json sidecars, and other artifacts--with identifiable facial features removed--the following gears are recommended:
    • dcm-qc
    • dcm2niix
    • mriqc
    • pydeface
    • nifti2dicom

Satisfying the above requirements will ensure that a representative FHIR Bundle is produced with references to the following file types:

  • Compressed DICOMs (e.g. {file_name}.dcm.zip)
  • NIfTI Files (e.g. {file_name}.nii.gz)
  • JSON Sidecars (e.g. {file_name}.json)
  • bvec/bval files

For details on how each required Flywheel container attribute or DICOM Tag is encoded into the FHIR Bundle, see the FHIR Bundle Contents document.

Inputs

This gear has no file input. The FHIR Bundle Exporter gear is executed over a single subject or all subjects of a project.

Config

  • debug
    • Type: boolean
    • Description: Log debug messages
    • Default: False
  • include_encounter_resource
    • Type: boolean
    • Description: Include Encounter Resources in FHIR Bundle
    • Default: False
  • include_body_structure_resource
    • Type: boolean
    • Description: Include BodyStructure Resources in FHIR Bundle
    • Default: False

Outputs

The outputs are FHIR Bundles encoded in json files. There is a FHIR Bundle for each subject both within the gear output and as an attachment to the corresponding Flywheel subject container. The resources contained in each FHIR Bundle are described below.

FHIR Bundle Contents

Each Subject-Oriented FHIR Bundle contains the resources listed below. For more details please see the linked documentation.

Validating FHIR Bundles

The FHIR Bundle Exporter gear does not perform a rigorous validation of the FHIR Bundle. Only a basic validation of the FHIR Bundle structure is performed. Before relying on the FHIR Bundle for any purpose, it is recommended that the FHIR Bundle be validated using available resources, such as the Inferno Resource Validator. Other resources for validating FHIR Bundles can be found at the HL7 FHIR Validating Resources page.

Contributing

For more information about how to get started contributing to that gear, checkout CONTRIBUTING.md.

Disclaimer

Please note that this is an early version of the FHIR Bundle Exporter. It is currently in its initial development phase and as such, may not have all the features fully implemented or may contain bugs. We are actively working on adding more functionality and improving its performance and stability. We appreciate your patience and understanding during this phase. Please use this software with caution and feel free to report any issues or suggestions you may have to help us improve it.

Metadata

Release files for fw-gear-fhir-bundle-exporter 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fw-gear-fhir-bundle-exporter 0.1.4
File Interpreter ABI Platform
fw_gear_fhir_bundle_exporter-0.1.4-py3-none-any.whl Python 3 none any Details

Release files / fw_gear_fhir_bundle_exporter-0.1.4-py3-none-any.whl

Download URL fw_gear_fhir_bundle_exporter-0.1.4-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4941d704e352b4ffb31b5594da9c6cb65eb58772e6d36093abe52fa8a18093b
BLAKE2b-256 checksum
How to use checksums
84df4e07735505b57c68269a6c2c77db8ee53bc0bbc19b1d2053a5398a2a051e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.19 Linux/5.15.154+

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page