FHIR Chat · IG Publisher blows up on Something slicing-related · IG creation

Stream: IG creation

Topic: IG Publisher blows up on Something slicing-related


view this post on Zulip Saul Kravitz (May 13 2020 at 14:58):

Something about my slicing causes the IG Publisher to unceremoniously blow up. If I delete the slicing on supportingInfo, it happily generates appropriate output. Sushi v0.12.5 is delighted with the input. You can find the inputs at : https://github.com/saulakravitz/carin-bb.git.

Here is the output:
% ./_genonce.sh
Checking internet connection...
Online

FHIR IG Publisher Version 1.0.94-SNAPSHOT (Git# 77c06d8ca14c). Built 2020-05-12T11:55:14.985+10:00 (36 hours old)
Detected Java version: 1.8.0_242 from /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre on x86_64 (64bit). 3641MB available
Parameters: -ig ig.ini
dir = /Users/skravitz/git/carin-bb/fsh/build, path = /Users/skravitz/.rvm/gems/ruby-2.6.3/bin:/Users/skravitz/.rvm/gems/ruby-2.6.3@global/bin:/Users/skravitz/.rvm/rubies/ruby-2.6.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/skravitz/.rvm/bin
Run time = Wednesday, May 13, 2020 10:47:23 AM EDT (2020-05-13T10:47:23-04:00)
Package Cache: /Users/skravitz/.fhir/packages (00:00.0122)
Load Template from fhir.base.template#current (00:02.0485)

onLoad.findSpreadsheets:

onLoad.updateIg:
[xslt] Processing /Users/skravitz/git/carin-bb/fsh/build/template/onLoad-ig-working.xml to /Users/skravitz/git/carin-bb/fsh/build/template/onLoad-ig-updated.xml
[xslt] Loading stylesheet /Users/skravitz/git/carin-bb/fsh/build/template/scripts/onLoad.xslt

onLoad.extend:

onLoad:
Root directory: /Users/skravitz/git/carin-bb/fsh/build (00:09.0848)
Core Package hl7.fhir.r4.core#4.0.1
Terminology Cache is at /Users/skravitz/git/carin-bb/fsh/build/input-cache/txcache. 1 files in cache (00:34.0195)
Connect to Terminology Server at http://tx.fhir.org (00:34.0197)
Load Package hl7.fhir.pubpack#0.0.4
Load Package hl7.fhir.xver-extensions#0.0.4
Dependency 'hl7.fhir.us.core' has no id, so can't be referred to in markdown in the IG (00:35.0129)
Initialization complete (00:38.0462)
Load Content (00:38.0464)
Processing Conformance Resources (00:39.0286)
Publishing Content Failed: null (00:57.0249)
(00:57.0249)
Use -? to get command line help (00:57.0249)
(00:57.0249)
Stack Dump (for debugging): (00:57.0249)
java.lang.NullPointerException
at org.hl7.fhir.r5.conformance.ProfileUtilities.commas(ProfileUtilities.java:4255)
at org.hl7.fhir.r5.conformance.ProfileUtilities.describeSlice(ProfileUtilities.java:4249)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateDescription(ProfileUtilities.java:3829)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateDescription(ProfileUtilities.java:3749)
at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3430)
at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3492)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateTable(ProfileUtilities.java:3235)
at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:2604)
at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:236)
at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:208)
at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:1014)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3568)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:826)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:688)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7310)

view this post on Zulip Chris Moesel (May 13 2020 at 15:42):

Sushi v0.12.5 is delighted with the input

Just FYI - SUSHI doesn't validate any of the slicing details (discriminator path, type, etc) -- so SUSHI may be too easily delighted if something isn't quite right there.

view this post on Zulip John Moehrke (May 13 2020 at 15:45):

delectable and delightful...

view this post on Zulip Chris Moesel (May 13 2020 at 15:46):

If I delete the slicing on supportingInfo

Which profile is this in? It wasn't clear from the stack trace.

view this post on Zulip Saul Kravitz (May 13 2020 at 16:03):

The IG publisher is delighted with the slicing in Coverage, and repulsed by the slicing in each/every EOB profile.

view this post on Zulip Chris Moesel (May 13 2020 at 16:10):

Should I be looking at the saul branch?

view this post on Zulip Chris Moesel (May 13 2020 at 16:16):

OK. This is what I'm seeing:

* supportingInfo ^slicing.discriminator.path = "value:category.coding.code"
* supportingInfo ^slicing.rules = #open
* supportingInfo ^slicing.ordered = false   // can be omitted, since false is the default
* supportingInfo ^slicing.description = "Slice based on value pattern"

I'm not familiar with the value:... syntax for discriminator paths -- and I see you didn't declare a discriminator type at all. I think maybe what you really want is:

* supportingInfo ^slicing.discriminator.type = #value
* supportingInfo ^slicing.discriminator.path = "category.coding.code"
* supportingInfo ^slicing.rules = #open
* supportingInfo ^slicing.ordered = false   // can be omitted, since false is the default
* supportingInfo ^slicing.description = "Slice based on value pattern"

(EDIT: Corrected based on @Saul Kravitz's astute observation below!)

view this post on Zulip Chris Moesel (May 13 2020 at 16:19):

Ohhhhh... I think I see. I expect you are just doing what you see in rendered profiles. For example, the BP profile rendering shows this: image.png

view this post on Zulip Chris Moesel (May 13 2020 at 16:20):

So that's probably where value:code.coding.code came from. I get it. So that style of indicating the discriminator is currently not supported in FSH -- but it's an interesting idea! For now, however, you need to set the type and path discreetly in two separate rules (as in my example above).

view this post on Zulip Saul Kravitz (May 13 2020 at 16:26):

  • supportingInfo ^slicing.discriminator.type = #value

view this post on Zulip Chris Moesel (May 13 2020 at 16:33):

Ha. You're exactly right! Thanks for the correction!

view this post on Zulip Chris Moesel (May 13 2020 at 16:33):

I'll correct it above as well.

view this post on Zulip Saul Kravitz (May 13 2020 at 16:40):

IG Publisher is now happy, so I'm (not un)happy. Thanks.
Error messages from sushi and IG publisher that eliminate the need for expert consulting support would be GREATLY appreciated.

view this post on Zulip Saul Kravitz (May 13 2020 at 16:52):

BTW, adding slicing to a FSH spec causes the sushi runtime to go up dramatically in the "info Converting FSH to FHIR resources..." step. Dramatically means: from taking 10s, to taking 2-3 minutes.

view this post on Zulip Chris Moesel (May 13 2020 at 16:59):

I hadn't noticed that slicing has that affect in SUSHI. That's interesting (and a little surprising), but also good to know...

view this post on Zulip Grahame Grieve (May 13 2020 at 18:00):

Error messages from sushi and IG publisher that eliminate the need for expert consulting support would be GREATLY appreciated

of course but that doesn't make it easy. This particular scenario will be more graceful in the future

view this post on Zulip David Pyke (May 14 2020 at 14:44):

<wrong place>


Last updated: Apr 12 2022 at 19:14 UTC