Stream: questionnaire
Topic: Validator gives me unexpected result
Tilo Christ (Apr 15 2021 at 16:32):
I am running the outputs from my questionnaire filler through the Validator to make them 100% correct. I am feeding QuestionnaireResponses according to the SDC profile through the validator. The questionnaire is the COVID-19 surveillance questionnaire from WHO and one output item is: {
"linkId": "patinfo_ageonset",
"text": "Age (use days if under 1 month, months if under 1 year):",
"answer": [
{
"valueQuantity": {
"value": 45.0,
"unit": "mo",
"system": "http://unitsofmeasure.org",
"code": "mo"
}
}
]
}
This to me looks like a perfectly valid quantity as a response to a question which asked for a quantity. However, the validator is telling me:
Error @ QuestionnaireResponse.item[3].item[0].answer[0].value.ofType(Quantity).value (line 82, col47) : This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/Coding
What makes the validator think that this is a Coding? I am invoking it as follows:
java -jar validator_cli.jar -version 4.0.1 -ig http://hl7.org/fhir/uv/sdc/2019May/ -profile http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse resources/who_response.json
BTW: Are questions around strange validator outputs best asked in the stream that addresses the corresponding profile (SDC), or is this an implementer topic?
Lloyd McKenzie (Apr 15 2021 at 19:19):
That absolutely seems like a but in the validator to me. I can't see anything wrong in the fragment looking at it and I agree that it's not a coding - though it does have a binding, so it's possible it's getting confused about that somehow. Bet bet is to submit a Git issue against the validator.
Last updated: Apr 12 2022 at 19:14 UTC