Closed LZRS closed 5 days ago
is this an Android FHIR SDK error?
is this an Android FHIR SDK error?
Yeah the error seems to be coming from the sdk's side. The QuestionnaireResponse we get from the sdk has the repeated groups unpacked here, which is what causes validation to fails here. An example
{
"resourceType": "QuestionnaireResponse",
"item": [
{
"linkId": "page-1",
"item": [
{
"linkId": "blood-pressure-repeating-group",
"item": [
{
"linkId": "systolic-bp",
"answer": [
{
"valueInteger": 124
}
]
}
]
},
{
"linkId": "blood-pressure-repeating-group",
"item": [
{
"linkId": "systolic-bp",
"answer": [
{
"valueInteger": 125
}
]
}
]
},
{
"linkId": "blood-pressure-repeating-group",
"item": [
{
"linkId": "systolic-bp",
"answer": [
{
"valueInteger": 126
}
]
}
]
}
]
}
]
}
Also, the sdk does it's own validation here on submit, and it uses its own internal representation of QuestionnaireResponse (which has the repeated groups packed together) and passes validation. Example
{
"resourceType": "QuestionnaireResponse",
"item": [
{
"linkId": "page-1",
"item": [
{
"linkId": "blood-pressure-repeating-group",
"answer": [
{
"item": [
{
"linkId": "systolic-bp",
"answer": [
{
"valueInteger": 124
}
]
}
]
},
{
"item": [
{
"linkId": "systolic-bp",
"answer": [
{
"valueInteger": 125
}
]
}
]
},
{
"item": [
{
"linkId": "systolic-bp",
"answer": [
{
"valueInteger": 126
}
]
}
]
}
]
}
]
}
]
}
The validation from the sdk's side happens just before our fragment result listener is called. Maybe one way to resolve the error might be to remove the validation from our side and trust that sdk's alright.
To Reproduce Steps to reproduce the behavior:
Additional context Add any other context about the problem here.
experienced in WDF