Stream: questionnaire
Topic: How to store question score into response assessment JSON ?
SAM TSAI (Nov 11 2021 at 16:55):
How to store the question score into response assessment JSON ?
Diane (Nov 11 2021 at 23:11):
Are you trying to store the question score in the questionnaire response resource? Or in some other resource type like RiskAssessment?
SAM TSAI (Nov 12 2021 at 20:21):
Yes, I am trying to store the question score in the questionnaire response resource.
Here is what I did. But want to confirm if this is the correct approach.
{
"item": [
],
"text": "When do you take your medications?",
"answer": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
"valueDecimal": 2
}
],
"valueCoding": {
"display": {
"label": "Afternoon",
"value": "afternoon"
}
}
}
],
"linkId": "714DemoRadioButton"
},
Brian Postlethwaite (Nov 12 2021 at 22:50):
Close that extension would be on the coding itself not the answer. Just like it was in the answer option or valueset expansion.
SAM TSAI (Nov 12 2021 at 23:00):
Do you mean like this:
{
"item": [
],
"text": "When do you take your medications?",
"answer": [
{
"valueCoding": {
"display": {
"label": "Afternoon",
"value": "afternoon"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
"valueDecimal": 2
}
],
}
}
],
"linkId": "714DemoRadioButton"
}
Brian Postlethwaite (Nov 12 2021 at 23:11):
I think so (indenting making it hard to see) and you would probable also have the code that was picked too?
Brian Postlethwaite (Nov 12 2021 at 23:16):
If this was a score from a calculated expression, then it would just be an integer or decimal question typr/answer.
Paul Lynch (Nov 17 2021 at 16:39):
Per https://jira.hl7.org/browse/FHIR-28611, ordinalValue is getting moved to "answer", not "valueCoding". It looks like @Joee Garcia might have already made that change, but I don't see where.
Brian Postlethwaite (Nov 17 2021 at 18:38):
Making it inconsistent with coding where it was selected from?
Brian Postlethwaite (Nov 17 2021 at 18:40):
Feels like a random cha he to make, does that imply that you can have a score without an answer?
Paul Lynch (Nov 17 2021 at 22:44):
Brian Postlethwaite said:
Making it inconsistent with coding where it was selected from?
That might be a good point. The motivation was that it can go on any answer type. @Lloyd McKenzie ?
Lloyd McKenzie (Nov 18 2021 at 00:12):
http://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-behave.html is where it's made. And yes, that was the motivation.
Brian Postlethwaite (Nov 18 2021 at 21:37):
I think I've missed something here, there's no mention if where it's going in the QR item. I can live with the definition, and will continue to use the coding child so I don't need special code handling the ordinal for coding (which we only support with codes anyway)
Last updated: Apr 12 2022 at 19:14 UTC