FHIR Chat · Adding descriptions for bring your own JSON · shorthand

Stream: shorthand

Topic: Adding descriptions for bring your own JSON


view this post on Zulip Keith Boone (May 14 2020 at 12:51):

I've got several hundred examples in JSON format which of course, don't have descriptions b/c there is no description field in the JSON resource for non-definitional resources. Would love to be able to write a FSH file that allowed me to create descriptions for these.

Otherwise I see a ton of these warnings:
WARNING: Unable to find ImplementationGuide.definition.resource.description for the resource Organization/X410004. Descriptions are strongly encouraged if they cannot be inferred from the resource to allow proper population of the artifact list.

view this post on Zulip Chris Moesel (May 14 2020 at 13:14):

@Keith Boone -- in the new beta SUSHI announced above, you can affect the building of the resource list using the config.yaml file. If you specify a resource (such as an example) in the YAML, it will merge in any values you put there. So for example, you could do:

resources:
  Patient/my-example-patient:
    description: An example Patient
  Condition/my-example-condition:
    name: My Example Condition
    description: An example Condition

As you can see above, it allows you to specify the name or description (or both) and it will merge it into the list with other relevant values. The example would render this into the IG JSON:

{
 "reference": {
   "reference": "Patient/my-example-patient"
  },
  "name": "my-example-patient",
  "description": "An example Patient",
  "exampleCanonical": "http://hl7.org/fhir/sushi-test/StructureDefinition/sample-patient"
},
{
 "reference": {
   "reference": "Patient/my-example-condition"
  },
  "name": "My Example Condition",
  "description": "An example Condition",
  "exampleCanonical": "http://hl7.org/fhir/sushi-test/StructureDefinition/sample-condition"
}

view this post on Zulip Lloyd McKenzie (May 14 2020 at 13:26):

Without FSH, the solution is to put the names and descriptions in the ImplementationGuide

view this post on Zulip Chris Moesel (May 14 2020 at 13:30):

Right. If you're using FSH, the Title: and Description: fields will just work and there's nothing else you need to do. If your examples were generated elsewhere (e.g., bring-your-own JSON) then you need to get the names and descriptions into the ImplementationGuide resource list. The new beta config.yaml provides a way to do that without having to post-process the ImplementationGuide file.


Last updated: Apr 12 2022 at 19:14 UTC