FHIR Chat · IG Publisher Error - element ID · implementers

Stream: implementers

Topic: IG Publisher Error - element ID


view this post on Zulip Max Nakamura (Jul 14 2017 at 17:56):

Hello,

Using the latest org.hl7.fhir.igpublisher.jar downloaded from http://hl7.org/fhir/downloads.html, the below error has been appearing when running the IG Publisher.

"All element definitions must have an id [snapshot.element.all(id.exists()) and differential.element.all(id.exists())]:"

I have attached .zip file containing the full export package from Trifolia.

Any guidance you can provide on how to resolve this error would be greatly appreciated.

Thank you,

Meenaxi Gosai
QA Analyst/Engineer
Lantana Consulting Group
t: 360.450.0545
Maple Ridge—BC PST

C-CDA-on-FHIR.zip

view this post on Zulip Sean McIlvenna (Jul 14 2017 at 18:09):

Is it possible that the snapshot generation (based on differential) is not adding in the element/@id? We have included element/@id in the differential that we generate, but when we run it through the ig publisher we still get this error message...

view this post on Zulip Sean McIlvenna (Jul 14 2017 at 18:10):

Also note, we were not receiving this error in previous versions of the ig publisher (earlier this week) when we did NOT include element/@id

view this post on Zulip Lloyd McKenzie (Jul 14 2017 at 18:53):

First step is to try the most recent publisher: http://build.fhir.org/org.hl7.fhir.igpublisher.jar

view this post on Zulip Lloyd McKenzie (Jul 14 2017 at 18:53):

If the problem still exists, let me know and I'll try to dig.

view this post on Zulip Max Nakamura (Jul 17 2017 at 13:32):

Hello Lloyd,

Thank you for your response. I downloaded the most recent publisher and re-ran the IG Publisher process, but unfortunately, the element error still appears related to all structure definitions.

Also, a new error is appearing related to composition extensions within the examples with the latest version of the publisher that was not there in previous versions.

 "Error at 1, 1: Premature ExpressionNode termination at unexpected token "type".

Best Regards,

Meenaxi Gosai
QA Analyst/Engineer
Lantana Consulting Group
t: 360.450.0545
Maple Ridge—BC PST

view this post on Zulip Lloyd McKenzie (Jul 17 2017 at 15:20):

I took a quick look at CCDA-on-FHIR-Authorization.xml. You have an id attribute specified on the root element but not on any of the others and the id that is specified isn't valid as per the rules for id. My guess is that the tool is either trying to use your id and choking or presuming all elements will have an id because you have one on the first element. There should either be no ids or they should all be present and all be correct (using the path + slicename syntax)

view this post on Zulip Rick Geimer (Jul 17 2017 at 15:22):

Another error here. I've got a StructureDefinition containing the following:
<element id="Composition.subject">
<path value="Composition.subject" />
<type>
<code value="Reference" />
<targetProfile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" />
</type>
</element>

However, when I run the IG publisher the differential (and snapshot for that matter) show the following in the generated HTML:

subject Σ 1..1 Reference(Resource)

The StructureDefinition in question can be found here:
https://github.com/HL7/ccda-on-fhir/blob/master/resources/structuredefinition/CCDA-on-FHIR-US-Realm-Header.xml

view this post on Zulip Lloyd McKenzie (Jul 17 2017 at 15:26):

That's very weird. If you can send me a version of the IG that has the id issue fixed, I'll try running it through the debuggers and see if I can figure out the other issues.

view this post on Zulip Rick Geimer (Jul 17 2017 at 15:32):

I'll remove the offending IDs and check them into github after my next call.

view this post on Zulip Eric Haas (Jul 17 2017 at 15:34):

how is your config file set up?

view this post on Zulip Eric Haas (Jul 17 2017 at 15:35):

i.e., ig.json

view this post on Zulip Rick Geimer (Jul 17 2017 at 16:33):

@Lloyd McKenzie I removed the offending id attributes and checked everything back into github.
@Eric Haas All the files (including the config file) are in github here:
https://github.com/HL7/ccda-on-fhir

The ig.json file is called C-CDA_on_FHIR.json. Should it be renamed to ig.json? Not sure if that is important or not.

view this post on Zulip Eric Haas (Jul 17 2017 at 17:26):

I think that the web-hook thingy looks for ig.json. I have never named it anything else. @Josh Mandel ?

view this post on Zulip Rick Geimer (Jul 17 2017 at 17:29):

Ok, renamed to ig.json and committed.

view this post on Zulip Max Nakamura (Jul 17 2017 at 20:00):

Hello Lloyd,

Sean updated Trifolia to remove all of the "<element id=", and I exported a new FHIR Build Package from Trifolia (attached to this ticket) and confirmed the resources folder contained no files with "<element id=".

Unfortunately, When I ran the IG Publisher, the "error All element definitions must have an id [snapshot.element.all(id.exists()) and differential.element.all(id.exists())]" still persists.

Please advise,

Thank you,

Meenaxi GosaiC-CDA-on-FHIR.zip

view this post on Zulip Rick Geimer (Jul 17 2017 at 20:09):

I can verify what Meenaxi said, but after some digging I think it is a legit error.

Per http://hl7.org/fhir/structuredefinition.html
sdf-16: All element definitions must have unique ids (snapshot) (expression : snapshot.element.id.trace('ids').isDistinct())
sdf-17: All element definitions must have unique ids (diff) (expression : differential.element.id.trace('ids').isDistinct())

So I don't think it is legal to have no id attributes on ElementDefintions.

view this post on Zulip Sean McIlvenna (Jul 17 2017 at 20:36):

Dang... this means I need to add them back in

view this post on Zulip Lloyd McKenzie (Jul 18 2017 at 02:44):

I have IG files without it, but they're 2.0 resources, so that may be why it's not complaining. If you add them, make sure you use the correct values for them.

view this post on Zulip Grahame Grieve (Jul 25 2017 at 07:55):

so is this sorted? I'm back on deck properly and trying to catch up

view this post on Zulip Rick Geimer (Jul 25 2017 at 12:23):

Yes, the spec seems to require them, so for C-CDA on FHIR I opened the files in Forge and it added the IDs where they were missing. We will update Trifolia to include them from now on (and to be in the correct path:slice format).

view this post on Zulip Grahame Grieve (Jul 25 2017 at 12:24):

the publisher should just auto-populate them

view this post on Zulip Grahame Grieve (Jul 25 2017 at 12:24):

on both differential and snapshot


Last updated: Apr 12 2022 at 19:14 UTC