FHIR Chat · Extension short, definition, and default values · shorthand

Stream: shorthand

Topic: Extension short, definition, and default values


view this post on Zulip Chris Moesel (Oct 30 2020 at 19:51):

By default, if you do not set ^short or ^definition on the "self" element of an extension, you end up w/ very generic text wherever that extension is used in the rendered IG.

For example, this:

Profile: MyPatientProfile
Parent: Patient
* extension contains EnjoysDadJokesExtension named enjoys-dad-jokes 0..1

Extension: EnjoysDadJokesExtension
Title: "Enjoys Dad Jokes Extension"
Description: "An extension indicating if the patient will laugh at dad jokes"
* value[x] only boolean

results in this:
image.png
image.png

view this post on Zulip Chris Moesel (Oct 30 2020 at 19:52):

If, on the other hand, you set ^short and/or ^definition on the "self" element of an extension, the IG publisher will render that wherever the extension is used in the IG.

For example, this:

Profile: MyPatientProfile
Parent: Patient
* extension contains EnjoysDadJokesExtension named enjoys-dad-jokes 0..1

Extension: EnjoysDadJokesExtension
Title: "Enjoys Dad Jokes Extension"
Description: "An extension indicating if the patient will laugh at dad jokes"
* . ^short = "Enjoys dad jokes?"
* . ^definition = "Indicates if the patient will laugh at dad jokes"
* value[x] only boolean

results in this:
image.png
image.png

view this post on Zulip Chris Moesel (Oct 30 2020 at 19:59):

We are considering a feature in SUSHI such that the first example (with no "self" element ^short or ^definition set) would automatically set the extension's self element ^short to the extension's Title and the self element ^definition to the extension's Description. This would provide what many would consider a much more reasonable default rendering with less effort (and redundancy) on the author's part. For example, the FSH in my first post of this thread would result in this:
image.png
image.png

view this post on Zulip Chris Moesel (Oct 30 2020 at 20:01):

So...

(1) Should we implement something like this?
(2) If so, should it always happen or should we provide a configuration parameter to turn it on/off?

view this post on Zulip David Pyke (Oct 30 2020 at 20:19):

I think it's a useful shortcut when building an IG. But I'd want a notice that it's happening so I can remember to go back and adjust it

view this post on Zulip Jean Duteau (Oct 30 2020 at 22:29):

I don't see why you wouldn't implement this. I think it should always happen. If I don't want the title/description to be the short/definition of the extension, I can override it with ^s.

view this post on Zulip Chris Moesel (Oct 30 2020 at 22:33):

@Jean Duteau -- You could override it w/ another value, but you couldn't just clear the value because FSH doesn't give you a way to unset something. So there would be no way to say you don't want a short or definition in the "self" element at all. That may be fine, but I want people to be aware.

view this post on Zulip Jean Duteau (Oct 30 2020 at 22:34):

well, if I didn't have a title or description, you wouldn't set those right?

view this post on Zulip Chris Moesel (Oct 30 2020 at 22:40):

In FHIR, the title and description are distinct from element[0].short and element[0].definition -- so it's quite possible to set the title and description but not set element[0].short and element[0].definition. I guess the question is if that's something people want to intentionally do. It sounds like you certainly don't!

view this post on Zulip Jean Duteau (Oct 30 2020 at 22:45):

looking at the standard extensions defined in FHIR Core, they usually have element[0].short = title and element[0].definition = description, so that seems like a reasonable default

view this post on Zulip Jean Duteau (Oct 30 2020 at 22:46):

what happens for complex extensions?

view this post on Zulip Jean Duteau (Oct 30 2020 at 22:48):

hmm, same thing in FHIR-Core so that seems reasonable for complex extensions.

view this post on Zulip Jean Duteau (Oct 30 2020 at 22:48):

make it so, number one!

view this post on Zulip Mark Kramer (Nov 04 2020 at 13:30):

image.png


Last updated: Apr 12 2022 at 19:14 UTC