android-fhir
android-fhir copied to clipboard
Definition Based Extraction: Issue in extracting repeating order elements
Describe the bug Issue during definition based extraction having repeating order elements, such as given in the Patient.name resource having a cardinality ratio [0..*]
Component SDC library
To Reproduce Steps to reproduce the behavior:
- Use below json as questionnaire string.
{
"resourceType": "Questionnaire",
"item": [
{
"linkId": "PR-name",
"type": "group",
"definition": "http://hl7.org/fhir/StructureDefinition/Patient#Patient.name",
"item": [
{
"linkId": "PR-name-text",
"definition": "http://hl7.org/fhir/StructureDefinition/Patient#Patient.name.given",
"type": "string",
"text": "First Name"
},
{
"linkId": "PR-name-middle",
"definition": "http://hl7.org/fhir/StructureDefinition/datatypes#Patient.name.given",
"type": "string",
"text": "Middle Name"
}
]
}
]
}
- Perform extraction using the questionnaire response
- Patient.name element will contain only single value in the given field.
Expected behavior Paitent.name element should contain multiple given values as expected.
@jingtang10
Related discussion: https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/Json.20Structure.20for.20Repeating.20Complex.20Data.20Type.20in.20resource
@jingtang10 , are these changes still needed?
@aditya-07 has a fix for this and will create a pr