You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this @samanvp. I think having SUSHI report that there is ambiguity in this situation through a warning or error could be helpful.
The best way to avoid the ambiguity is to use unique identifiers after the CodeSystem and ValueSet declaration keywords. You could use something like FooBar_CS and FooBar_VS as a simple differentiation. Assuming you want the names in the generated FHIR resources to stay FooBar, you can use a caret path to set the name for both the CodeSystem and the ValueSet back to FooBar. For example, you can do something like this:
CodeSystem: FooBar_CS
Id: foo-bar
Title: "Foo Bar CodeSystem"
* ^name = "FooBar"
* #v1 "value1"
* #v2 "value2"
ValueSet: FooBar_VS
Id: foo-bar
Title: "Foo Bar ValueSet"
* ^name = "FooBar"
* include codes from system FooBar_CS
The unique names after the keyword declaration will allow you to reference the CodeSystem or ValueSet uniquely within the Canonical keyword and elsewhere in your FSH, but the caret path to assign name will keep the generated resources the same. I've created a short example in FSH Online to demonstrate this here.
If we define a CodeSystem and a ValueSet with the exact Ids:
Canonical(FooBar)
always return the canonical url of the ValueSet.The text was updated successfully, but these errors were encountered: