Stream: shorthand
Topic: Using Coding with .version
Martin Höcker (May 17 2021 at 10:53):
I am trying to use a Coding that has the .version-field filled. The FSH language-spec says:
FSH represents Codings in the following ways:
{CodeSystem name|id|url}#{code} "{display string}"
{CodeSystem name|id|url}|{version string}#{code} "{display string}"
So I tried (FSHSchool)
CodeSystem: Test
* ^version = "1.0"
* #testcode "test-code" "A code for testing"
Instance: TestPatient
InstanceOf: Patient
* maritalStatus = Test|1.0#testcode
But I get the error error Resolved value "Test|1.0" is not a valid URI.
. Could this be a bug in Sushi?
A colleague of mine figured out a workaround (FSHSchool):
Alias: codesystemurl = http://http://example.org/fhir/CodeSystem/Test
CodeSystem: Test
* ^version = "1.0"
* ^url = codesystemurl
* #testcode "test-code" "A code for testing"
Instance: TestPatient
InstanceOf: Patient
* maritalStatus = codesystemurl|1.0#testcode
This compiles with no errors and produces the desired output.
Chris Moesel (May 17 2021 at 12:51):
@Martin Höcker - It seems that the first case should be supported, so I would consider this to be a bug. I've logged it as SUSHI #816.
Last updated: Apr 12 2022 at 19:14 UTC