Stream: IG creation
Topic: Validator giving semi-unhelpful error
Jean Duteau (Dec 09 2020 at 16:49):
I have a sample Bundle that is being validated and the validator gives me an error that I just can't see:
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[0] (line 67, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
When I open up this JSON file in a JSON editor, there are no complaints. Here is the json around that line number:
66 "item": [
67 {
68 "extension": [
69 {
70 "url": "http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/extension-itemTitle",
71 "valueString": "Single Line Text"
72 },
I'm getting an instance of the error for each item repetition and they all look the same.
Bundle-HaleySampleSurveyBundle.json
Jean Duteau (Dec 09 2020 at 16:49):
I'd appreciate if anyone could look and tell me what I'm missing.
Lloyd McKenzie (Dec 09 2020 at 17:17):
JSON is valid according to Spy. You're using the most recent validator?
Jean Duteau (Dec 09 2020 at 17:20):
yep and IG Publisher spits out the same error
Jean Duteau (Dec 09 2020 at 17:23):
FHIR Validation tool Version 5.2.9 (Git# 6907a004bed8). Built 2020-12-06T22:31:33.68Z (66 hours old)
Grahame Grieve (Dec 09 2020 at 19:16):
that's an internal error for me. You should also be getting a warning or a hint as well
Jean Duteau (Dec 09 2020 at 19:19):
hmm, i am getting other errors/warnings/hints but those make sense and don't seem related to this error. Here is my full error log:
*FAILURE*: 19 errors, 2 warnings, 9 notes
Error @ Bundle.entry[0] (line 6, col6) : Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry
Error @ Bundle.entry[0].resource.ofType(Questionnaire) (line 9, col17) : Resource requires an id, but none is present
Error @ Bundle.entry[1] (line 41, col6) : Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry
Error @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col17) : Resource requires an id, but none is present
Error @ Bundle.entry[2] (line 550, col6) : Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry
Error @ Bundle.entry[2].resource.ofType(QuestionnaireResponse) (line 579, col19) : Resource requires an id, but none is present
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[0] (line 67, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[1] (line 186, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[2] (line 271, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[3] (line 295, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[4] (line 380, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[5] (line 439, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[6] (line 486, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[7] (line 511, col11) : Internal error: Error in ?? at 1, 1: The token : is not expected here - either a "," or a ")" expected
Error @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col17) : Questionnaire.date: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire)
Error @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col17) : Questionnaire.description: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire)
Error @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col17) : Questionnaire.identifier: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire)
Error @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col17) : Questionnaire.name: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire)
Error @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col17) : Questionnaire.title: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire)
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[2].extension[2] (line 281, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[5].extension[3] (line 460, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[5].extension[4] (line 464, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[5].extension[5] (line 468, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[5].extension[6] (line 472, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[5].extension[7] (line 476, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[7].extension[3] (line 532, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[1].resource.ofType(Questionnaire).item[7].extension[4] (line 536, col15) : This element does not match any known slice defined in the profile http://hl7.org/fhir/us/icsr-ae-reporting/StructureDefinition/ibm-fda-shape-questionnaire
Information @ Bundle.entry[2].resource.ofType(QuestionnaireResponse) (line 579, col19) : No questionnaire is identified, so no validation can be performed against the base questionnaire
Warning @ Bundle.entry[0].resource.ofType(Questionnaire) (line 9, col9) : que-0: Name should be usable as an identifier for the module by machine processing applications such as code generation [name.matches('[A-Z]([A-Za-z0-9_]){0,254}')]
Warning @ Bundle.entry[1].resource.ofType(Questionnaire) (line 44, col44) : que-0: Name should be usable as an identifier for the module by machine processing applications such as code generation [name.matches('[A-Z]([A-Za-z0-9_]){0,254}')]
Grahame Grieve (Dec 09 2020 at 19:26):
strange. how do I reproduce this
Jean Duteau (Dec 09 2020 at 19:26):
I'll send you the bundle and the validator.pack.
Grahame Grieve (Dec 09 2020 at 19:34):
a validator.pack?
ryan moehrke (Dec 09 2020 at 20:00):
the only reason I can think of for the validator to expect a ) in a json document is for a fhirpath expression, is there some constraint or something in the structureDefinition that has a : in it?
Grahame Grieve (Dec 09 2020 at 20:05):
what the error should say (having debugged it, and fixed up the error reporting) is:
Error @ Bundle.entry[1].resource.ofType(Questionnaire).item[1] (line 186, col11) : Internal error: Error processing path expression for disciminator: Error @1, 1: The token : is not expected here - either a "," or a ")" expected (src = 'extension(http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl)')
Last updated: Apr 12 2022 at 19:14 UTC