FHIR Chat · IG Publisher - Inconsistency in displaying snapshot · tooling

Stream: tooling

Topic: IG Publisher - Inconsistency in displaying snapshot


view this post on Zulip Uday Chandrupatla (Jul 29 2019 at 05:53):

Hello,

When building a derived profile from R4 and STU3 HL7AU Practitioner profile and putting must support constraints, references and invariants for below child elements of <qualification>, the IG Publisher displays the content in 'differential' tab fails to display the content in 'snapshot'.

• qualification.identifier
• qualification.code
• qualification.period
• qualification.issuer

following are the screen shots for your reference

Differential tab
pasted image

Snapshot tab
pasted image

Appreciate any ideas on how it can be resolved.

Thanks.

view this post on Zulip Grahame Grieve (Jul 29 2019 at 05:55):

why do you expect that differential to display what's in the snapshot?

view this post on Zulip Uday Chandrupatla (Jul 29 2019 at 06:00):

Thanks Grahame, please correct if i am wrong, i realise that this it is usual behaviour of the IG Publisher output that the constraints are displayed in both differential and snapshot.

view this post on Zulip Grahame Grieve (Jul 29 2019 at 06:02):

the differential displays what this profile says. The snapshot displays the rules of applying the differential to the base profile. So I'm not sure why you expect to see more on the differential. without the source, I don't know whether that display is correct or not

view this post on Zulip Uday Chandrupatla (Jul 29 2019 at 06:47):

Hi Grahame, I am attaching the output profile "StructureDefinition-practitioner-dh-base-1.xml" StructureDefinition-practitioner-dh-base-1.xml if that helps to determine whether it is the expected behaviour.

view this post on Zulip Richard Townley-O'Neill (Jul 29 2019 at 06:51):

@Grahame Grieve Uday's profile of Practitioner has added must support to qualification and qualification.identifier. The differential shows must support on both, but the snapshot does not show it on qualification.identifier.

view this post on Zulip Grahame Grieve (Jul 29 2019 at 06:52):

so the problem is on the snapshot?

view this post on Zulip Richard Townley-O'Neill (Jul 29 2019 at 06:52):

yes

view this post on Zulip Richard Townley-O'Neill (Jul 29 2019 at 06:52):

StructureDefinition-practitioner-dh-base-1.xml
xml attached

view this post on Zulip Uday Chandrupatla (Jul 29 2019 at 07:03):

Yes, the problem is with snapshot table @Grahame Grieve sorry for the confusion.

FYI - our profile is adding extra constraints (must support flags) on the sliced element (qualification) in the base profile (Au Base Practitioner).

view this post on Zulip Grahame Grieve (Jul 30 2019 at 00:51):

our profile is adding extra constraints (must support flags) on the sliced element (qualification) in the base profile (Au Base Practitioner).

So you intend that the must-support applies to all the slices, yes?

view this post on Zulip Uday Chandrupatla (Jul 30 2019 at 01:10):

Yes

view this post on Zulip Grahame Grieve (Jul 30 2019 at 01:11):

well. see here: https://chat.fhir.org/#narrow/stream/179177-conformance/topic/More.20about.20Slicing

view this post on Zulip Uday Chandrupatla (Jul 30 2019 at 01:15):

Thanks @Grahame Grieve

view this post on Zulip Michael van der Zel (Nov 27 2019 at 12:11):

I am trying to run the IG publisher for DSTU2. I set the version to 1.0.2 but get:
Analysing..........................................Publishing Content Failed: /home/michael/.fhir/packages/hl7.fhir.r2.core#1.0.2/package/other (Is a directory) (00:12.0046)
What am I doing wrong? Works with R4 only, but my IG is a DSTU2, so that gives other problems.

view this post on Zulip Grahame Grieve (Nov 27 2019 at 12:28):

you need the latest version I released yesterday to fix that problem that was created when I changed the packages the day before (was working without enough sleep :-( )

view this post on Zulip Michael van der Zel (Nov 27 2019 at 16:21):

Works! Back to my own errors ;-)

view this post on Zulip Michael van der Zel (Nov 28 2019 at 12:17):

Follow up question. Why does the IG Publisher show only 1 mapping per mapping identity. I have a case where I want to add 2 mappings with the same identity on an attribute. Specifically I have a Observation.valueQuantity.unit and the unit comes from 2 places in the source.

view this post on Zulip Grahame Grieve (Nov 28 2019 at 15:53):

show where?

view this post on Zulip Michael van der Zel (Nov 28 2019 at 17:34):

Mappings in the StructureDefinition:

          "path": "Observation.valueQuantity.unit",
          "mapping": [
            {
              "identity": "sourcedb",
              "map": "120.5-1.2u1"
            },
            {
              "identity": "sourcedb",
              "map": "120.5-1.2u2"
            }
          ],
          "label": "RATE"

I expected rendering output mapping to be something like :

Observation
code 120.5-.03
effective[x] (effectiveDateTime) 120.5-.01
value[x]
value[x] (valueQuantity)
value 120.5-1.2v1, 120.5-1.2v2
unit 120.5-1.2u1, 120.5-1.2u2

view this post on Zulip Grahame Grieve (Nov 28 2019 at 17:37):

and show this where?

view this post on Zulip Michael van der Zel (Nov 28 2019 at 17:38):

See edited above.

view this post on Zulip Grahame Grieve (Nov 28 2019 at 17:39):

see what above? where are you looking in your IG?

view this post on Zulip Grahame Grieve (Nov 28 2019 at 18:55):

well, I'm guessing you mean the mappings tab... If so, fixed next release

view this post on Zulip Michael van der Zel (Dec 09 2019 at 10:43):

@Grahame Grieve is the next release now? How do I know if there is a next release?

view this post on Zulip Jose Costa Teixeira (Dec 09 2019 at 11:03):

https://chat.fhir.org/#narrow/stream/179297-committers.2Fnotification/topic/java.20IGPublisher

view this post on Zulip Michael van der Zel (Dec 10 2019 at 08:51):

Another question: I make errors in the StructureDefinition and the IG-publisher throws some Exception, but it doesnot say what StructureDefinition caused the Exception :-( So this is really hard to debug when I have 100+ (generated) profiles.

Stack Dump (for debugging): (00:10.0247)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:803)
at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:666)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:472)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:3801)
at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:3761)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3216)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:769)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:656)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6657)

view this post on Zulip Grahame Grieve (Dec 10 2019 at 20:42):

looks like a bug in the IG Publisher - will release a new version shortly that should fix that

view this post on Zulip Michael van der Zel (Dec 11 2019 at 21:16):

Sorry. Another question. I want to use the grouping feature of the IG, but I don't understand how to define a grouping. There is a <grouping> and a <resource><groupingId> and the constraint is that the <groupingId> can only reference defined groupings, but there is no way to give an <id> to the grouping. The <groupingId> comments says: "This must correspond to a package.id element within this implementation guide.", but I expect "grouping.id"? What am I missing here?

view this post on Zulip Jose Costa Teixeira (Dec 11 2019 at 21:25):

grouping used to be called package

view this post on Zulip Jose Costa Teixeira (Dec 11 2019 at 21:25):

so this seems just a leftover

view this post on Zulip Jose Costa Teixeira (Dec 11 2019 at 21:29):

your grouping would be in your IG like

    <grouping id="terminology">
      <name value="Terminology"/>
      <description value="Terminology resources"/>
    </grouping>
    <grouping id="core">
      <name value="Core"/>
      <description value="Core Profiles"/>
    </grouping>

    <resource>
      <reference>
        <reference value="StructureDefinition/be-communication"/>
      </reference>
      <fhirVersion value="4.0.1"/>
      <name value="Communication Profile"/>
      <description value="Communication / Diary Note profile"/>
      <groupingId value="core"/>
    </resource>
    <resource>
      <reference>
        <reference value="StructureDefinition/myotherprofile"/>
      </reference>
      <fhirVersion value="4.0.1"/>
      <name value="Another Profile"/>
      <description value="Another profile"/>
      <groupingId value="core"/>
    </resource>
    <resource>
      <reference>
        <reference value="CodeSystem/codesystem1"/>
      </reference>
      <fhirVersion value="4.0.1"/>
      <name value="A code system"/>
      <description value="A code system"/>
      <groupingId value="terminology"/>
    </resource>

view this post on Zulip Lloyd McKenzie (Dec 11 2019 at 21:57):

Pretty much every element can have an 'id' - it's inherited from Elememt

view this post on Zulip Michael van der Zel (Dec 12 2019 at 10:41):

Yay! Works. Thanks. It would be great that this grouping is added to the example in the specs.

view this post on Zulip Michael van der Zel (Dec 13 2019 at 10:42):

"StructureDefinition.contact[0].telecom[0].rank error value is less than permitted minimum value of 1"
Why is this an error? The cardinality of StructureDefinition.contact is 0..* and telecon is 0..* and rank is 0..1 and I could not find a constraint.

view this post on Zulip Grahame Grieve (Dec 13 2019 at 10:50):

rank is a positiveInt, value must be >=1

view this post on Zulip Michael van der Zel (Dec 13 2019 at 10:59):

I have no contact in my StructureDefinition and still it gives this error. Why is that?

view this post on Zulip Grahame Grieve (Dec 13 2019 at 11:06):

it's nothing to do with the structure definition - it's in the instance

view this post on Zulip Michael van der Zel (Dec 13 2019 at 15:06):

I am sorry. I don't follow. I only defined StructureDefinitions in the IG, I have no instances. I copy-pasted the error from the qa.html page.

view this post on Zulip Grahame Grieve (Dec 13 2019 at 20:37):

then how do I reproduce this?

view this post on Zulip Michael van der Zel (Dec 17 2019 at 08:38):

Yes. rank issue solved in IG publisher 1.0.22!
Another question. I see a lot of "The link 'http://hl7.org/fhir/DSTU2/v3/PurposeOfUse/vs.html' for "PurposeOfUse" cannot be resolved" errors.
And "The link 'StructureDefinition-<..>.sch' for "Schematron" cannot be resolved". What is causing that?

view this post on Zulip Grahame Grieve (Dec 17 2019 at 09:46):

Neither should happen. The first is probably an error with the publisher somewhere and the second is probably an error in the html template somewhere?

view this post on Zulip Michael van der Zel (Dec 22 2019 at 23:51):

I don't see the second (schematron) error anymore with the new IG Publisher 1.0.33

view this post on Zulip Grahame Grieve (Dec 23 2019 at 00:00):

yes we fixed it

view this post on Zulip Michael van der Zel (Jan 05 2020 at 20:47):

Here <https://confluence.hl7.org/display/FHIR/IG+Publisher+Documentation> they talk about "table-extensions.xhtml & list-extensions.xhtml" being generated by the IG Publisher, but I don't see them.

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

they should be in temp/_includes

view this post on Zulip Michael van der Zel (Jan 06 2020 at 10:42):

Yes, they are.
I want to have an "Extensions" tab in my IG menu, were do I find how to do that?

view this post on Zulip Jose Costa Teixeira (Jan 06 2020 at 11:28):

in your IG,
input/includes/menu.xml contains the menu entries

view this post on Zulip Michael van der Zel (Jan 06 2020 at 13:47):

Ah. And how do I link/include the table-extensions.xhtml in the menu?

view this post on Zulip Jose Costa Teixeira (Jan 06 2020 at 14:11):

I don't know if those pages are generated automatically or if that matters, but you can link to a page from the menu.xml

view this post on Zulip Jose Costa Teixeira (Jan 06 2020 at 14:12):

If you were to do this manually, you add this to your menu.xml

    <li class="dropdown">
        <a data-toggle="dropdown" href="#" class="dropdown-toggle">My New Menu
            <b class="caret"></b>
        </a>
        <ul class="dropdown-menu">
            <li>
                <a href="table-extensions.xhtml">My Table of Extensions</a>
            </li>
        </ul>
    </li>

view this post on Zulip Jose Costa Teixeira (Jan 06 2020 at 14:13):

(or something similar)

view this post on Zulip Michael van der Zel (Jan 06 2020 at 22:29):

Ah. Found out what I missed. In menu.xml I had to add the page (e.g. extensions.html) and then I had to add "extensions.html" as page in myig.xml and create a "extensions.xml" with some Jekyll:

 {% include list-extensions.xhtml %}

view this post on Zulip Michael van der Zel (Jan 10 2020 at 11:22):

For publisher v1.0.37 I get:

org.hl7.fhir.exceptions.FHIRException: Unknown FHIRAllTypes code 'token'
    at org.hl7.fhir.r5.model.Enumerations$FHIRAllTypes.fromCode(Enumerations.java:3981)
    at org.hl7.fhir.convertors.VersionConvertor_10_50.convertOperationDefinitionParameterComponent(VersionConvertor_10_50.java:8874)
    at org.hl7.fhir.convertors.VersionConvertor_10_50.convertOperationDefinition(VersionConvertor_10_50.java:8784)
    at org.hl7.fhir.convertors.VersionConvertor_10_50.convertResource(VersionConvertor_10_50.java:12146)
    at org.hl7.fhir.convertors.R2ToR5Loader.loadBundle(R2ToR5Loader.java:63)

view this post on Zulip Grahame Grieve (Jan 10 2020 at 11:27):

hmm. that's a problem.

view this post on Zulip Michael van der Zel (Jan 10 2020 at 11:28):

And for some reason I get:

Jekyll: jekyll 3.0.1 | Error:  undefined method `gsub' for nil:NilClass          (00:12.0636)
Jekyll has failed. Complete output from running Jekyll: jekyll 3.0.1 | Error:  undefined method `gsub' for nil:NilClass

I don't know how to debug that :-(

view this post on Zulip Grahame Grieve (Jan 10 2020 at 11:31):

no but if you get that after the other, it'll almost certainly be a downstream consequence of the first

view this post on Zulip Grahame Grieve (Jan 10 2020 at 11:31):

how do I reproduce the first?

view this post on Zulip Michael van der Zel (Jan 10 2020 at 22:45):

And for some reason I get:

Jekyll: jekyll 3.0.1 | Error: undefined method gsub' for nil:NilClass (00:12.0636) Jekyll has failed. Complete output from running Jekyll: jekyll 3.0.1 | Error: undefined method gsub' for nil:NilClass

I don't know how to debug that :-(

This seems to be a jekyll installation issue. I upgrade to jekull 3.8 and this problem went away!

view this post on Zulip Michael van der Zel (Feb 06 2020 at 00:01):

1) How do I fix errors like: "No value set found at Encounter.language (url = 'http://tools.ietf.org/html/bcp47')"?
2) Why is ElementDefinition.name and ElementDefinition.id overwritten with the value of ElementDefinition.path? -> This will cause a duplicate id ERROR. I provide an unique id and name in the differentiel.

view this post on Zulip Grahame Grieve (Feb 06 2020 at 01:10):

ElementDefinition.id is fixed by the specification. when you say 'name', what are referring to?

view this post on Zulip Grahame Grieve (Feb 06 2020 at 01:10):

you can't fix the first 'error' because it's not an error. It's just a fact

view this post on Zulip Michael van der Zel (Feb 06 2020 at 02:47):

2) I am referring to the name of the Element. In DSTU2 it is called name as opposed to sliceName in R4.
1) Ok. I'll ignore it then.

view this post on Zulip Grahame Grieve (Feb 06 2020 at 02:50):

  1. ok then, slicename is never inferred from the id , and you can't be sparse with slices - you have to be explicit

view this post on Zulip Michael van der Zel (Feb 06 2020 at 04:09):

2) Ok. I hope this example snippet will illustrate better.
In the IG publisher input/resource structuredefinition (DSTU2!) is:

        "id": "Patient.selfIdentifiedGender",
        "path": "Patient.extension",
        "name": "selfIdentifiedGender",

and after running the IG publisher it is replaced by:

        "id": "Patient.extension",
        "path": "Patient.extension",
        "name": "Patient.extension",

view this post on Zulip Grahame Grieve (Feb 06 2020 at 05:23):

I need to see more to understand what is going on. can I reproduce this?

view this post on Zulip Michael van der Zel (Feb 06 2020 at 21:19):

I'll try to isolate it.

view this post on Zulip Michael van der Zel (Feb 06 2020 at 21:48):

Hah. I found the issue. I made a mistake and forgot the slicing thing. When adding that it works like I expected.

 "id" : "Patient.extension",
        "path" : "Patient.extension",
        "name" : "Patient.extension",
        "slicing" : {
          "discriminator" : [
            "url"
          ],
          "ordered" : false,
          "rules" : "open"
        },

view this post on Zulip Grahame Grieve (Feb 06 2020 at 21:56):

great I'm glad to hear that


Last updated: Apr 12 2022 at 19:14 UTC