FHIR Chat · new error · IG creation

Stream: IG creation

Topic: new error


view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 04:58):

I'm getting a new error with publisher 1.0.46, have no idea where this is coming from

Load Content                                                                     (00:24.0393)
Processing Conformance Resources                                                 (00:25.0247)
Publishing Content Failed: Index: 0, Size: 0                                     (00:26.0725)
                                                                                 (00:26.0727)
Use -? to get command line help                                                  (00:26.0729)
                                                                                 (00:26.0730)
Stack Dump (for debugging):                                                      (00:26.0739)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:3917)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:3878)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3311)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:776)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:663)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6893)

view this post on Zulip Lloyd McKenzie (Jan 21 2020 at 05:20):

It seems to be choking because you have a differential that has no elements. How that occurred, I have no clue...

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 05:33):

it is failing on my constrained data type (string320)

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 05:33):

which has no differential

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 05:34):

(should it? what is a differential for a string that can have 320 characters?)

view this post on Zulip Lloyd McKenzie (Jan 21 2020 at 05:37):

How can you set constraints if you don't have a differential?

view this post on Zulip Lloyd McKenzie (Jan 21 2020 at 05:38):

If the snapshot isn't the same as the parent profile, there must be a differential. If the snapshot is identical, what's the point of creating the new profile?

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 05:47):

I did struggle with how to define a constrain on a base data type, eventually I just copied the definition from the base and constrained it using just the snapshot.

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 05:47):

I guess this issue was not detected until now. I'll review this

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 06:36):

got it working. I had messed up the paths in the structuredDef

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

you do need a differential. You can't redefine a primitive like that

view this post on Zulip Jose Costa Teixeira (Jan 21 2020 at 08:34):

this seems to work now

  <snapshot>
    <element id="string">
      <path value="string"/>
      <short value="String 320 characters"/>
      <definition value="A string limited to 320 characters"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="string" />
        <min value="0" />
        <max value="*" />
      </base>
    </element>
    <element id="string.value">
      <path value="string.value"/>
      <representation value="xmlAttr"/>
      <short value="Primitive value for string320"/>
      <definition value="Primitive value for string320"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="string.value" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/regex">
          <valueString value="[ \r\n\t\S]+"/>
        </extension>
        <code value="string"/>
      </type>
      <maxLength value="320"/>
    </element>
  </snapshot>
  <differential>
    <element id="string.value">
      <path value="string.value"/>
      <base>
        <path value="string.value" />
        <min value="0" />
        <max value="1" />
      </base>
      <maxLength value="320"/>
    </element>
  </differential>

view this post on Zulip Jose Costa Teixeira (Nov 04 2020 at 07:57):

I'm getting this error with 1.1.38 and I don't know how to read it:

Exception in thread "main" java.lang.Error: getElementByName: can't find http://hl7.org/fhir/StructureDefinition/Consent#Consent.provisionin [Consent, Consent.id, Consent.meta, Consent.implicitRules, Consent.language, Consent.text, Consent.contained, Consent.extension, Consent.modifierExtension, Consent.identifier, Consent.status, Consent.scope, Consent.category, Consent.patient, Consent.dateTime, Consent.performer, Consent.organization, Consent.source[x], Consent.policy, Consent.policy.id, Consent.policy.extension, Consent.policy.modifierExtension, Consent.policy.authority, Consent.policy.uri, Consent.policyRule, Consent.policyRule.id, Consent.policyRule.extension, Consent.policyRule.coding, Consent.policyRule.text, Consent.verification, Consent.verification.id, Consent.verification.extension, Consent.verification.modifierExtension, Consent.verification.verified, Consent.verification.verifiedWith, Consent.verification.verificationDate, Consent.provision, Consent.provision.id, Consent.provision.extension, Consent.provision.modifierExtension, Consent.provision.type, Consent.provision.period, Consent.provision.actor, Consent.provision.actor.id, Consent.provision.actor.extension, Consent.provision.actor.modifierExtension, Consent.provision.actor.role, Consent.provision.actor.reference, Consent.provision.action, Consent.provision.securityLabel, Consent.provision.purpose, Consent.provision.class, Consent.provision.code, Consent.provision.dataPeriod, Consent.provision.data, Consent.provision.data.id, Consent.provision.data.extension, Consent.provision.data.modifierExtension, Consent.provision.data.meaning, Consent.provision.data.reference, Consent.provision.provision]
        at org.hl7.fhir.r5.conformance.ProfileUtilities.getElementByName(ProfileUtilities.java:3421)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.genTypes(ProfileUtilities.java:3222)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.genElementCells(ProfileUtilities.java:3896)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3717)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3783)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3783)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.generateTable(ProfileUtilities.java:3551)
        at org.hl7.fhir.igtools.renderers.StructureDefinitionRenderer.snapshot(StructureDefinitionRenderer.java:369)
        at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsStructureDefinition(Publisher.java:7628)
        at org.hl7.fhir.igtools.publisher.Publisher.generateResourceHtml(Publisher.java:6665)
        at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6609)
        at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4871)

view this post on Zulip Michaela Ziegler (Nov 04 2020 at 08:04):

same problem here...

view this post on Zulip Pieter Edelman (Nov 04 2020 at 13:03):

I get a similar error on Observation (also version 1.1.38):

Exception in thread "main" java.lang.Error: getElementByName: can't find http://hl7.org/fhir/StructureDefinition/Observation#Observation.referenceRangein [Observation, Observation.id, Observation.meta, Observation.implicitRules, Observation.language, Observation.text, Observation.contained, Observation.extension, Observation.extension:zib-Pregnancy, Observation.extension:zib-Pregnancy.id, Observation.extension:zib-Pregnancy.extension, Observation.extension:zib-Pregnancy.url, Observation.extension:zib-Pregnancy.value[x], Observation.extension:zib-Pregnancy.value[x]:valueReference, Observation.extension:isCurrent, Observation.extension:isCertain, Observation.modifierExtension, Observation.identifier, Observation.basedOn, Observation.status, Observation.category, Observation.code, Observation.code.id, Observation.code.extension, Observation.code.coding, Observation.code.coding:DeliveryDateEstimated, Observation.code.coding:DeliveryDateEstimated.id, Observation.code.coding:DeliveryDateEstimated.extension, Observation.code.coding:DeliveryDateEstimated.system, Observation.code.coding:DeliveryDateEstimated.version, Observation.code.coding:DeliveryDateEstimated.code, Observation.code.coding:DeliveryDateEstimated.display, Observation.code.coding:DeliveryDateEstimated.userSelected, Observation.code.text, Observation.subject, Observation.context, Observation.effective[x], Observation.issued, Observation.performer, Observation.performer.id, Observation.performer.extension, Observation.performer.extension:practitionerRole, Observation.performer.reference, Observation.performer.identifier, Observation.performer.display, Observation.value[x], Observation.value[x]:valueDateTime, Observation.dataAbsentReason, Observation.interpretation, Observation.comment, Observation.bodySite, Observation.method, Observation.method.id, Observation.method.extension, Observation.method.coding, Observation.method.coding:method, Observation.method.text, Observation.specimen, Observation.device, Observation.referenceRange, Observation.referenceRange.id, Observation.referenceRange.extension, Observation.referenceRange.modifierExtension, Observation.referenceRange.low, Observation.referenceRange.high, Observation.referenceRange.type, Observation.referenceRange.appliesTo, Observation.referenceRange.age, Observation.referenceRange.text, Observation.related, Observation.related.id, Observation.related.extension, Observation.related.modifierExtension, Observation.related.type, Observation.related.target, Observation.component, Observation.component.id, Observation.component.extension, Observation.component.modifierExtension, Observation.component.code, Observation.component.value[x], Observation.component.dataAbsentReason, Observation.component.interpretation, Observation.component.referenceRange]

view this post on Zulip Lloyd McKenzie (Nov 04 2020 at 16:47):

Same. Mine is 'Bundle.link'. (Obviously also need to add a space between the path name and 'in'.)

view this post on Zulip Keeyan Ghoreshi (Nov 04 2020 at 19:28):

we are getting a similar error with the DTR IG

Exception in thread "main" java.lang.Error: getElementByName: can't find http://hl7.org/fhir/StructureDefinition/Questionnaire#Questionnaire.itemin

view this post on Zulip Larry Decelles (Nov 04 2020 at 20:00):

@Lloyd McKenzie do we know if this being looked at? This is a blocker. As Keeyan said we are seeing the same error. http://build.fhir.org/ig/HL7/davinci-dtr/branches/master/failure/build.log

view this post on Zulip Lloyd McKenzie (Nov 04 2020 at 20:47):

It's an issue with the latest IGPublisher. I expect @Grahame Grieve will look at it shortly

view this post on Zulip Grahame Grieve (Nov 04 2020 at 22:17):

hmm. It's weird how this one slipped by all the tests. It's actually the consequence of a bug that Lloyd found elsewhere, and relates to an obscure part of the profiling mechanism that people may have overlooked, and that the validator was to this point interpreting wrongly.

Say you have a profile on Observation. In your profile, you profile Observation.referenceRange. And you also slice Observation.component. In the slices on Observation.component, you do not explicitly profile Observation.component.referenceRange.

Some editors might think that this would mean that the Observation.component.referenceRange element in the slice inherits from the profile applied to Observation.referenceRange, but this is not the case - you must profile the slices explicitly

view this post on Zulip Grahame Grieve (Nov 04 2020 at 22:34):

anyhow, this will be fixed soon

view this post on Zulip Lloyd McKenzie (Nov 05 2020 at 02:45):

Soon = hours/days/a week?

view this post on Zulip Lloyd McKenzie (Nov 05 2020 at 02:46):

Why would profiling Observation.referenceRange profile Observation.component.referenceRange? (And how would that issue manifest with Bundle.link - which isn't a type that is re-used anywhere?)

view this post on Zulip Grahame Grieve (Nov 05 2020 at 04:18):

hours. Bundle.link is reused in Bundle.entry.link


Last updated: Apr 12 2022 at 19:14 UTC