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

Allow fragments where reference URLs or Canonicals would go (in ValueSet syntax, but also elsewhere) #1403

Open cmoesel opened 10 months ago

cmoesel commented 10 months ago

Since fragments can be used as references or canonicals pointing to contained resources, anywhere the syntax allows a reference/canonical, it should also allow a fragment. For example, the compose rule in the following Value Set should work (but doesn't):

ValueSet: ExampleValueset
Id: example-valueset
* ^contained = example-codesystem
* ^url = "http://example.org/valueset"
* ^version = "1.0.0"
* ^status = #active
* include codes from system #example-codesystem

Instance: example-codesystem
InstanceOf: CodeSystem
Usage: #inline
* url = "http://example.org/codesystem"
* version = "1.0.0"
* status = #active
* content = #complete
// more rules

The above is an example. There may be other places this also needs to be supported.

See: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Contained.20code.20system.20in.20the.20value.20set/near/407685349

mint-thompson commented 1 week ago

As a bonus clarification: be sure that this handles the case of a ValueSet that contains an inline instance of ValueSet. See the skipped test added in #1520 for the expectation for that case.