Closed tarscher closed 3 years ago
Hi @tarscher, you are not supposed to use the Code section for your choice options. The code section corresponds to this element in the FHIR specification: http://hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.code
If you set up your question like this
Your QuestionnaireResponse should end up with the selected option like this:
{
"resourceType": "QuestionnaireResponse",
"status": "in-progress",
"item": [
{
"linkId": "276982e5-061e-4c28-f6d0-4a67e3f0a417",
"text": "Test",
"answer": [
{
"valueCoding": {
"code": "test_code_2",
"display": "test_code_2",
"system": "urn:uuid:7eb1089a-dc21-4cfa-8e10-f6e4605e3648"
}
}
]
}
]
}
hi @kennethmyhra , thanks for your reply.
The goal is not to add choice but indicate what the questions (item) concept is. So for example I have a question about allergy and therefor want to add to the items code allergy in both snomed and ICD9.
For clarity this is used for later processing and not to show to the user.
I think this is the proper way to use the code if I understand the documentation correctly?
Regards
Yes, you are correct, but they will not be moved to QuestionnaireResponse, they are only in Questionnaire
Just to clarify further. There are no attributes for code in QuestionnaireResponse as per the spec. The QuestionnaireResponse will only contain the answers plus linkId and the text for the answer.
I'll close this now, but feel free to reopen if you do not think this answered your question.
Describe the bug When adding codes to a question they don't get included in the QuestionnaireResponse
To Reproduce Steps to reproduce the behavior:
Expected behavior Codes should be included in the QuestionnaireResponse
Screenshots