FHIR Chat · Questionnaire.item ID · questionnaire

Stream: questionnaire

Topic: Questionnaire.item ID


view this post on Zulip milton mitjans (Jun 11 2021 at 19:46):

On the Questionnaire item is there an extension where it has a way to uniquely identify an answer for a choice type?

For example:
item: [ {id: .. , "valueString": "yes"}]
We are thinking on using valueCoding like, where coding would the unique id

"valueCoding": {
"system": "../healthFactors",
"code": "1",
"display": "yes"
}

view this post on Zulip Lloyd McKenzie (Jun 11 2021 at 20:06):

First, 'system' must always be a full URI. It can't be relative.
Can you better explain your use-case for a unique id? Typically if you're going to enumerate options, you're going to use valueCoding. valueString is only for those situations where there's no associated code and you have no desire for there to be one.

view this post on Zulip milton mitjans (Jun 11 2021 at 20:30):

Yes the system would be a full url, didn't expose it on the example.

The use case is that we need to have the ability to map an answer to have the ability to :

  1. The client grab a "text" from a CDN system
  2. The server to identify the answer and map it to algorithm to calculate a "score" which is propietary

view this post on Zulip Paul Lynch (Jun 14 2021 at 13:07):

The combination of QuestionnaireResponse.questionnaire, linkId, and the valueString should be unique and could serve as your unique id.

view this post on Zulip milton mitjans (Jun 15 2021 at 12:09):

Thanks Paul.

If we have a Question like:

How do you rate your visit?

  • Good
  • Bad
  • Neutral

If valueString is used as the unique id (with combination of questionnaire and linkId). The answerOption could look like:
{ "valueString": "good" }. The ID for "good" option would be something like questionnaireId.linkId.good.

Is there a way we can define the actual String Displayed in UI for the value via another extension?

Sometimes the text value can be grabbed from CDNs and also there might be use cases (on our side) where the text can change based on the UI Clients. For example some might choose "Good" while other "Ok" but the meaning / value (for scoring) would be the same.

view this post on Zulip Paul Lynch (Jun 15 2021 at 14:26):

If you want the different strings to be treated the same, you probably want to work with a Coding instead of a string. Then you could rely on Coding.code and let Coding.display vary for the same code.

view this post on Zulip Lloyd McKenzie (Jun 24 2021 at 23:46):

Agree with Paul. Typically if you're going to use scores, you want codes (with an ordinalValue extension for the weight). The Coding.display is what's expected to be displayed in the UI (though there can be exceptions, e.g. language translation).


Last updated: Apr 12 2022 at 19:14 UTC