Skip to main content

Export FHIR Bundles as json files

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page