Stream: shorthand
Topic: Resource names not populating
Matt Jenks (Oct 19 2021 at 13:58):
I am attempting to create a device example. When I do and include this in my implementation guide, I don't see the device name, such as on my artifact list.
Here is my device fsh:
Instance: MLS-TTDB
InstanceOf: Device
Description: "The device that represents the MLS TTDB"
Usage: #example
- status = #active
- distinctIdentifier = "MLS-TTDB"
- manufacturer = "A company"
- deviceName[0].name = "MLS-TTDB"
- deviceName[=].type = #manufacturer-name
and when I look at my IG TOC, my subheadings aren't populated (8.11 is the device) . I believe it's because the publisher can't infer the resource instance names from my fsh?
Screen-Shot-2021-10-19-at-9.56.50-AM.png
I assumed the names comes from a field that is in the summary for the resource. Is this not the case? Do I need to add names and descriptions for resources elsewhere in my IG?
Chris Moesel (Oct 19 2021 at 14:03):
When you use Instance
, the target of the instance could be any resource, so FSH can't assume there is a name field, a description field, etc. As a result, the bit after Instance:
refers to the id
(since all things can have an id) and Title
and Description
populate the title/description in the IG narrative only. If the resource you are creating has name
or title
or description
elements, then you must set them using assignment rules in the Instance, e.g.:
* name = "MLSTTDB"
* title = "MLS TTDB"
Matt Jenks (Oct 19 2021 at 14:19):
That makes sense. Thanks!
Last updated: Apr 12 2022 at 19:14 UTC