Skip to content

SemanticClarity/oca-fhir-cli

Repository files navigation

oca-fhir-cli

Extensible CLI tool to convert FHIR R4 bundles into OCA Schema base and core overlays (Character, Entry, Format, Information and Label).

Caveats: The following modules are provided strictly for demonstration purposes only, and not intended for production use. These modules have not been reviewed or approved by governing entities relevant to the standards below.

The current release contains the following example modules:

  1. Good Health Pass Draft examples: The directory https://github.com/SemanticClarity/oca-fhir-cli/master/generated/cvc2ghp contains examples of draft GHP Vaccination Credentials representing data mapping and descriptive property labels using the CA CVC profile as an example. Updates will be provided as the data formats specifications for GHP artifacts are finalized. The directory listed above contains OCA schema base and overlays for the following locales, en-ca and fr-ca.

  2. CDC Covid-19 Vaccination Reporting example (work in progress): Input file example is provided in csv format, per CDC Covid-19 reporting specification. The tool will covert this input file in to a FHIR R4 bundle internally. Currently, this input csv is mapped to a FHIR R4 Bundle with Patient, Immunization, resources. This mapping is customizable via the use of a ConceptMap (provided), but the recommended approach is to follow the community best practice of creating a FHIR Implementation Guide based.

oca-fhir-cli usage scenario

Usage

Pre-requisites

Nodejs v14.15.3 or later (this project relies on nodejs v14 or later due to dependencies)

$node oca-fhir-cli.js --profile cvc2ghp --r4bundle ./examples/cvc-immunization-bundle/patient-bundle-instance-example.json

$node oca-fhir-cli.js --profile cdc-cvrs-v2.5 --csv ./examples/cdc-cvrs-v2.5/sample-data.csv

Release notes

  1. CDC CVRS profile option is WIP. But you can browse the examples/cdc-cvrs-2.5 directory to review input csv, FHIR R4 json bundle, ConceptMap and other conformance artifacts. Generated output files can be found under oca-artifacts/cdc-cvrs-v2.5 directory. Basename of generated files are based on vax_event_id in input csv data. Files named vc-.jsonld are example vaccination certificate files based on W3C CCG candidate work item vaccination vocabulary.
  2. EU EHealth profile is not supported by this CLI at this time. Only the w3c ccg to FHIR R4 vocabulary mapping is supported via the JSONLD Context files (see item #3 below).
  3. JSONLD FHIR Context files for Vaccination Certificates by Jurisdiction directory contains 2 context files that can be used to map the w3c ccg vaccination vocabulary to different jurisdictional requirements using HL7 FHIR R4 resource model. JSONLD Context file names are named after the same profiles used in this module (e.g. cdc-cvrs-v2.5, and eu-ehealth).
  4. JSONLD Framing definition (CDC CVRS)example for R4 immunization bundles directory contains an example jsonld framing definition that can be used against the R4 JSONLD Bundle for cdc-cvrs-v2.5 profile.
  5. Generated output files for CDC CVRS profile directory contains vaccintation certificate jsonld files per w3c ccg vocabulary, OCA base schema and JSONLD R4 FHIR Bundles for each record in the input csv file.
  6. Generated OCA label overlay jsonld should be treated as a representative instance document only: we expect this to be edited for appropriate use in web forms based on jurisdiction (e.g. language, FHIR profiles in use).
  7. OCA Blinding Identity Taxonomy attributes identified in schema base is not intended to be prescriptive. FHIR resource properties that map to Who, What, When, Where, Why are currently flagged.
  8. Full validation of FHIR Profiles, Extensions and use of appropriate ValueSets prior to use of this cli tool is assumed. We recommend using FHIR Validator tool against the input FHIR R4 bundle, prior to processing using this cli tool to create corresponding OCA artifacts.

FAQ

  1. Is there a list of FHIR R4 resources that are supported within input Bundles?

    This release supports the following FHIR R4 resource types: Bundle, Consent, Contract, ImagingStudy, Immunization, Patient, Practitioner. Other resources to be supported:

  • ImmunizationEvaluation
  • RelatedPerson
  • PractitionerRole
  • Group
  • Organization
  • Location
  1. Is this cli tool extensible? Yes, the driver script (oca-fhir-cli.js) provides a mechanism to load js modules that implement extension functionality for specific applications such as Immunization Passport etc. Such extensions can be made available in the lib directory. The extension module should implement verifyBundle and generateOCAArtifacts functions to suit application needs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •