FHIR Chat · Exception - getElementByName · shorthand

Stream: shorthand

Topic: Exception - getElementByName


view this post on Zulip Bill Harty (Mar 21 2021 at 22:55):

Hi, new to FSH/Sushi/IG Publisher. I'm trying to build an IG based on profiles in the Carin IG. I create a minimal FSH profile based on Carin's Patient and Coverage profiles. Sushi and IG publisher run without problem and the IG comes out just fine. But when I add a FSH for Explanation of Benefit (based on this CARIN profile), an exception occurs when I run ./_genonce.sh. The exception is shown below. The EOB .FSH file is shown beneath that. Is this a problem with Sushi? IG Publisher? The carin profile itself? If I specify the FHIR standard EOB in the FSH file, it works fine, so it seems like something to do with the Carin profile. Thanks for any help or direction!

Exception:

Exception in thread "main" java.lang.Error: getElementByName: can't find http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit#ExplanationOfBenefit.item.adjudication in [ExplanationOfBenefit….

at org.hl7.fhir.r5.conformance.ProfileUtilities.getElementByName(ProfileUtilities.java:3182)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.genTypes(ProfileUtilities.java:3009)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.genElementCells(ProfileUtilities.java:3613)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3471)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3533)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3533)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:3533)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.generateTable(ProfileUtilities.java:3312)
    at org.hl7.fhir.igtools.renderers.StructureDefinitionRenderer.snapshot(StructureDefinitionRenderer.java:374)
    at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsStructureDefinition(Publisher.java:7121)
    at org.hl7.fhir.igtools.publisher.Publisher.generateResourceHtml(Publisher.java:6355)
    at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:6300)
    at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:4658)
    at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:858)
    at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:707)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:7756)

EOB FSH file:

Profile:        BCDAEOB
Parent:         http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Inpatient-Institutional
// if I use the standard FHIR EOB, everything is okay
// Parent:         ExplanationOfBenefit
Id:             bcda-ExplanationOfBenefit-Inpatient
Title:          "BCDA Explanation of Benefit Inpatient Profile"
Description:    "Defines constraints and extensions ..."

sushi-config.yaml:

id: cms.gov.bcda
canonical: https://bcda.cms.gov/ig/index.html

name: BCDA-IG
status: active
version: 2.0.0
fhirVersion: 4.0.1
copyrightYear: 2021+
releaseLabel: Build CI
publisher:
  name: HL7 US Realm Steering Committee
  url: http://www.healthit.gov
jurisdiction: urn:iso:std:iso:3166#US "United States of America"

menu:
  Home: index.html
  Artifacts: artifacts.html

parameters:
  apply-contact: true
  apply-jurisdiction: true
  apply-publisher: true
dependencies:
  hl7.fhir.us.carin-bb: 1.0.0
  hl7.fhir.us.core: 3.1.1

view this post on Zulip Nick Freiter (Mar 22 2021 at 12:22):

Hello, is there anything more to the FSH file that leads to that error? I've tried recreating this issue using the sushi-config.yaml file you pasted, and using the Carin EOB Profile, but it runs successfully for me. So I am guessing the error must be with one of the rules that are being applied on the BCDAEOB profile. If you're able to share those, it may help us debug.

view this post on Zulip Bill Harty (Mar 22 2021 at 18:46):

thank you for looking at this - much appreciated! I put my FSH files in my github repo. As you will see, my EOB profile is bare-bones, almost nothing in it at all.
Wondering if maybe it's a version problem on my installation of tools? Running sushi v1.3.0. Each time I generate the IG, I run sushi, then _updatePublsher.sh then _genOnce.sh, so I'm assuming my IGPub is up to date? Thanks again!!!

view this post on Zulip Nick Freiter (Mar 22 2021 at 19:24):

Thanks for putting the FSH up on github, much easier to debug that way. What I've found is that the _genonce.sh and _updatePublisher.sh files you are using look a bit out of date. The most recent files can be found in the ig-publisher-scripts repo. I've found that when I use those scripts, the _updatePublisher script downloads a newer version of the IG Publisher, and the _genonce script then runs without error.

I also noticed you were using an older project structure for your FSH. It should still work with versions of SUSHI > 1.0, but allow me to preach the new project structure a bit, since I think it is simpler to manage. You can find info on that project structure here. Since it looks like you mentioned you are just starting out using SUSHI with the IG Publisher, I would recommend the --init option that SUSHI provides, which is documented here. With this option, you can easily get a working IG up and running that should build successfully with SUSHI and the Publisher. Then you can just replace the sample files generated by --init with the FSH and config file I see you have already written. If you choose to go this route and have any questions, we are happy to help.

view this post on Zulip Bill Harty (Mar 22 2021 at 20:19):

That worked! thanks again, you just saved me a ton of time.


Last updated: Apr 12 2022 at 19:14 UTC