Stream: shorthand
Topic: ValueSet additional languages
Etienne Cantineau (Apr 30 2020 at 07:54):
In a valueSet concept, beside the code and display, there is also "designation" that i need to use to add translations
"designation" : [
{
"language" : "",
"value" : ""
}]
How do i define that in sushi?
Nick Freiter (Apr 30 2020 at 12:24):
So unfortunately, this is currently not so easy to do. It is possible, but instead of using a ValueSet, you have to use the Instance keyword to create a Usage: #definition
Instance of a ValueSet. This thread has a detailed example of how this can be done to create a more advanced CodeSystem: https://chat.fhir.org/#narrow/stream/215610-shorthand/topic/Creating.20an.20advanced.20codesystem. You would have to take a similar approach for ValueSet in this case. If you have further questions about applying the approach in that thread to a ValueSet, let us know! Be wary though of the warning given by Chris at the end of that thread. We haven't tested this approach as thoroughly as the more basic usage of the ValueSet keyword.
Etienne Cantineau (Apr 30 2020 at 13:30):
Ok, I'll try that!
Etienne Cantineau (May 04 2020 at 12:19):
I was able to reproduce a valueSet with an instance. It's all the same with my additional languages. Good!
Just one thing is the name in the artifacts.html and breadcrumb that doesn't include "Valueset " before.
My generated json valueSet files are the same but I found in the references from the implementation guide file that with the classic valueSet, it gets the name from the title in fsh file while the instance one gets the name from name in fsh file. Is this a bug?
Nick Freiter (May 04 2020 at 13:06):
Is this the case even when a title is specified for the ValueSet Instance? I made the following simple example:
ValueSet: MyVs
Title: "My favorite ValueSet"
Instance: MyVsInstance
InstanceOf: ValueSet
Title: "My favorite ValueSet Instance"
and found that in this case, the name
in the ImplementationGuide is what is given by the Title
keyword above:
"resource": [
{
"reference": {
"reference": "ValueSet/MyVs"
},
"name": "My favorite ValueSet",
"exampleBoolean": false
},
{
"reference": {
"reference": "ValueSet/MyVsInstance"
},
"name": "My favorite ValueSet Instance",
"exampleBoolean": true
}
]
Etienne Cantineau (May 04 2020 at 13:37):
Ah my bad! I was using the "* title =" but forgot to use the "Title :"
Nick Freiter (May 04 2020 at 13:57):
One thing to be aware of too is that this:
Instance: MyVsInstance
InstanceOf: ValueSet
Title: "My favorite ValueSet Instance"
will somewhat confusingly, not set the ValueSet.title field. The Title
keyword on an instance is only used in the ImplementationGuide in the way shown above. We cannot use the Title
keyword to also set the title
field on an Instance, because not every Resource has a title
field. Yes a ValueSet does, but something like an Observation does not, so we would not want to set Observation.title, since that field should not exist. So if you also wanted to set ValueSet.title
, you must do
Instance: MyVsInstance
InstanceOf: ValueSet
Title: "This is the title that goes in the ImplementationGuide"
* title = "This is the title on the ValueSet resource"
Let me know if that doesn't make sense, it's a bit of a quirky situation.
Etienne Cantineau (May 04 2020 at 15:07):
Thank you! No problem, i don't want to use the "* title", it was a misunderstanding.
Last updated: Apr 12 2022 at 19:14 UTC