Stream: questionnaire
Topic: Need advice on how to add Observation.code in questionnaire
santosh pingle (Aug 04 2021 at 11:02):
Hi All,
Using a Definition based extraction approach to extract the data from the questionnaire response.
Along with extracted data from the response it is also required to update the Observation.code.
But Observation.code (Observation.code.coding.code, Observation.code.coding.system, Observation.code.coding.display) will not be entered by the user as an answer. It has predefined values.
{
"code": "8310-5",
"display": "Temperature",
"system": "http://loinc.org"
}
So, I am thinking of adding Observation.code value in Questionnaire items with their initial value and marking them as hidden, and then extracting them from questionnaire response.
So, to achieve this I am trying to add above mentioned code in questionnaire as like below.
"item": [
{
"definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding",
"type": "group",
"linkId": "5.3.1",
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
"valueExpression": {
"language": "application/x-fhir-query",
"expression": "Coding",
"name": "coding"
}
}
],
"item": [
{
"definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.code",
"type": "string",
"linkId": "5.3.1.1",
"initial": [
{
"valueString": "8310-5"
}
]
},
{
"definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.system",
"type": "string",
"linkId": "5.3.1.2",
"initial": [
{
"valueString": "http://loinc.org"
}
]
},
{
"definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.display",
"type": "string",
"linkId": "5.3.1.3",
"initial": [
{
"valueString": "Temperature"
}
]
}
]
I get extracted code for the Observation.code with this change.
But my query is, is this correct way to do this?
Thanks,
Santosh
Fred Hersch (Aug 04 2021 at 13:38):
Thanks @santosh pingle : duplicate question here - https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/Definition-based.20extraction
Lloyd McKenzie (Aug 04 2021 at 14:22):
You should just be able to have an initialValueCoding on the question and mark the question as hidden - no reason to worry about populating the code from expressions.
Last updated: Apr 12 2022 at 19:14 UTC