Stream: fhir/infrastructure-wg
Topic: Unpacking SDCQuestionnaireResponse
Dave Hill (Apr 29 2021 at 18:13):
Hi!
We are using SDCQuestionnaire and SDCQuestionnaireResponse to capture cognitive and functional status assessments for post-acute care. To improve the ability to query the information, the SDCQuestionnaireResponse is unpacked into a series of observation instances, one observation for each answer in the assessment. The answer to the question would now also be in the Observation instance. The SDCQuestionnaireResponse is still used at that point to maintain the structure of the answers in the context of the questionnaire (i.e., answers in the appropriate order). Each observation references the SDCQuestionnaireResponse, so if you have the Observation, you can easily get back to the SDCQuestionnaireResponse.
One thing you would not be able to do is to get directly from the SDCQuestionnaireResponse to the underlying observations. Is it advised that after the Observation resources are created that the SDCQuestionnaireResponse be updated, replacing the original value of the answer with a reference to the new corresponding Observation resource, providing a way for someone wanting to traverse back and forth to be able to do it from both directions (either from the Observations or from the SDCQuestionnaireResponse).
Any thoughts on whether the step of updating the SDCQuestionnaireResponse with references to the unpacked observations is desirable or best practice?
Thanks!
Dave
Lloyd McKenzie (Apr 29 2021 at 20:39):
You can get to the Observations from the Questionnaire by doing a _revinclude search. In general in FHIR, we don't want bidirectional references. References should always only exist in one direction and then you query as needed to navigate them. Having Observation point to QuestionnaireResponse is the appropriate way for the reference to flow - the many point to the one and the new points to the old.
Last updated: Apr 12 2022 at 19:14 UTC