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

Log a warning when conformance and terminology instances default to Usage: #example #1329

Closed jafeltra closed 1 year ago

jafeltra commented 1 year ago

Fixes #1303

This PR adds a warning when instances of conformance or terminology resources will use the default #example usage. Because we default the usage within the importer, I added the warning within the importer so we can distinguish between a usage that was set in FSH and a usage set by the default value.

Any feedback on the wording of the warning is appreciated.

jafeltra commented 1 year ago

Thanks for the suggestions @mint-thompson! I'm leaning toward the second one, so I can add that in!

jafeltra commented 1 year ago

Updated in 53be172

jafeltra commented 1 year ago

There is a limitation in that this won't work if the InstanceOf points to a profile of one of the conformance or terminology resources -- but that should be pretty rare, and this is really just intended as a helpful hint -- so I'm not too concerned.

Hmm I hadn't thought about that case. If we think it is worth covering this case, I'm happy to change up the implementation.