FHIR Chat · Issues after running ./_genonce.sh · shorthand

Stream: shorthand

Topic: Issues after running ./_genonce.sh


view this post on Zulip Sheila Connelly (Jul 30 2020 at 21:24):

Still messing around with the DevDays FSH Exercise files.

FYI, I do have installed: SUSHI v0.15.0 (implements FHIR Shorthand specification v0.13.x)

In Terminal, I get errors and other line items that look like issues after running the command: ./_genonce.sh

Here is what I see, toward the end:

onGenerate:
No path for http://hl7.org/fhir/us/core/StructureDefinition/us-core-location
No path for http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization

Checking Output HTML
found 573 files
... 573 html files, 0 pages invalid xhtml (0%)
... 45005 links, 985 broken links (2%)

Finished. 02:56.0522. Validation output in /Users/ssc-mbp/FHIR_FSH_DevDays_Tue/fsh-devdays-exercise-0.0.1/output/qa.html
Errors: 1, Warnings: 10, Info: 0, Broken Links = 985 (04:00.0599)

Even with the above, my IG creates and looks ok.

Are these errors/warning because of an issue with the downloaded “org.hl7.fhir.publisher.jar” ? Another reason? Something fixable?

Just wondering if I should ignore these errors and warnings or if you know of a reason/workaround/solution/known bugs.

Thank you.

view this post on Zulip Jose Costa Teixeira (Jul 30 2020 at 21:28):

what is the version of your IG publisher? You can read it at the top of your output/qa.html

view this post on Zulip Jose Costa Teixeira (Jul 30 2020 at 21:29):

in your case the full path of that file is
/Users/ssc-mbp/FHIR_FSH_DevDays_Tue/fsh-devdays-exercise-0.0.1/output/qa.html

view this post on Zulip Jose Costa Teixeira (Jul 30 2020 at 21:30):

you should not have a downloaded “org.hl7.fhir.publisher.jar”
you should have a downloaded "publisher.jar"

view this post on Zulip Sheila Connelly (Jul 30 2020 at 22:20):

I found:

<p style="background-color: #ffcccc">IG Publisher Version: v1.1.0, which is out of date. The current version is ?pub-ver-1? <a href="https://storage.googleapis.com/ig-build/org.hl7.fhir.publisher.jar">Download Latest</a></p>

I downloaded the .jar from the link in qa.html, it was the same file that was downloaded when I ran ./_updatePublisher.sh

view this post on Zulip Jose Costa Teixeira (Jul 31 2020 at 06:01):

i'm not sure for mac/linux, but the solution on windows is:
run ./_updatePublisher.sh twice and answer Y to the 4 questions it will ask you. you should get the latest jar with that.

view this post on Zulip Vassil Peytchev (Jul 31 2020 at 17:30):

That link is outdated - the latest publisher is at https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar

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

if you run the publisher.sh twice it will fix that (at least on windows it does)

view this post on Zulip Sheila Connelly (Aug 06 2020 at 21:20):

Thank you. Reminder that I am on a Mac.

I upgraded to SUSHI 0.15.1

I downloaded "publisher.jar" from the link Vassil provided.

Then, I downloaded the zip for the “complete solution for the FHIR DevDays US 2020 FHIR Shorthand Let's Build exercise.”
https://github.com/standardhealth/fsh-devdays-exercise/releases/tag/v0.0.1-solution

1) I made no changes at all to any files.
2) I ran ./_updatePublisher.sh two times and the file downloaded is: ‘org.hl7.fhir.publisher.jar’
3) I removed that file and copied publisher.jar to the same folder location: input-cache
4) I ran: ./_genonce.sh
5) Message: IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
6) I renamed publisher.jar to org.hl7.fhir.publisher.jar
7) I re-ran: ./_genonce.sh
8) The IG was created, though I received the message: Errors: 1, Warnings: 10, Info: 0, Broken Links = 985 (02:38.0456)

For now, I am not going to worry about those errors and warnings. Many other things to learn about.

Regarding the publisher.jar, if ./_updatePublisher.sh actually downloads the incorrect file, will that be fixed?

Is the correct workaround to download 'publisher.jar' and then rename the file to ‘org.hl7.fhir.publisher.jar’?

view this post on Zulip Jose Costa Teixeira (Aug 06 2020 at 22:03):

hmmm it might be your publisher.jar is older than the self-updating version

view this post on Zulip Jose Costa Teixeira (Aug 06 2020 at 22:03):

can you replace it with this
https://raw.githubusercontent.com/FHIR/sample-ig/master/_updatePublisher.sh
?

view this post on Zulip Jose Costa Teixeira (Aug 06 2020 at 22:04):

once you do, there should b no need to workarounds - it will get the jar from the correct location and save it with the right name

view this post on Zulip Jose Costa Teixeira (Aug 06 2020 at 22:06):

your workaround works, although the best workaround is to update the scripts. Via the script, or if that is not working, via the url directly (which is where sushi gets them from=
Sorry if I did not consider your script might be quite old (a few weks old)

view this post on Zulip Mareike Przysucha (Nov 02 2021 at 15:26):

Hi again.

Sorry to make this stream up again. And sorry for asking so many (stupid?) questions.
This time my issue seems to be a little bit more complicated.
I profiled a wound summary. In this summary, we have composition to structure the resources. It is a rather large composition with many sections and subsections. The first-level sections are mandatory, subsections etc. should only be present, if there is content. If a first-level section does not contain any content, emptyReason must be filled. This is ensured by an invariant.

Now sushi runs without any errors. The result can be seen here (Please don't mind the missing references, I just put the composition into the testing area, not all > 30 profiles and value sets).
When I now run _genonce.bat, I get an error:

java.lang.Exception: Error generating snapshot for EWoundSummary(EWoundSummary): Unable to generate snapshot for http://hs-osnabrueck.de/fhir/eWundbericht/StructureDefinition/EWoundSummary in C:\Users\Mareike\Documents\Workspace\fhir\FSH\eWundbericht\fsh-generated\resources\structuredefinition-EWoundSummary
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:4692)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3976)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:901)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:753)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8766)
Caused by: org.hl7.fhir.exceptions.FHIRException: Unable to generate snapshot for http://hs-osnabrueck.de/fhir/eWundbericht/StructureDefinition/EWoundSummary in C:\Users\Mareike\Documents\Workspace\fhir\FSH\eWundbericht\fsh-generated\resources\structuredefinition-EWoundSummary
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:4741)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:4690)
        ... 4 more
Caused by: org.hl7.fhir.exceptions.DefinitionException: Composition.section.section.section hat keine Kinder (Composition.section.section.section) und keine Typen im Profil EWoundSummary.section.section
        at org.hl7.fhir.r5.conformance.ProfileUtilities.getTypeForElement(ProfileUtilities.java:1926)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1498)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1284)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1528)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1528)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:653)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:4739)
        ... 5 more

The German part says: Composition.section.section.section has no children (Composition.section.section.section) and no types in profile WEoundSummary.section.section.

I can't get rid of this error. Can you please give me some guidance? Thanks in advance!

view this post on Zulip Patrick Werner (Nov 03 2021 at 10:29):

there were some issues with nested sections and the snapshot generator: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Nested.20sections.20-.20can.20these.20be.20profiled.3F

view this post on Zulip Patrick Werner (Nov 03 2021 at 10:29):

didn't check the release notes if this issue is already fixed.

view this post on Zulip Mareike Przysucha (Nov 04 2021 at 10:42):

Thanks, @Patrick Werner. Then I know.


Last updated: Apr 12 2022 at 19:14 UTC