Skip to content

GoFSH 0.1.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@cmoesel cmoesel released this 09 Sep 21:20
· 201 commits to master since this release
cf3a780

Introducing GoFSH, a FHIR Shorthand (FSH) decompiler, able to convert formal FHIR definitions from JSON to FSH. GoFSH is in the early stages of development. See the LIMITATIONS below for details.

INSTALLATION

GoFSH requires Node.js to be installed on the user's system. Users should install Node.js 12 (LTS), although the previous LTS version (Node.js 10) is also expected to work.

Once Node.js is installed, run the following command to install or update GoFSH:

$ npm install -g gofsh

USAGE

To translate formal FHIR JSON definitions to FHIR Shorthand, run gofsh on the commandline, passing in the path to the folder w/ your FHIR definitions as the first argument:

$ gofsh /path/to/fhir/defs 

If your FHIR definitions depend on another IG (such as US Core), you can pass in IG dependencies using the -d flag.

$ gofsh /path/to/fhir/defs -d hl7.fhir.us.core@3.1.0 

LIMITATIONS

GoFSH is in the early stages of development; it is neither functionally complete nor bug-free. GoFSH users should use GoFSH with caution, reviewing all outputs before integrating them into FSH projects.

As of the 0.1.0 release (early September 2020):

  • GoFSH outputs valid FSH for most profiles and extensions.
    • Generated profile and extension definitions should be technically correct, but may not use the most efficient FSH representation or follow FSH authoring best practices.
    • Generated profile and extension definitions do not use the Mapping or Invariant features of FSH; "caret" rules are used instead. Future versions of GoFSH will address this.
  • GoFSH does not output the content of Code System definitions; it declares them using keywords, but does not generate any of their rules.
  • GoFSH does not output ValueSet definitions.
  • GoFSH does not output Instance definitions (this includes examples, as well as any definitions that must be created in FSH using the Instance keyword).
  • GoFSH does not process or consider the ImplementationGuide JSON when generating FSH.
  • GoFSH does not support generating FSH from FHIR XML definitions.

ADDITIONAL DOCUMENTATION

For additional documentation, see FSH School.