Stream: IG creation
Topic: unnamed examples
Jens Villadsen (Sep 13 2021 at 11:20):
Hi all - I'm running a FSH IG here at https://github.com/hl7-eu/gravitate-health and I wonder what it takes for the entries on the TOC page (https://hl7-eu.github.io/gravitate-health/toc.html) to have a name or label to be present. As can be seen, the entries from 8.9 and up are sort of nameless on the TOC, making it a bit hard for the human brain to comprehend
Jens Villadsen (Sep 13 2021 at 11:36):
FYI -> @Craig Anderson :point_up:
Jose Costa Teixeira (Sep 13 2021 at 12:05):
did you try to add them to the IG xml?
John Moehrke (Sep 13 2021 at 14:21):
sushi-config.yaml: pages section
John Moehrke (Sep 13 2021 at 14:22):
see https://github.com/IHE/ITI.PIXm/blob/master/sushi-config.yaml lines 106-118
Eric Haas (Sep 13 2021 at 14:36):
you can add custom titles and descriptions to the examples as extensions. and sushi will use that out of the box.
{
"resourceType" : "Observation",
"id" : "test",
"meta" : {
"extension" : [
{
"url" : "http://hl7.org/fhir/StructureDefinition/instance-name",
"valueString" : "FOO"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/instance-description",
"valueMarkdown" : "### FOO\n- bar"
}
],
"profile" : [
"http://www.fhir.org/guides/sushi-sandbox/StructureDefinition/test-obs"
]
},
....
Jean Duteau (Sep 13 2021 at 14:37):
It is because the instances in maria-ips.fsh don't have ids, names, or descriptions. SUSHI has nothing to put in the generated IG resource.
Eric Haas (Sep 13 2021 at 14:38):
Chris Moesel (Sep 13 2021 at 14:48):
Hi @Jens Villadsen and @Craig Anderson -- As @Jean Duteau pointed out, if you have defined your examples in FSH, then the easiest way to get the names and descriptions into the IG is to use the Title:
and Description:
keywords in your instance definitions. E.g.:
Instance: MyExamplePatient
InstanceOf: Patient
Title: "My Example patient"
Description: "An example Patient"
* name.given = "Bob"
If your examples are not in FSH (they are included as XML or JSON in other input folders), then you can add names and examples for them in your sushi-config.yaml
like so:
resources:
Patient/my-example-patient:
name: My Example Patient
description: An example Patient
exampleBoolean: true
If you want to associate the example w/ a particular profile, use exampleCanonical
instead of exampleBoolean
. BUT, if your examples are in FSH, you don't need to do this extra config -- again, it's only for non-FSH examples.
Chris Moesel (Sep 13 2021 at 14:50):
@Eric Haas -- I totally forgot about that extension feature. Thanks for reminding me!
Jens Villadsen (Sep 13 2021 at 19:56):
Thx everybody!
Jens Villadsen (Sep 13 2021 at 20:26):
@Eric Haas - I don't think the extension-way works on XML resources ...
Jens Villadsen (Sep 13 2021 at 20:27):
@Chris Moesel can you verify that adding the text as part of extensions only works for json?
Chris Moesel (Sep 13 2021 at 20:53):
@Jens Villadsen -- I'm not sure why it wouldn't work on XML resources. I believe we convert them to JSON internally before trying to process them -- so as long as the conversion happens correctly (we're using a 3rd party library for that), it should work... But it's possible I'm remembering something wrong. I can double-check.
Last updated: Apr 12 2022 at 19:14 UTC