FHIR Chat · Simplifier Packages, the IG Publisher and SUSHI · IG creation

Stream: IG creation

Topic: Simplifier Packages, the IG Publisher and SUSHI


view this post on Zulip Noemi Deppenwiese (Aug 13 2020 at 07:55):

I ran into an issue with dependencies on Simplifier packages I believe is caused by the IG Publisher. Specifically, the build works fine with version 1.1.2 of the publisher jar but breaks in 1.1.3:

Stack Dump (for debugging):                                                      (00:30.0299)
java.lang.NullPointerException
        at org.hl7.fhir.igtools.publisher.Publisher.fixPackageUrl(Publisher.java:2774)
        at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:2600)
        at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1785)
        at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1365)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:702)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7835)

In my SUSHI config.yaml, i have:

dependencies:
  de.basisprofil.r4:
    uri: https://simplifier.net/guide/basisprofil-de-r4
    version: 0.9.6

because if i only write de.basisprofil.r4: 0.9.6 SUSHI tells me error Failed to add de.basisprofil.r4:0.9.6 to ImplementationGuide instance because SUSHI could not find the IG URL in the dependency . (The dependency is tranlated to

    {
      "packageId": "de.basisprofil.r4",
      "uri": "https://simplifier.net/guide/basisprofil-de-r4",
      "version": "0.9.6",
      "id": "de_basisprofil_r4"
    }

by SUSHI.)
If I completly remove the dependency or use older publisher versions, it works fine...

view this post on Zulip Grahame Grieve (Aug 13 2020 at 08:02):

already fixed. Due for release in the next 24 hours

view this post on Zulip Noemi Deppenwiese (Aug 14 2020 at 11:30):

With version 1.1.11, the null pointer error has disappeared. But I now get

org.hl7.fhir.exceptions.FHIRException: Fehler beim Lesen C:\Users\Noemi\.fhir\packages\de.basisprofil.r4#0.9.6\package\CodeSystem-arge-ik-klassifikation.json aus dem Paket de.basisprofil.r4#0.9.6: An id is required for a deferred load resource
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackageInt(SimpleWorkerContext.java:454)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackage(SimpleWorkerContext.java:381)
        at org.hl7.fhir.igtools.publisher.Publisher.loadFromPackage(Publisher.java:2738)
        at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:2696)
        at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1846)
        at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1418)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:709)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7944)
Caused by: org.hl7.fhir.exceptions.FHIRException: An id is required for a deferred load resource
        at org.hl7.fhir.r5.context.CanonicalResourceManager.register(CanonicalResourceManager.java:200)
        at org.hl7.fhir.r5.context.BaseWorkerContext.registerResourceFromPackage(BaseWorkerContext.java:289)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackageInt(SimpleWorkerContext.java:451)
        ... 7 more

It seems to be a Simplifier issue, also happens with other Simplifier packages (in another case, the resource it failed to load was a StructureDefinition, so i think it is just the first resource it tries to load).

view this post on Zulip Noemi Deppenwiese (Aug 17 2020 at 13:31):

This is still an issue with version 1.1.12 of the publisher.

view this post on Zulip Ward Weistra (Aug 17 2020 at 14:19):

Hi @Noemi Deppenwiese, the 'ArgeIkKlassifikation' in de.basisprofil.r4 0.9.6 (deprecated/unlisted package version) indeed doesn't seem to have an id element: https://simplifier.net/packages/de.basisprofil.r4/0.9.6/files/129569/~xml
However the same resource in the latest package version de.basisprofil.r4 0.9.11 does: https://simplifier.net/packages/de.basisprofil.r4/0.9.11/files/142280/~xml

Would it be an option to use the newer package version?

If the IG publisher basically mandates id perhaps we should make this a rule and not something people run into only when using it :thinking:

view this post on Zulip Noemi Deppenwiese (Aug 17 2020 at 14:33):

Thanks @Ward Weistra ! Unfortunatly, some other resources have no id even in version 0.9.11 (I now get the error for GkvVersionEgk.json). I will reach out to the people responsible for maintaining the package.
I believe it would really help if Simplifier gave out a warning if trying to publishing a package with some resources lacking ids, since i encounterd a few Simplifier packages with this issue and this it seems to be a deal-breaker for the publisher.

view this post on Zulip Ward Weistra (Aug 17 2020 at 14:48):

Thanks @Noemi Deppenwiese, I guess contacting them for now is the shortest route.
I agree that IF this is mandatory in a package Simplfier should warn about this, but then I'd like to make that explicit so other package generators can also implement that.
@Grahame Grieve Do you think the IG publisher can have a workaround for resources without id or should we make id mandatory for every resource in a package?

view this post on Zulip Grahame Grieve (Aug 17 2020 at 19:14):

mandating the id was.. probably an oversight. It's a minor irritation that resources don't have an id, but I can deal with it. I just forgot while I was working on a feature

view this post on Zulip Grahame Grieve (Aug 17 2020 at 19:15):

fixing this is on my todo list, but didn't make 1.1.13 because I'm way behind

view this post on Zulip Grahame Grieve (Aug 18 2020 at 03:58):

fixed next release

view this post on Zulip Ward Weistra (Aug 18 2020 at 14:33):

Thanks @Grahame Grieve! @Noemi Deppenwiese FYI :point_up:


Last updated: Apr 12 2022 at 19:14 UTC