FHIR Chat · List.item that is a list · IG creation

Stream: IG creation

Topic: List.item that is a list


view this post on Zulip John Moehrke (Dec 31 2020 at 16:56):

I get an NPE in the IG builder when I have an example List that includes in the List.item a reference to another List. I think this FSH is sufficient to cause the NPE

Instance: ex-documentreference2
InstanceOf: DocumentReference
Title: "Dummy DocumentReference 2 example"
Description: "Dummy DocumentReference 2 example for completeness sake. No actual use of this resource other than an example target"
* meta.security = http://terminology.hl7.org/CodeSystem/v3-ActReason#HTEST
* status = #current
* content.attachment.title = "Hello World"

Instance: ex-list
InstanceOf: List
Title: "Dummy List example"
Description: "Dummy List example for completeness sake. No actual use of this resource other than an example target"
* meta.security = http://terminology.hl7.org/CodeSystem/v3-ActReason#HTEST
* status = #current
* mode = #working
* entry.item = Reference(DocumentReference/ex-documentreference2)

Instance: ex-list2
InstanceOf: List
Title: "Dummy List 2 example"
Description: "Dummy List 2 example for completeness sake. No actual use of this resource other than an example target"
* meta.security = http://terminology.hl7.org/CodeSystem/v3-ActReason#HTEST
* status = #current
* mode = #working
* entry.item = Reference(List/ex-list)

view this post on Zulip John Moehrke (Dec 31 2020 at 16:58):

onGenerate:
Exception generating resource C:\Users\john.moehrke\Git\ITI.MHD\fsh-generated\resources\List-ex-list2::List/ex-list2: null (00:56.0921)
java.lang.NullPointerException
        at java.lang.String.replace(Unknown Source)
        at org.hl7.fhir.igtools.publisher.Publisher.genListView(Publisher.java:6907)
        at org.hl7.fhir.igtools.publisher.Publisher.genListViews(Publisher.java:6892)
        at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsList(Publisher.java:6848)
        at org.hl7.fhir.igtools.publisher.Publisher.generateResourceHtml(Publisher.java:6702)
        at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6653)
        at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4906)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8414)
   java.lang.String.replace(Unknown Source)                                      (00:56.0972)
   org.hl7.fhir.igtools.publisher.Publisher.genListView(Publisher.java:6907)     (00:56.0973)
   org.hl7.fhir.igtools.publisher.Publisher.genListViews(Publisher.java:6892)    (00:56.0976)
   org.hl7.fhir.igtools.publisher.Publisher.generateOutputsList(Publisher.java:6848) (00:56.0977)
   org.hl7.fhir.igtools.publisher.Publisher.generateResourceHtml(Publisher.java:6702) (00:56.0978)
   org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6653) (00:56.0979)
   org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4906)        (00:56.0979)
   org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:888)         (00:56.0980)
   org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:732)          (00:56.0982)
   org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8414)            (00:56.0996)

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 17:41):

Does sushi complete successfully?

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 17:48):

why are the references like
Reference(List/ex-list)?

view this post on Zulip Jose Costa Teixeira (Dec 31 2020 at 17:49):

shouldn't it be Reference(ex-list)?

view this post on Zulip John Moehrke (Dec 31 2020 at 18:50):

sushi is happy

view this post on Zulip John Moehrke (Dec 31 2020 at 18:58):

sushi is not happy without the "List/" prefix... I tried it without, still get the NPE in the IG builder

view this post on Zulip John Moehrke (Dec 31 2020 at 18:58):

sushi seems happy with either.. but NPE still happens

view this post on Zulip John Moehrke (Jan 04 2021 at 19:34):

@Grahame Grieve is there something I can do to help you reproduce this? The IG publisher NPE when I define an example List that includes a List.

view this post on Zulip Grahame Grieve (Jan 04 2021 at 19:56):

well, how do I reproduce it?

view this post on Zulip John Moehrke (Jan 04 2021 at 20:00):

my MHD IG has a couple of these ready to be uncommented out.

view this post on Zulip John Moehrke (Jan 04 2021 at 20:05):

This is all you need

Instance: ex-documentreference
InstanceOf: DocumentReference
* status = #current
* content.attachment.title = "Hello World"

Instance: ex-list
InstanceOf: List
* status = #current
* mode = #working
* entry.item = Reference(ex-documentreference)

Instance: ex-list2
InstanceOf: List
* status = #current
* mode = #working
* entry.item = Reference(ex-list)

view this post on Zulip Grahame Grieve (Jan 04 2021 at 20:06):

I don't have time for making that into something that works - just point me at a github repo that shows the problem

view this post on Zulip John Moehrke (Jan 04 2021 at 20:07):

https://github.com/IHE/ITI.MHD

view this post on Zulip John Moehrke (Jan 04 2021 at 20:08):

you will need to comment out the entry.item in either ex-dummy.fsh, or ex-SubmissionSet.fsh

view this post on Zulip John Moehrke (Jan 04 2021 at 20:08):

uncomment-out

view this post on Zulip Grahame Grieve (Jan 04 2021 at 20:32):

I don't think it's related to the fact that the target is a list. It looks like something isn't registered - the target of the list item reference

view this post on Zulip Grahame Grieve (Jan 04 2021 at 21:04):

no. it's something else. Fixed next release


Last updated: Apr 12 2022 at 19:14 UTC