Based on this Zulip conversation, it is invalid for ValueSet.compose.include.system (as well as its exclude variant) to set the uri value to a fragment (e.g., #foo). This means that the standard way of referencing a contained CodeSystem will not work.
Instead:
Use the contained CodeSystem's full canonical URL as the value of ValueSet.compose.include.system
Put a valueset-system extension on ValueSet.compose.include.system and set its valueCanonical to the fragment pointing to the id of the contained CodeSystem (e.g., #foo)
Authors can do this the hard way right now (setting the values directly), but I suspect if they use Canonical(ContainedCodeSystem), it might do the wrong thing and directly insert a fragment. We should try to detect this situation and do the right thing:
At the least don't convert the ValueSet.compose.{include|exclude}.system value to a fragment, even when there is a matching contained CodeSystem.
Maybe go the next step and insert the extension if it has not been manually added already.
Based on this Zulip conversation, it is invalid for
ValueSet.compose.include.system
(as well as itsexclude
variant) to set the uri value to a fragment (e.g.,#foo
). This means that the standard way of referencing a contained CodeSystem will not work.Instead:
ValueSet.compose.include.system
ValueSet.compose.include.system
and set itsvalueCanonical
to the fragment pointing to the id of the contained CodeSystem (e.g.,#foo
)Authors can do this the hard way right now (setting the values directly), but I suspect if they use
Canonical(ContainedCodeSystem)
, it might do the wrong thing and directly insert a fragment. We should try to detect this situation and do the right thing:ValueSet.compose.{include|exclude}.system
value to a fragment, even when there is a matching contained CodeSystem.Also see: https://jira.hl7.org/browse/FHIR-44896