FHIR Chat · Specifying a default unit · questionnaire

Stream: questionnaire

Topic: Specifying a default unit


view this post on Zulip Paul Lynch (Jan 10 2019 at 19:14):

If you have alphabetical list of units from unitOption, and want the second one to be the default (so the user does not have to pick a unit if they do not want to change from the default), is there a way to do that?

view this post on Zulip Paul Lynch (Jan 12 2019 at 16:39):

GF#19959

view this post on Zulip Paul Lynch (Jan 16 2019 at 16:10):

For an item of type Quantity, can we use initial.valueQuantity with a Quantity that has only a unit (and not a value) to set a default unit for that question?

view this post on Zulip Lloyd McKenzie (Jan 16 2019 at 16:11):

I guess in theory, yes.

view this post on Zulip Lloyd McKenzie (Jan 16 2019 at 16:12):

An interesting question is whether a unit with no value counts as an "answer" for a question. (Or a value with no unit?)

view this post on Zulip Paul Lynch (Jan 16 2019 at 16:16):

Quantity leaves all of its components optional (except that system is required if you provide code). That seemed weird to me until I thought of using it as a way to specify default units. I suppose if there is no unit, then the quantity is dimensionless, which is okay. But, I am not sure whether it would ever make sense to output a QuestionnaireResponse with a Quantity that was missing a value.

view this post on Zulip Lloyd McKenzie (Jan 16 2019 at 16:21):

I agree it probably wouldn't make sense - but we haven't stated anywhere that it's not allowed. (We similarly haven't made an assertion that a Reference must have a Reference.reference (as opposed to a Reference.display or a Reference.extension)

view this post on Zulip Brian Postlethwaite (Jan 17 2019 at 16:01):

I've definitely used Reference with display only in many places, such as with Identifier.Assigner only recording the org name in the display and no actual resource reference.


Last updated: Apr 12 2022 at 19:14 UTC