FHIR Chat · Error: an element that is not marked with a snapshot match · IG creation

Stream: IG creation

Topic: Error: an element that is not marked with a snapshot match


view this post on Zulip Vikas Mittal (May 14 2018 at 06:47):

Hi @Grahame Grieve

I am getting these errors when I run the IG Publisher on the practitioner profile derived from the hl7au. (http://build.fhir.org/ig/hl7au/au-fhir-base/StructureDefinition-au-practitioner.html)

It seems this error has relation to the following commit " https://github.com/hl7au/au-fhir-base/commit/847317302bbae1b8fb63eda386f8089d3e83ea1e ” “AHPRA qualifier” done in the repository.

I had a brief email discussion with @Brett Esler too.

The errors are:

process res: practitioner-dh-base (34.0715sec)
Error in snapshot generation: Differential for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base with id: Practitioner.address.issuer has an element that is not marked with a snapshot match
Publishing Content Failed: Exception loading http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base: Snapshot for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base does not contain an element that matches an existing differential element that has id: Practitioner.address.issuer (34.0804sec)
(34.0804sec)
Use -? to get command line help (34.0804sec)
(34.0805sec)
Stack Dump (for debugging): (34.0805sec)
java.lang.Exception: Exception loading http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base: Snapshot for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base does not contain an element that matches an existing differential element that has id: Practitioner.address.issuer
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:2188)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:1854)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:495)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:459)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4393)
Caused by: org.hl7.fhir.exceptions.DefinitionException: Snapshot for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base does not contain an element that matches an existing differential element that has id: Practitioner.address.issuer
at org.hl7.fhir.r4.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:394)
at org.hl7.fhir.r4.context.SimpleWorkerContext.seeMetadataResource(SimpleWorkerContext.java:513)
at org.hl7.fhir.r4.context.BaseWorkerContext.cacheResource(BaseWorkerContext.java:188)
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:2186)
... 4 more
Exception in thread "main" java.lang.NullPointerException

And

process res: practitioner-dh-base (37.0786sec)
Error in snapshot generation: Differential for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base with id: Practitioner.qualification.identifier has an element that is not marked with a snapshot match
Publishing Content Failed: Exception loading http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base: Snapshot for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base does not contain an element that matches an existing differential element that has id: Practitioner.qualification.identifier (37.0884sec)
(37.0884sec)
Use -? to get command line help (37.0884sec)
(37.0884sec)
Stack Dump (for debugging): (37.0884sec)
java.lang.Exception: Exception loading http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base: Snapshot for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base does not contain an element that matches an existing differential element that has id: Practitioner.qualification.identifier
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:2188)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:1854)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:495)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:459)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4393)
Caused by: org.hl7.fhir.exceptions.DefinitionException: Snapshot for http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/practitioner-dh-base does not contain an element that matches an existing differential element that has id: Practitioner.qualification.identifier
at org.hl7.fhir.r4.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:394)
at org.hl7.fhir.r4.context.SimpleWorkerContext.seeMetadataResource(SimpleWorkerContext.java:513)
at org.hl7.fhir.r4.context.BaseWorkerContext.cacheResource(BaseWorkerContext.java:188)
at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:2186)
... 4 more
Exception in thread "main" java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4403)

I am attaching the two practitioner profiles in two different repositories we are using to run the IG Publisher.
practitioner-dh-base.xml
practitioner-dh-base.xml

Please suggest.

view this post on Zulip Lloyd McKenzie (May 14 2018 at 06:53):

@Grahame Grieve ?

view this post on Zulip Grahame Grieve (May 14 2018 at 07:06):

I don't immediately recognise the problem

view this post on Zulip Vikas Mittal (May 21 2018 at 05:39):

Hi @Grahame Grieve @Lloyd McKenzie . Sorry for the delay in my response.
Hi @Brett Esler may I request you to add your comments on this issue.
Although I will try to add more information below if that can help in understanding the issue.

So the issue is as below:

1) We at the Agency created a derived profile called "practitioner-dh-base" which is derived from the hl7au practitioner profile.
2) Till then the IG Publisher was running fine on our derived profile.
3) Then the following commit in relation to the "AHPRA qualifier" "https://github.com/hl7au/au-fhir-base/commit/847317302bbae1b8fb63eda386f8089d3e83ea1e" was made in hl7au repository
4) After that the IG Publisher started giving the error.
5) The error I got is there in my previous post/message.
6) Also the files (derived practitioner profile) which I used to run the IG Publisher are attached here
https://chat.fhir.org/user_uploads/10155/kphG0UBCMd7NfCoWGimyZzLu/practitioner-dh-base.xml
https://chat.fhir.org/user_uploads/10155/As0aPe1NIJ3gRKINgVeR74aj/practitioner-dh-base.xml

Please let me know if there is any more information that I need to add so that this issue can be resolved.

Thanks heaps.
Vikas

view this post on Zulip Lloyd McKenzie (May 21 2018 at 13:28):

The first issue is because you've got the following:
<element id="Practitioner.address"> <path value="Practitioner.address" /> <type> <code value="Address" /> <profile value="http://hl7.org.au/fhir/StructureDefinition/au-address" /> </type> </element> <element id="Practitioner.qualification.issuer">

You need a Practitioner.qualification element before you list Practitioner.qualification.issuer (or at least you do for certain versions of the igpublisher. I have no clue what's going wrong in the second case though.

view this post on Zulip Vikas Mittal (May 21 2018 at 23:47):

Thanks @Lloyd McKenzie
You are right, the file must have the "Practitioner.qualification" before "Practitioner.qualification.issuer".
But the other file already has that code and still gives the error.
@Grahame Grieve or @Brett Esler can you suggest something further in relation to this?

view this post on Zulip Grahame Grieve (May 21 2018 at 23:48):

it's on my task list - maybe tomorrow....

view this post on Zulip Vikas Mittal (May 21 2018 at 23:49):

Sure. Thanks @Grahame Grieve.


Last updated: Apr 12 2022 at 19:14 UTC