android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Definition Based Extraction: Issue in extracting repeating order elements

Open nsabale7 opened this issue 1 year ago • 1 comments

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:

  1. 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"
                    }
                  ]
                }
            ]
}
  1. Perform extraction using the questionnaire response
  2. 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

nsabale7 avatar Aug 02 '22 07:08 nsabale7

Related discussion: https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/Json.20Structure.20for.20Repeating.20Complex.20Data.20Type.20in.20resource

jingtang10 avatar Aug 11 '22 09:08 jingtang10

@jingtang10 , are these changes still needed?

Tarun-Bhardwaj avatar Sep 14 '22 07:09 Tarun-Bhardwaj

@aditya-07 has a fix for this and will create a pr

jingtang10 avatar Nov 07 '22 16:11 jingtang10