FHIR Chat · No match found in the generated snapshot · conformance

Stream: conformance

Topic: No match found in the generated snapshot


view this post on Zulip Patrick Werner (Nov 09 2020 at 13:55):

When validating a Procedure Resource with Extension i get the following error(s) from the SnapshotGenerator:

*FAILURE*: 3 errors, 0 warnings, 0 notes
  Error @ StructureDefinition.differential.element.where(path = 'Procedure.extension') : No match found in the generated snapshot: check that the path and definitions are legal in the differential (including order)
  Error @ StructureDefinition.differential.element.where(path = 'Procedure.extension:Dokumentationsdatum') : No match found in the generated snapshot: check that the path and definitions are legal in the differential (including order)
  Error @ StructureDefinition : The profile http://gematik.de/fhir/IsiK/StructureDefinition/IsiKProzedur has 2 elements in the differential (id: Procedure.extension, id: Procedure.extension:Dokumentationsdatum) that don't have a matching element in the snapshot: check that the path and definitions are legal in the differential (including order)

view this post on Zulip Patrick Werner (Nov 09 2020 at 13:55):

to reproduce:
java -jar validator_cli.jar https://gist.githubusercontent.com/patrick-werner/4cd02a124312455b2147e7c4bbae9e82/raw/5020e8510ad1c2659095863b0d20a1f7a9b0720e/test.xml -version 4.0 -ig de.basisprofil.r4 -ig https://gist.githubusercontent.com/patrick-werner/4cd02a124312455b2147e7c4bbae9e82/raw/5020e8510ad1c2659095863b0d20a1f7a9b0720e/Extension.xml

view this post on Zulip ryan moehrke (Nov 09 2020 at 15:19):

the bit that sticks out to me in the error message is "(including order)" if you look at your structure definition you define .extension before .id and .meta but the order inherited by pretty much every resource (and is listed in the spec this way) is "id, meta, implicitRules, language, text, contained, extension, modifierExtension" https://www.hl7.org/fhir/procedure.html#ElementDefinition
Try pulling id and meta up to the top of the differential and see if that works

view this post on Zulip Patrick Werner (Nov 09 2020 at 15:22):

will try, thanks. Missed that

view this post on Zulip Patrick Werner (Nov 09 2020 at 15:28):

Thank you @ryan moehrke ! That was the issue (the validator didn't complain about the order explicitly like he does in other contexts).


Last updated: Apr 12 2022 at 19:14 UTC