FHIR Chat · buggy snapshot generation · IG creation

Stream: IG creation

Topic: buggy snapshot generation


view this post on Zulip Jens Villadsen (Jan 10 2020 at 13:38):

Snapshots generated by the publisher can result in duplicate element entries when adding invariants. See https://docs.ehealth.sundhed.dk/latest/ig/StructureDefinition-ehealth-appointment.xml.html and search for "<element id="Appointment.extension:legalBasis.value[x]:valueCodeableConcept">" @Grahame Grieve

view this post on Zulip Jens Villadsen (Jan 10 2020 at 15:04):

this ends up in an sdf-16: All element definitions must have unique ids (snapshot ...

view this post on Zulip Jens Villadsen (Jan 12 2020 at 12:48):

@Grahame Grieve would you agree? The case is that I've added an invariant on an extension on the sdf. Let me know if you need the source of the IG

view this post on Zulip Grahame Grieve (Jan 12 2020 at 21:21):

it shouldn't happen. can I add it as a snapshot generation test?

view this post on Zulip Jens Villadsen (Jan 12 2020 at 21:36):

I think so - I'll send you the raw material

view this post on Zulip Grahame Grieve (Jan 12 2020 at 21:44):

yes I'll need the extension definition as well

view this post on Zulip Jens Villadsen (Jan 12 2020 at 21:44):

I would imagine, yes

view this post on Zulip Jens Villadsen (Jan 12 2020 at 22:04):

you've got mail -

view this post on Zulip Grahame Grieve (Jan 13 2020 at 12:44):

so the extension/profile is bizarre. The extension assigns a value set to Extension.valueCodeableConcept.coding. Then, when you use it, you assign the same value set to Extension.valueCodeableConcept. I think that must be an error, and I don't think that you mean that. Still, I do think that the validator should get this right

view this post on Zulip Jens Villadsen (Jan 13 2020 at 13:17):

hmmm .... that makes sense. Now I'm however getting another error with the latest build of the IG:

validate res: ConceptMap/oio-bpp-roles-to-careteam-participant-roles             (00:14.0701)
validate res: StructureDefinition/ehealth-activitydefinition                     (00:14.0705)
Publishing Content Failed: Problem processing expression (%resource.kind = #39;.logical#39;. or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) in profile http://hl7.org/fhir/StructureDefinition/StructureDefinition path StructureDefinition.snapshot: Error in ?? at 1, 3: Found # expecting a token name (00:14.0719)
                                                                                 (00:14.0719)
Use -? to get command line help                                                  (00:14.0719)
                                                                                 (00:14.0720)
Stack Dump (for debugging):                                                      (00:14.0720)
org.hl7.fhir.exceptions.FHIRException: Problem processing expression (%resource.kind = #39;.logical#39;. or element.first().path = %resource.type) and element.tail().all(path.startsWith(%resource.snapshot.element.first().path&'.')) in profile http://hl7.org/fhir/StructureDefinition/StructureDefinition path StructureDefinition.snapshot: Error in ?? at 1, 3: Found # expecting a token name
        at org.hl7.fhir.r5.validation.InstanceValidator.checkInvariant(InstanceValidator.java:4930)
        at org.hl7.fhir.r5.validation.InstanceValidator.checkInvariants(InstanceValidator.java:4915)
        at org.hl7.fhir.r5.validation.InstanceValidator.checkInvariants(InstanceValidator.java:4806)
        at org.hl7.fhir.r5.validation.InstanceValidator.checkChild(InstanceValidator.java:4464)
        at org.hl7.fhir.r5.validation.InstanceValidator.validateElement(InstanceValidator.java:4376)
        at org.hl7.fhir.r5.validation.InstanceValidator.start(InstanceValidator.java:3287)
        at org.hl7.fhir.r5.validation.InstanceValidator.validateResource(InstanceValidator.java:5047)
        at org.hl7.fhir.r5.validation.InstanceValidator.validate(InstanceValidator.java:851)
        at org.hl7.fhir.r5.validation.InstanceValidator.validate(InstanceValidator.java:811)
        at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:4046)
        at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:3259)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3240)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:774)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:661)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6705)

view this post on Zulip Jens Villadsen (Jan 13 2020 at 13:18):

Latest being FHIR IG Publisher Version 1.0.38-SNAPSHOT (Git# beda1a6eb614). Built 2020-01-11T07:15:31.737+11:00 (65 hours old)

view this post on Zulip Jens Villadsen (Jan 13 2020 at 13:22):

It seems unrelated to the specific sdf ("ehealth-activitydefinition")

view this post on Zulip Grahame Grieve (Jan 13 2020 at 19:46):

what version of FHIR is the IG based on?

view this post on Zulip Jens Villadsen (Jan 13 2020 at 19:57):

"version": "3.0.2",

view this post on Zulip Jens Villadsen (Jan 13 2020 at 19:58):

from the ig.json

view this post on Zulip Grahame Grieve (Jan 13 2020 at 20:07):

hmm. this isn't a generic issue with 3.0.2 guides - i just tested - so I'll have to build yours specifically. can you send me an updated one with this issue?

view this post on Zulip Jens Villadsen (Jan 13 2020 at 20:36):

on its way ...

view this post on Zulip Grahame Grieve (Jan 13 2020 at 21:05):

that builds fine for me. can you clear your package cache and try again?

view this post on Zulip Jens Villadsen (Jan 13 2020 at 21:08):

cant remember the location - where would that be?

view this post on Zulip Grahame Grieve (Jan 13 2020 at 21:09):

it's stated in one of the first few lines of the IG Publisher output

view this post on Zulip Jens Villadsen (Jan 13 2020 at 21:13):

worked like a charm :D - thx

view this post on Zulip Grahame Grieve (Jan 13 2020 at 21:13):

great

view this post on Zulip Jens Villadsen (Jan 13 2020 at 21:13):

thought I had already done that ...

view this post on Zulip Grahame Grieve (Jan 13 2020 at 21:14):

hmm. well, you won't have to do it again - there's no making changes to past packages anymore

view this post on Zulip Jens Villadsen (Jan 13 2020 at 21:15):

famous last words ;)

view this post on Zulip Jens Villadsen (Jan 15 2020 at 10:51):

Hmmmm @Grahame Grieve - I've found that if I put the valueset binding on the extension then the invariant is not inspected during validation. If I move the valueset binding back to the Appointment profile and do the binding there, then the invariant gets inspected

view this post on Zulip Grahame Grieve (Jan 15 2020 at 11:52):

Is this out of context? the value set binding on what extension?

view this post on Zulip Jens Villadsen (Jan 15 2020 at 13:06):

so the extension/profile is bizarre. The extension assigns a value set to Extension.valueCodeableConcept.coding. Then, when you use it, you assign the same value set to Extension.valueCodeableConcept. I think that must be an error, and I don't think that you mean that. Still, I do think that the validator should get this right

view this post on Zulip Jens Villadsen (Jan 15 2020 at 14:57):

Is this out of context? the value set binding on what extension?

https://docs.ehealth.sundhed.dk/latest/ig/StructureDefinition-ehealth-legalBasis.html


Last updated: Apr 12 2022 at 19:14 UTC