FHIR / sushi

SUSHI (aka "SUSHI Unshortens Short Hand Inputs") is a reference implementation command-line interpreter/compiler for FHIR Shorthand (FSH).
Apache License 2.0
145 stars 44 forks source link

Improve IG exampleCanonical matching on versioned meta.profile for profiles that don't specify a version #1387

Closed cmoesel closed 11 months ago

cmoesel commented 11 months ago

If an example uses a versioned canonical in its meta.profile, SUSHI will attempt to verify that the versioned profile is in scope for the IG before exporting it as an exampleCanonical in the IG JSON. In cases where the target profile did not specify its version, SUSHI failed to find a match. Now SUSHI will fallback to matching on the IG's version (specified in the config) if the profile does not specify a version.

I've separated this into two commits, the first of which adds (failing) tests for this, and the second of which adds the fix. You can also test this against US Core.

Fixes #1386