Describe the bug
When prepopulating answers in a QuestionnaireResponse, if the FHIRpath expression returns an unexpected extension as part of the query, it is being included when populating the answer. For example, if the expression retrieves a coding (e.g. MedicationStatement.code.coding(where.system='http://snomed.info/sct'), that coding may include the Medication Type extension. This is extension is not permitted to be used for QuestionnaireResponse.item.answerCoding.
To Reproduce
Was observed in Inferno. AU Base examples contain this extension and if used for prepop would reproduce.
Expected behavior
Prepopulation service should strip invalid extensions before including the datatype value in the QuestionnaireResponse.
Describe the bug
When prepopulating answers in a QuestionnaireResponse, if the FHIRpath expression returns an unexpected extension as part of the query, it is being included when populating the answer. For example, if the expression retrieves a coding (e.g.
MedicationStatement.code.coding(where.system='http://snomed.info/sct'), that coding may include the Medication Type extension. This is extension is not permitted to be used forQuestionnaireResponse.item.answerCoding.To Reproduce
Was observed in Inferno. AU Base examples contain this extension and if used for prepop would reproduce.
Expected behavior
Prepopulation service should strip invalid extensions before including the datatype value in the QuestionnaireResponse.