Skip to content

Releases: standardhealth/shr-tools

SHR CLI 6.10.4

09 Jan 00:15
Compare
Choose a tag to compare

SHR CLI version 6.10.4 adds several bug fixes:

  • Fix bug in IG generation so codesystems.html file is always present
  • Fix bug that caused some mappings to fail due to new type codes used in FHIR 3.02/4.0.1
  • Fix bug that could cause errors when using sub-paths in a profiled datatype
  • Fix bug that caused errors when attempting to set MS flag on nested extension fields

NOTE: Directory structure has changed. If you are not using the new global install method, then download shr-cli-6.10.4.zip for an experience consistent with previous SHR CLI releases.

SHR CLI 6.10.3

04 Dec 21:57
Compare
Choose a tag to compare

SHR CLI 6.10.3 is the same as SHR CLI 6.10.2 but with an updated IG Publisher jar to address bugs in the previous IG Publisher jar. This release uses:

FHIR IG Publisher Version 1.0.9-SNAPSHOT - Built 2019-12-05T06:03:56.40+11:00 - Git 379a0fa2ecef

NOTE: Directory structure has changed. If you are not using the new global install method, then download shr-cli-6.10.3.zip for an experience consistent with previous SHR CLI releases.

SHR CLI 6.10.2

02 Dec 23:13
Compare
Choose a tag to compare

SHR CLI version 6.10.2 is a significant release that introduces the following changes:

  • Easier installation procedure (PR #6 and #10, details below)
  • New Graph Viewer export (PR #8, details below)
  • Complex extensions w/ inline sub-extensions (PR #9, details below)
  • Human-readable titles (PR #1, more details below)
  • Update FHIR R4 to 4.0.1 (PR #24)
  • Update FHIR STU3 to 3.0.2 (PR #24)
  • Update US Core to 2.0.0 for FHIR STU3 IGs (PR #20)
  • Update text on IG Code Systems page to properly reflect content (PR #22)
  • Remove ES6 Exporter and JSON Schema Exporter (PR #12, details below)
  • Report an error when a new property is introduced without the Property keyword (PR #11)
  • Report an error when an author attempts to use a non-existent namespace (PR #16)
  • Fix filtering issues that resulted in unnecessary profiles and extensions being added to IGs (PR #23)
  • Fix bug in FHIR export that caused unchanged elements to be displayed in differential (PR #4)
  • Fix bug in data dictionary that caused base properties to be listed in some cases instead of substituted properties (PR #7)
  • Fix min cardinality of system and code to 1 when fixing Coding or CodeableConcept (PR #3)
  • Fix incorrect/confusing error messages (PR #9)
  • Update dependencies to address reported vulnerabilities (PR #14 and #25)

Easier installation procedure

This release now supports installation as a global NPM module. This means that users no longer need to clone the GitHub repository or download the release zip file. The new installation procedure is as follows:

Install Node.js LTS edition (version 8, 10, or 12). Once Node.js is installed, run the following command to install SHR-CLI:

$ npm install -g shr-cli

Once it is installed, the shr-cli command should be available on your path.

$ shr-cli --help
Usage: shr-cli <path-to-shr-defs> [options]

Options:
  -l, --log-level <level>  the console log level <fatal,error,warn,info,debug,trace> (default: "info")
  -s, --skip <feature>     skip an export feature <fhir,model-doc,data-dict,graph,all> (default: [])
  -m, --log-mode <mode>    the console log mode <normal,json,off> (default: "normal")
  -o, --out <out>          the path to the output folder (default: "out")
  -c, --config <config>    the name of the config file (default: "config.json")
  -d, --deduplicate        do not show duplicate error messages (default: false)
  -i, --import-cimcore     import CIMCORE files instead of CIMPL (default: false)
  -n, --clean              Save archive of old output directory and perform clean build (default: false)
  -h, --help               output usage information

NOTE: The former approach of downloading and unzipping shr-cli-6.10.2.zip, then running yarn install still works as well, but most users will find the global install much easier.

New Graph Viewer export

Graph Viewer

The new Graph Viewer is an interactive graphical visualization of the primary entries in an Implementation Guide. The Graph Viewer is yet another automatic export included into the CIMPL toolchain.

GraphViewer

To generate an IG with the Graph Viewer included, please ensure that the config file supplied to the CLI has an implementationGuide.includeGraph field which is set to true. Additionally, ensure that there is at least one entry listed as primary for this IG (either through the soon-to-be-deprecated implementationGuide.primarySelectionStrategy field in the config file, or through the contentProfile field in the config file. Otherwise, there will be no Graph Viewer included in the IG.

Once the IG is published, click on the Graph Viewer tab in the top menu. By clicking on one of the primary entries listed on the left of the graph viewer, a user can view the visual representation of this entry's logical model. Hovering over nodes provides a description if available. Clicking on the root node will take the user to the IG page associated with this entry. Branches can be collapsed or expanded by clicking on the small circles connected to them.

Complex extensions w/ inline sub-extensions

In FHIR, complex extensions are represented using an array of sub-extensions. In previous versions of CIMPL, each sub-extension was generated as its own standalone extension and then referenced from the parent complex extension. While this resulted in supreme modularity, it also caused a very large number of extensions to be generated, many of which were only used in the context of the parent complex extension.

Most IG authors using other tools, however, choose to define sub-extensions inline inside the complex extension. This means that standalone sub-extensions don't need to be defined This simplifies the IG by reducing the number of overall extensions and by allowing complex extensions to be more self-contained.

This version of the SHR CLI switches its approach to generate complex extensions with inlined sub-extensions rather than externally defined sub-extensions.

Human-readable titles

When generating titles from DataElements, an algorithm parses the data element name into a more human-readable title. For example, the profile with the name ComprehensiveMetabolic2000SerumOrPlasmaPanel will have the corresponding title: Comprehensive Metabolic 2000 Serum Or Plasma Panel. This affects profiles, extensions, logical models, model doc, and any other exports that use a title.

Remove ES6 Exporter and JSON Schema Exporter

The ES6 exporter was originally intended as a simple way to work with data defined using CIMPL data elements. In practice, however, it turned out that the value gained did not justify the effort required to develop and maintain it. In particular, serialization and deserialization to/from FHIR proved to be quite difficult and error-prone. This being the case, and given that no external users were using the ES6 class generation, the team decided to remove support for it so that we can focus on other priorities. Since the JSON Schema exports were primarily used by the ES6 classes, this capability was also removed.

NOTE: Directory structure has changed. If you are not using the new global install method, then download shr-cli-6.10.2.zip for an experience consistent with previous SHR CLI releases.

SHR CLI 6.9.0

04 Oct 16:41
Compare
Choose a tag to compare

SHR CLI Version 6.9.0 introduces the following features and bug fixes:

  • Authoring: ability to constrain a property on an entry that is a choice to a subset of choices.
    The following shows an example of the new behavior:

    Element: Elem1
    Value: integer or string or uri or concept
    
    Entry: Entr1
    Property: Elem1 0..1
    Elem1 only integer or string // This is now supported
    
  • FHIR Export: support dependencies on other IGs specified by user. Previously, only US Core was automatically included as a dependency, and the user could reference US Core. Now any general IG can be referenced in the configuration file using the dependencies field that should be specified inside the implementationGuide object:

    "dependencies": [
            {
            "package": "hl7.fhir.uv.vhdir",
            "version": "current",
            "name": "VhDir",
            "location": "http://build.fhir.org/ig/HL7/VhDir/",
            "fileLocation": "IGs/VhDir"
            }
    ],
    

    Note that the package, version, name, and location will be directly copied into the IG control file's dependencyList. See DependencyList documentation for more information about those values. The fileLocation should point to a folder containing that IG's JSON-formatted definition files (usually StructureDefinition-*.json, ValueSet-*.json, CodeSystem-*.json, etc.). If the path is relative, it should be relative to the spec folder that is passed into SHR CLI.

    Once an IG is specified in this way, it can be mapped to in the same way as US Core. Note that US Core is still automatically included, the user does not need to explicitly specify it as a dependency.

  • ModelDoc: Fix cardinality on choice options to 0..1

  • ModelDoc: Display constraints inherited from ancestors

  • Data Dictionary: fix bug which suppressed display of quantity units

  • Data Dictionary: fix value set name in data elements tab

NOTE: Directory structure has changed. Download shr-cli-6.9.0.zip for an experience consistent with previous SHR CLI releases.