Closed dotasek closed 1 year ago
As of Grahame's latest updates, this no longer fails:
>>> java -ea -jar validator_cli.jar example.json
FHIR Validation tool Version 5.6.76 (Git# cc634aecd5f0). Built 2022-11-06T12:51:07.733Z (4 days old)
Java: 17.0.1 from /opt/homebrew/Cellar/openjdk/17.0.1_1/libexec/openjdk.jdk/Contents/Home on aarch64 (64bit). 4096MB available
Paths: Current = /Users/david.otasek/IN/2022-11-10-validator-ea-failure, Package Cache = /Users/david.otasek/.fhir/packages
Params: example.json
Scanning for versions (no -version parameter):
No Version Info found: Using Default version '4.0'
Jurisdiction: No Jurisdiction
Loading
Load FHIR v4.0.1 from hl7.fhir.r4.core#4.0.1 Load hl7.terminology.r4#5.0.0 - 4174 resources (00:10.483)
- 7394 resources (00:00.000)
Load hl7.terminology#4.0.0 - 4164 resources (00:00.742)
Load R5 Extensions - 123 resources (00:26.280)
Terminology server http://tx.fhir.org - Version 2.0.14 (00:00.633)
Package Summary: [hl7.fhir.r4.core#4.0.1, hl7.fhir.xver-extensions#0.0.11, hl7.terminology.r4#5.0.0, hl7.terminology#4.0.0]
Get set... go (00:00.007)
Validating
Validate example.json
Validate Bundle against http://hl7.org/fhir/StructureDefinition/BundleInstalling hl7.fhir.us.cqfmeasures#3.0.0 to the package cache
Fetching:
....
Installing: .... done.
Installing fhir.cqf.common#4.0.1 to the package cache
Fetching:
Installing: done.
Installing hl7.fhir.uv.cpg#1.0.0 to the package cache
Fetching:
...............
Installing: ............... done.
Load hl7.fhir.uv.cpg#1.0.0 - 197 resources (00:03.893)
Load fhir.cqf.common#4.0.1 - 2 resources (00:00.015)
Installing hl7.fhir.us.qicore#4.1.1 to the package cache
Fetching:
....
Installing: .... done.
Load hl7.fhir.us.core#3.1.1 - 145 resources (00:00.640)
Load us.nlm.vsac#0.4.0 - 8916 resources (00:00.903)
Load hl7.fhir.us.qicore#4.1.1 - 85 resources (00:00.016)
Load hl7.fhir.us.cqfmeasures#3.0.0 - 102 resources (00:00.017)
..........20..........40..........60..........80.........|
00:07.356
Done. Times: Loading: 00:38.495, validation: 00:12.844. Memory = 408Mb
*FAILURE*: 44 errors, 19 warnings, 7 notes
Error @ Bundle.entry[0].resource.ofType(Measure).scoring.coding.display (line 110, col18): Missing element 'display' - required by fixed value assigned in profile http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Error @ Bundle.entry[0].resource.ofType(Measure).scoring.coding.system (line 111, col54): Value is 'http://hl7.org/fhir/measure-scoring' but must be 'http://terminology.hl7.org/CodeSystem/measure-scoring'
Error @ Bundle.entry[0].resource.ofType(Measure).scoring.coding[0] (line 110, col18): Unknown Code System 'http://hl7.org/fhir/measure-scoring'
Error @ Bundle.entry[0].resource.ofType(Measure).type[0].coding[0] (line 116, col18): Unknown Code System 'http://hl7.org/fhir/measure-type'
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[0].usage[0].coding[0] (line 199, col19): Unknown Code System 'http://hl7.org/fhir/measure-data-usage'
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[1].usage[0].coding[0] (line 213, col19): Unknown Code System 'http://hl7.org/fhir/measure-data-usage'
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[2].usage[0].coding[0] (line 227, col19): Unknown Code System 'http://hl7.org/fhir/measure-data-usage'
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[3].usage[0].coding[0] (line 241, col19): Unknown Code System 'http://hl7.org/fhir/measure-data-usage'
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[0].resource.ofType(List).entry[0].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[2].resource.ofType(List).entry[0].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[4].resource.ofType(List).entry[0].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[0].resource.ofType(List).entry[2].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104-1
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[2].resource.ofType(List).entry[2].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104-1
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[4].resource.ofType(List).entry[2].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104-1
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[0].resource.ofType(List).entry[1].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104-2
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[2].resource.ofType(List).entry[1].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104-2
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[4].resource.ofType(List).entry[1].item: Relative URLs must be of the format [ResourceName]/[id]. Encountered denom-EXM104-2
Error @ Bundle.entry[0].resource.ofType(Measure).identifier[0].system (line 24, col69): URL value 'http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/cms' does not resolve
Error @ Bundle.entry[0].resource.ofType(Measure).relatedArtifact[8].resource (line 97, col5): Canonical URLs must be absolute URLs if they are not fragment references (Library/library-FHIRHelpers-4.0.1)
Error @ Bundle.entry[0].resource.ofType(Measure).relatedArtifact[9].resource (line 100, col5): Canonical URLs must be absolute URLs if they are not fragment references (Library/library-MATGlobalCommonFunctions-5.0.000)
Error @ Bundle.entry[0].resource.ofType(Measure).relatedArtifact[10].resource (line 103, col5): Canonical URLs must be absolute URLs if they are not fragment references (Library/library-SupplementalDataElements-2.0.0)
Error @ Bundle.entry[0].resource.ofType(Measure).relatedArtifact[11].resource (line 106, col5): Canonical URLs must be absolute URLs if they are not fragment references (Library/library-TJCOverall-5.0.000)
Error @ Bundle.entry[0].resource.ofType(Measure).library[0] (line 107, col51): Canonical URLs must be absolute URLs if they are not fragment references (Library/library-EXM104-8.2.000)
Error @ Bundle.entry[0].resource.ofType(Measure).scoring.coding[0].system (line 111, col54): URL value 'http://hl7.org/fhir/measure-scoring' does not resolve
Error @ Bundle.entry[0].resource.ofType(Measure).type[0].coding[0].system (line 117, col51): URL value 'http://hl7.org/fhir/measure-type' does not resolve
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[0].usage[0].coding[0].system (line 200, col58): URL value 'http://hl7.org/fhir/measure-data-usage' does not resolve
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[1].usage[0].coding[0].system (line 214, col58): URL value 'http://hl7.org/fhir/measure-data-usage' does not resolve
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[2].usage[0].coding[0].system (line 228, col58): URL value 'http://hl7.org/fhir/measure-data-usage' does not resolve
Error @ Bundle.entry[0].resource.ofType(Measure).supplementalData[3].usage[0].coding[0].system (line 242, col58): URL value 'http://hl7.org/fhir/measure-data-usage' does not resolve
Error @ Bundle.entry[1].resource.ofType(MeasureReport).measure (line 451, col48): Canonical URLs must be absolute URLs if they are not fragment references (Measure/measure-EXM104-8.2.000)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).subject: Relative Reference appears inside Bundle whose entry is missing a fullUrl
Error @ Bundle.entry[1] (line 256, col6): Bundle entry missing fullUrl
Error @ Bundle.entry[0].resource.ofType(Measure).extension[1].value.ofType(Reference) (line 19, col6): Unable to resolve resource with reference '#cqf-tooling'
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[0].resource.ofType(List) (line 267, col30): List.mode: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/List)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[0].resource.ofType(List) (line 267, col30): List.status: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/List)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[1].resource.ofType(Patient).extension[0] (line 292, col23): Extension.extension:text: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/core/StructureDefinition/us-core-race)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[1].resource.ofType(Patient).extension[1] (line 302, col11): Extension.extension:text: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[2].resource.ofType(List) (line 335, col30): List.mode: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/List)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[2].resource.ofType(List) (line 335, col30): List.status: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/List)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[3].resource.ofType(Encounter).subject (line 375, col8): Unable to find a match for profile Patient/denom-EXM104 among choices: http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[4].resource.ofType(List) (line 397, col30): List.mode: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/List)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[4].resource.ofType(List) (line 397, col30): List.status: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/List)
Error @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[5].resource.ofType(Condition).subject (line 445, col8): Unable to find a match for profile Patient/denom-EXM104 among choices: http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Error @ Bundle.entry[0].resource.ofType(Measure).extension[1].value.ofType(Reference) (line 19, col6): Rule ref-1: 'SHALL have a contained resource if a local reference is provided' Failed (url: cqf-tooling; ids: ) (log: (url: cqf-tooling; ids: ))
Information @ Bundle.entry[0].resource.ofType(Measure).extension[0] (line 12, col20): This element does not match any known slice defined in the profile http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
Information @ Bundle.entry[0].resource.ofType(Measure) (line 107, col51): The Library Library/library-EXM104-8.2.000 could not be resolved, so expression validation may not be correct
Information @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[3].resource.ofType(Encounter).subject (line 375, col8): Details for Patient/denom-EXM104 matching against Profile http://hl7.org/fhir/StructureDefinition/Patient
Information @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[3].resource.ofType(Encounter).subject (line 375, col8): Details for Patient/denom-EXM104 matching against Profile http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Information @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[3].resource.ofType(Encounter).diagnosis[0].condition (line 383, col9): Details for Condition/denom-EXM104-1 matching against Profile http://hl7.org/fhir/StructureDefinition/Condition
Information @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[5].resource.ofType(Condition).subject (line 445, col8): Details for Patient/denom-EXM104 matching against Profile http://hl7.org/fhir/StructureDefinition/Patient
Information @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[5].resource.ofType(Condition).subject (line 445, col8): Details for Patient/denom-EXM104 matching against Profile http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Warning @ Bundle.entry[0].resource.ofType(Measure).useContext[0].code (line 44, col6): A code with no system has no defined meaning. A system should be provided
Warning @ Bundle.entry[0].resource.ofType(Measure).scoring (line 110, col16): None of the codings provided are in the value set 'MeasureScoring' (http://hl7.org/fhir/ValueSet/measure-scoring), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-scoring#proportion)
Warning @ Bundle.entry[0].resource.ofType(Measure).type[0] (line 115, col15): None of the codings provided are in the value set 'MeasureType' (http://hl7.org/fhir/ValueSet/measure-type), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-type#process)
Warning @ Bundle.entry[0].resource.ofType(Measure).type[0] (line 115, col15): None of the codings provided are in the value set 'MeasureType' (http://terminology.hl7.org/ValueSet/measure-type), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-type#process)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[0].code (line 197, col6): No code provided, and a code should be provided from the value set 'MeasureDataUsage' (http://terminology.hl7.org/ValueSet/measure-data-usage)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[0].usage[0] (line 198, col17): None of the codings provided are in the value set 'MeasureDataUsage' (http://hl7.org/fhir/ValueSet/measure-data-usage), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-data-usage#supplemental-data)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[1].code (line 211, col6): No code provided, and a code should be provided from the value set 'MeasureDataUsage' (http://terminology.hl7.org/ValueSet/measure-data-usage)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[1].usage[0] (line 212, col17): None of the codings provided are in the value set 'MeasureDataUsage' (http://hl7.org/fhir/ValueSet/measure-data-usage), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-data-usage#supplemental-data)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[2].code (line 225, col6): No code provided, and a code should be provided from the value set 'MeasureDataUsage' (http://terminology.hl7.org/ValueSet/measure-data-usage)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[2].usage[0] (line 226, col17): None of the codings provided are in the value set 'MeasureDataUsage' (http://hl7.org/fhir/ValueSet/measure-data-usage), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-data-usage#supplemental-data)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[3].code (line 239, col6): No code provided, and a code should be provided from the value set 'MeasureDataUsage' (http://terminology.hl7.org/ValueSet/measure-data-usage)
Warning @ Bundle.entry[0].resource.ofType(Measure).supplementalData[3].usage[0] (line 240, col17): None of the codings provided are in the value set 'MeasureDataUsage' (http://hl7.org/fhir/ValueSet/measure-data-usage), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://hl7.org/fhir/measure-data-usage#supplemental-data)
Warning @ Bundle.entry[1].resource.ofType(MeasureReport).contained[0].ofType(Bundle).entry[3].resource.ofType(Encounter).type[0] (line 366, col18): None of the codings provided are in the value set 'US Core Encounter Type' (http://hl7.org/fhir/us/core/ValueSet/us-core-encounter-type), and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = http://snomed.info/sct#32485007)
Warning @ Bundle.entry[1].resource.ofType(MeasureReport) (line 451, col48): The Measure 'Measure/measure-EXM104-8.2.000' could not be resolved, so no validation can be performed against the Measure
Warning @ Bundle.entry[0].resource.ofType(Measure).group[0].population[0].criteria (line 141, col30): Rule cqm-4: 'Group population criteria SHOULD be simple expression names found within the primary library for the measure. The criteria SHOULD NOT include a namespace.' Failed
Warning @ Bundle.entry[0].resource.ofType(Measure).group[0].population[1].criteria (line 153, col30): Rule cqm-4: 'Group population criteria SHOULD be simple expression names found within the primary library for the measure. The criteria SHOULD NOT include a namespace.' Failed
Warning @ Bundle.entry[0].resource.ofType(Measure).group[0].population[2].criteria (line 165, col30): Rule cqm-4: 'Group population criteria SHOULD be simple expression names found within the primary library for the measure. The criteria SHOULD NOT include a namespace.' Failed
Warning @ Bundle.entry[0].resource.ofType(Measure).group[0].population[3].criteria (line 177, col30): Rule cqm-4: 'Group population criteria SHOULD be simple expression names found within the primary library for the measure. The criteria SHOULD NOT include a namespace.' Failed
Warning @ Bundle.entry[0].resource.ofType(Measure).group[0].population[4].criteria (line 189, col30): Rule cqm-4: 'Group population criteria SHOULD be simple expression names found within the primary library for the measure. The criteria SHOULD NOT include a namespace.' Failed
This issue was resolved in an earlier update, and a test for the expected behaviour was added here: https://github.com/FHIR/fhir-test-cases/pull/122
The following included bundle will cause an uncaught exception if the validator CLI is run with
-ea
.Originally from https://smilecdr.com/docs/fhir_repository/clinical_quality_language/measure-bundle-example.json.html
This is normally not a problem for CLI users as
-ea
is not part of the default execution, but for anyone using the InstanceValidator in downstream projects, they will encounter the following:This may be due a mistake in assigning hostContext.rootResource somewhere in the validation.