FHIR Chat · Nested sections - can these be profiled? · IG creation

Stream: IG creation

Topic: Nested sections - can these be profiled?


view this post on Zulip Kevin Mayfield (Sep 28 2021 at 14:21):

In a couple of resources e.g. Composition
you have nested sections. E.g. section is nested with section below.

image.png

view this post on Zulip Kevin Mayfield (Sep 28 2021 at 14:24):

Can these sections be profiled. Forge is allowing them to be profiled (see below) which causes HL7 (and HAPI) validation to fail.

image.png

Is this an issue in forge?

view this post on Zulip Lloyd McKenzie (Sep 28 2021 at 14:26):

It should be possible to profile them... What validation issues are you getting?

view this post on Zulip Kevin Mayfield (Sep 28 2021 at 14:27):

image.png

view this post on Zulip Kevin Mayfield (Sep 28 2021 at 14:27):

Process Note: Unable to generate snapshot for UK Core Composition: Composition.section.section has no children (Composition.section.section.code) and no types in profile UK Core Composition
org.hl7.fhir.exceptions.DefinitionException: Composition.section.section has no children (Composition.section.section.code) and no types in profile UK Core Composition

view this post on Zulip Kevin Mayfield (Sep 28 2021 at 14:28):

latest HL7 command line validation and also HAPI FHIR Validation 5.5.1

view this post on Zulip Lloyd McKenzie (Sep 28 2021 at 14:35):

Are you able to post the profile?

view this post on Zulip Kevin Mayfield (Sep 28 2021 at 15:23):

This should be public https://simplifier.net/hl7fhirukcorer4/ukcorecomposition

view this post on Zulip Kevin Mayfield (Sep 28 2021 at 15:23):

^That's one of them

view this post on Zulip Lloyd McKenzie (Sep 28 2021 at 15:46):

I don't see anything obviously wrong. @Grahame Grieve ?

view this post on Zulip Grahame Grieve (Sep 29 2021 at 05:46):

fixed next release

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

Hi @Grahame Grieve. I ran into the same issue, so I wanted to ask: Can you tell me when the problem might be solved? So just that I know, nothing more...

view this post on Zulip Grahame Grieve (Nov 04 2021 at 10:45):

whatever I thought was fixed was released weeks ago, so if you still have a problem, it's not on the 'yet to be released' list

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

Thanks for your quick reply.

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

I started using fsh and sushi two weeks ago, so I am somewhat of a newbie in this part. Right now I updated scripts etc. with _updatePublisher.bat and ran it again, and it failed.
I also used the publisher.jar from github and copied it into the sushi file system and it also failed. My error message I entered here.

view this post on Zulip Mareike Przysucha (Nov 04 2021 at 11:00):

I'm sorry to trouble you.

view this post on Zulip Grahame Grieve (Nov 04 2021 at 12:15):

I'd have to debug that - can I reproduce it?

view this post on Zulip Mareike Przysucha (Nov 04 2021 at 12:18):

Please wait a few second, I will create a composition which should work without any other profiles of mine.

view this post on Zulip Mareike Przysucha (Nov 04 2021 at 12:28):

This profile here is another version of our profile. It should produce the same error: https://simplifier.net/mareikestestwiese/ewoundsummaryreduced

view this post on Zulip João Almeida (Mar 25 2022 at 15:29):

Hi everyone, I am having the same error regarding nested profiles sections. The IG creator returns error.

"Caused by: org.hl7.fhir.exceptions.DefinitionException: Composition.section.section.section has no children (Composition.section.section.section) and no types in profile Medication View profile 2.section.section"

Any solution? IG Pub 1.1.112
Thanks!

view this post on Zulip João Almeida (Mar 25 2022 at 15:33):

IG 1.1.113 returns the same error ... (tested just to make sure)

view this post on Zulip João Almeida (Mar 28 2022 at 12:50):

Grahame Grieve said:

I'd have to debug that - can I reproduce it?

Hi Grahame, This profile here seems to trigger the error:
https://github.com/joofio/obs-cdss-fhir/blob/8213ba8e5d1f5c06542ce8723198355bd466ded4/input/fsh/profiles.fsh#L22

view this post on Zulip Grahame Grieve (Mar 29 2022 at 05:34):

I get Jekyll has failed. Complete output from running Jekyll:  Liquid Exception: Could not locate the included file 'menu.xml' in any of ["/Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site so (00:31.0836)
?

view this post on Zulip Jose Costa Teixeira (Mar 29 2022 at 06:58):

normally this error comes when the xml file fails some transformation or checking in the xslts

view this post on Zulip Jose Costa Teixeira (Mar 29 2022 at 06:58):

@João Almeida could there be an issue with that file (e.g. malformed xml/html, unfinished tags)?

view this post on Zulip João Almeida (Mar 29 2022 at 08:42):

Thanks for the replies.
@Grahame Grieve that error comes up during what build time? using my sushi.yaml (that has a menu), it does not require menu.xml (jekyll and genonce run ok in my computer and github actions). Maybe I am running something old?

@Jose Costa Teixeira maybe that is the issue, but everything runs ok without the profile with nested section. When I add it, the problems start.

view this post on Zulip Grahame Grieve (Mar 29 2022 at 09:12):

I don't know why I had that problem, but I did. That repo in that branch?

view this post on Zulip João Almeida (Mar 29 2022 at 10:15):

I cloned the repo clean. _updatePublisher and then _genonce and ran ok.
The GH Action without the profile also ran ok (https://github.com/joofio/obs-cdss-fhir/actions/runs/2057359022)
Adding the profile, returns the section error...
What can I do to troubleshoot this?

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:06):

I have no idea. This is reproducible for me - I have no _menu.xml file. @Lloyd McKenzie where is it supposed to come from?

view this post on Zulip João Almeida (Mar 29 2022 at 11:09):

The error seems (from my basic java knowledge) to come from here.
https://github.com/HL7/fhir-ig-publisher/blob/84aeae9a7280bff71221c405df7d03033793621a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java#L5458

This comes from:
https://github.com/hapifhir/org.hl7.fhir.core/blob/7c6e7b278a6401dcf1567bdb0f5a61e465ce2b07/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java#L602

@Grahame Grieve I will add the menu.xml for your usage.

view this post on Zulip João Almeida (Mar 29 2022 at 11:15):

already added menu.xml so your code should work (or at least that message should go away). Nevertheless it is strange that mine does not require menu.xml and yours does.

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:20):

well it builds now

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:20):

what am I looking for?

view this post on Zulip João Almeida (Mar 29 2022 at 11:22):

in my local build and github actions returns the following:

java.lang.Exception: Error generating snapshot for /github/workspace/fsh-generated/resources/StructureDefinition-nestedcomposition(nestedcomposition): Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /github/workspace/fsh-generated/resources/StructureDefinition-nestedcomposition
    at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5405)
    at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4667)
    at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1005)
    at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:856)
    at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10010)
Caused by: org.hl7.fhir.exceptions.FHIRException: Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /github/workspace/fsh-generated/resources/StructureDefinition-nestedcomposition
    at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5458)
    at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5403)
    ... 4 more
Caused by: org.hl7.fhir.exceptions.DefinitionException: Composition.section.section.section has no children (Composition.section.section.section) and no types in profile Medication nested.section.section
    at org.hl7.fhir.r5.conformance.ProfileUtilities.getTypeForElement(ProfileUtilities.java:1955)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1518)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1304)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1548)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1548)
    at org.hl7.fhir.r5.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:669)
    at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5453)
    ... 5 more

https://github.com/joofio/obs-cdss-fhir/runs/5735882928?check_suite_focus=true#step:7:109

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:25):

in the log?

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:25):

I'm not seeing that. main branch?

view this post on Zulip João Almeida (Mar 29 2022 at 11:26):

yes in the log, main branch

view this post on Zulip João Almeida (Mar 29 2022 at 11:30):

FHIR IG Publisher Version 1.1.113 (Git# 36472c045b0c). Built 2022-03-18T05:50:01.31Z (11 days old)

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:35):

weird

view this post on Zulip Grahame Grieve (Mar 29 2022 at 11:36):

FHIR IG Publisher Version (unknown) (Git# null). Built null (?vu-duration?)
Detected Java version: 1.8.0_321 from /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home on Mac OS X/x86_64 (64bit). 14564MB available
dir = /Users/grahamegrieve/work/ig-pub/org.hl7.fhir.publisher.core, path = /usr/bin:/bin:/usr/sbin:/sbin
Parameters: -ig /Users/grahamegrieve/temp/igs/obs-cdss-fhir
Start Clock @ Tuesday, 29 March 2022 10:17:27 PM AEDT (2022-03-29T22:17:27+11:00)

API keys loaded from /Users/grahamegrieve/fhir-api-keys.ini                      (00:00.0016)
Package Cache: /Users/grahamegrieve/.fhir/packages                               (00:00.0022)
Run Sushi on /Users/grahamegrieve/temp/igs/obs-cdss-fhir                         (00:00.0029)
Load Template from hl7.be.fhir.template#current                                  (00:00.0796)
 Load Template from fhir.base.template#current                                   (00:04.0048)

onLoad.findSpreadsheets:

onLoad.updateIg:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onLoad-ig-working.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onLoad-ig-updated.xml
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onLoad.xslt

onLoad.extend:

onLoad:
Root directory: /Users/grahamegrieve/temp/igs/obs-cdss-fhir                      (00:05.0791)
Core Package hl7.fhir.r4.core#4.0.1
Terminology Cache is at /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/txcache. 5 files in cache (00:12.0090)
Connect to Terminology Server at http://tx.fhir.org                              (00:12.0094)
Load Package hl7.fhir.pubpack#0.0.9
Load Package hl7.fhir.xver-extensions#0.0.11
Load Package hl7.terminology.r4#3.1.0
Initialization complete                                                          (00:14.0159)
Fetch http://xxsomewhere.org/fhir/myig/package-list.json for version check       (00:14.0162)
Load Content                                                                     (00:14.0197)
Translating CQL source                                                           (00:14.0327)
Translating CQL source in folder /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input/cql (00:14.0327)
loadPrePages from FetchedFile[/Users/grahamegrieve/temp/igs/obs-cdss-fhir/input/includes] as /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input/includes
loadPrePages from FetchedFile[/Users/grahamegrieve/temp/igs/obs-cdss-fhir/input/pagecontent] as /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input/pagecontent
Processing Conformance Resources                                                 (00:14.0370)
Generating Snapshots                                                             (00:14.0405)
Propagating status                                                               (00:14.0405)
Generating Narratives                                                            (00:14.0406)
Validating Conformance Resources                                                 (00:14.0462)
Validating Resources                                                             (00:19.0172)
Processing Provenance Records                                                    (00:19.0174)
Generating Outputs in /Users/grahamegrieve/temp/igs/obs-cdss-fhir/output         (00:19.0175)

onGenerate.checkVersions:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/versions.txt
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onGenerate.getVersions.xslt

onGenerate.r5-schemas:
      [get] Getting: http://build.fhir.org/fhir-single.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R5/fhir-single.xsd
      [get] Not modified - so not downloaded
      [get] Getting: http://build.fhir.org/fhir-xhtml.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R5/fhir-xhtml.xsd
      [get] Not modified - so not downloaded
      [get] Getting: http://build.fhir.org/xml.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R5/xml.xsd
      [get] Not modified - so not downloaded
      [get] Getting: http://build.fhir.org/xmldsig-core-schema.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R5/xmldsig-core-schema.xsd
      [get] Not modified - so not downloaded

onGenerate.r4-schemas:
      [get] Getting: http://hl7.org/fhir/R4/fhir-single.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R4/fhir-single.xsd
      [get] Not modified - so not downloaded
      [get] Getting: http://hl7.org/fhir/R4/fhir-xhtml.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R4/fhir-xhtml.xsd
      [get] Not modified - so not downloaded
      [get] Getting: http://hl7.org/fhir/R4/xml.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R4/xml.xsd
      [get] Not modified - so not downloaded
      [get] Getting: http://hl7.org/fhir/R4/xmldsig-core-schema.xsd
      [get] To: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input-cache/schemas/R4/xmldsig-core-schema.xsd
      [get] Not modified - so not downloaded

onGenerate.r3-schemas:

onGenerate.r2b-schemas:

onGenerate.r2-schemas:

onGenerate.schemas:

onGenerate.data:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_data/artifacts.json
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onGenerate.data.xslt

onGenerate.setup:

onGenerate.infoFile:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_data/info.json
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onGenerate.genJson.xslt

onGenerate.processIncludes:
     [copy] Copying 19 files to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_includes

onGenerate.processIg:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.1.xml
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onGenerate.group.xslt
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.1.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-updated.xml
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onGenerate.final.xslt

onGenerate.igQa:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-updated.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/ongenerate-validation-igqa.json
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/onGenerate.qa.xslt

onGenerate.artifactList:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-updated.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_includes/artifacts.xml
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/createArtifactSummary.xslt

check-plantumlfiles:

onGenerate.plantUml.ig:

onGenerate.plantUml.template:

onGenerate.plantUml:

onGenerate.copyDataFiles:
     [copy] Copying 1 file to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_data

prepareDiagramSource:
     [xslt] Transforming into /Users/grahamegrieve/temp/igs/obs-cdss-fhir/input/images-source

renderDiagram:
     [java] No diagram found

createIGyaml:
     [xslt] Processing /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/onGenerate-ig-working.xml to /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/application.yaml
     [xslt] Loading stylesheet /Users/grahamegrieve/temp/igs/obs-cdss-fhir/template/scripts/hapi-yaml.xslt

createExampleScenarioPage:
     [xslt] Transforming into /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_includes
     [xslt] Transforming into /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_includes
     [xslt] Transforming into /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages/_includes

onGenerate.extend:

onGenerate:
Generating Summary Outputs                                                       (00:28.0809)
Sending Usage Stats to Server                                                    (00:29.0882)
## Memory (MB): Use = 1579, Free = 840, Total = 2420, Max =14564
Reclaiming memory...
## Memory (MB): Use = 438, Free = 2604, Total = 3043, Max =14564
Run jekyll: jekyll build --destination "/Users/grahamegrieve/temp/igs/obs-cdss-fhir/output" (in folder /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages) (00:30.0614)
Jekyll: Source: /Users/grahamegrieve/temp/igs/obs-cdss-fhir/temp/pages           (00:30.0881)
Jekyll: Generating...                                                            (00:30.0882)
Jekyll: done in 0.131 seconds.                                                   (00:31.0013)
Installing OBSCDSS.fhir.uv.myig#dev to the package cache
  Fetching:
  Installing:  done.
Checking Output HTML                                                             (00:31.0253)
found 521 files                                                                  (00:31.0261)
........................................
........................................
  ... 521 html files, 0 pages invalid xhtml (0%)                                 (00:31.0588)
  ... 81 links, 4 broken links (4%)                                              (00:31.0591)
Build final .zip                                                                 (00:31.0591)

view this post on Zulip João Almeida (Mar 29 2022 at 11:38):

will try with other java version and return feedback

view this post on Zulip João Almeida (Mar 29 2022 at 11:42):

this is with java 1.8

Checking internet connection...
Online

FHIR IG Publisher Version 1.1.113 (Git# 36472c045b0c). Built 2022-03-18T05:50:01.31Z (11 days old)
Detected Java version: 1.8.0_292 from /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre on Mac OS X/x86_64 (64bit). 3641MB available
dir = /Users/joaoalmeida/Desktop/obs-cdss-fhir, path = /Users/joaoalmeida/.jenv/versions/1.8/bin:/opt/homebrew/Cellar/jenv/0.5.4/libexec/libexec:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:/Users/joaoalmeida/.rbenv/shims:/opt/homebrew/opt/libpq/bin:/opt/homebrew/opt/node@14/bin:/Users/joaoalmeida/.jenv/shims:/Users/joaoalmeida/.jenv/bin:/opt/homebrew/Caskroom/miniforge/base/bin:/opt/homebrew/Caskroom/miniforge/base/condabin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
Parameters: -ig .
Start Clock @ Terça-feira, 29 de Março de 2022 12H39m WEST (2022-03-29T12:39:24+01:00)

API keys loaded from /Users/joaoalmeida/fhir-api-keys.ini                        (00:00.0023)
Package Cache: /Users/joaoalmeida/.fhir/packages                                 (00:00.0027)
Run Sushi on /Users/joaoalmeida/Desktop/obs-cdss-fhir                            (00:00.0037)
Sushi: npx: installed 933 in 4.609s                                              (00:04.0830)
Sushi: info  Running SUSHI v2.3.0 (implements FHIR Shorthand specification v1.2.0) (00:05.0050)
Sushi: info  Arguments:                                                          (00:05.0051)
Sushi: info    --out /Users/joaoalmeida/Desktop/obs-cdss-fhir                    (00:05.0051)
Sushi: info    /Users/joaoalmeida/Desktop/obs-cdss-fhir                          (00:05.0052)
Sushi: info  Using configuration file: /Users/joaoalmeida/Desktop/obs-cdss-fhir/sushi-config.yaml (00:05.0054)
Sushi: info  Importing FSH text...                                               (00:05.0057)
Sushi: info  Preprocessed 1 documents with 0 aliases.                            (00:05.0083)
Sushi: info  Imported 2 definitions and 0 instances.                             (00:05.0085)
Sushi: info  Checking local cache for hl7.fhir.r4.core#4.0.1...                  (00:05.0086)
Sushi: info  Found hl7.fhir.r4.core#4.0.1 in local cache.                        (00:05.0734)
Sushi: info  Loaded package hl7.fhir.r4.core#4.0.1                               (00:05.0735)
Sushi: info  Converting FSH to FHIR resources...                                 (00:05.0766)
Sushi: info  Converted 2 FHIR StructureDefinitions.                              (00:05.0882)
Sushi: info  Exporting FHIR resources as JSON...                                 (00:05.0883)
Sushi: info  Exported 2 FHIR resources as JSON.                                  (00:05.0890)
Sushi: info  Assembling Implementation Guide sources...                          (00:05.0891)
Sushi: info  Generated ImplementationGuide-obs.cdss.ig.example.json              (00:05.0894)
Sushi: info  Assembled Implementation Guide sources; ready for IG Publisher.     (00:05.0896)
Sushi:                                                                           (00:05.0896)
Sushi: ========================= SUSHI RESULTS ===========================       (00:05.0897)
Sushi: |  -------------------------------------------------------------  |       (00:05.0897)
Sushi: | |    Profiles   |  Extensions  |   Logicals   |   Resources   | |       (00:05.0898)
Sushi: | |-------------------------------------------------------------| |       (00:05.0898)
Sushi: | |       2       |      0       |      0       |       0       | |       (00:05.0899)
Sushi: |  -------------------------------------------------------------  |       (00:05.0899)
Sushi: |  -------------------------------------------------------------  |       (00:05.0901)
Sushi: | |      ValueSets     |    CodeSystems    |     Instances      | |       (00:05.0901)
Sushi: | |-------------------------------------------------------------| |       (00:05.0902)
Sushi: | |         0          |         0         |         0          | |       (00:05.0903)
Sushi: |  -------------------------------------------------------------  |       (00:05.0903)
Sushi: |                                                                 |       (00:05.0904)
Sushi: ===================================================================       (00:05.0904)
Sushi: | FSHing for compliments? Super job!     0 Errors      0 Warnings |       (00:05.0904)
Sushi: ===================================================================       (00:05.0904)
Load Template from hl7.be.fhir.template#current                                  (00:07.0926)
 Load Template from fhir.base.template#current                                   (00:10.0957)

onLoad.findSpreadsheets:

onLoad.updateIg:
     [xslt] Processing /Users/joaoalmeida/Desktop/obs-cdss-fhir/template/onLoad-ig-working.xml to /Users/joaoalmeida/Desktop/obs-cdss-fhir/template/onLoad-ig-updated.xml
     [xslt] Loading stylesheet /Users/joaoalmeida/Desktop/obs-cdss-fhir/template/scripts/onLoad.xslt

onLoad.extend:

onLoad:
Root directory: /Users/joaoalmeida/Desktop/obs-cdss-fhir                         (00:13.0791)
Core Package hl7.fhir.r4.core#4.0.1
Terminology Cache is at /Users/joaoalmeida/Desktop/obs-cdss-fhir/input-cache/txcache. 5 files in cache (00:20.0097)
Connect to Terminology Server at http://tx.fhir.org                              (00:20.0102)
Load Package hl7.fhir.pubpack#0.0.9
Load Package hl7.fhir.xver-extensions#0.0.11
Load Package hl7.terminology.r4#3.1.0
Initialization complete                                                          (00:21.0974)
Fetch http://xxsomewhere.org/fhir/myig/package-list.json for version check       (00:21.0979)
Load Content                                                                     (00:22.0121)
Translating CQL source                                                           (00:22.0253)
Translating CQL source in folder /Users/joaoalmeida/Desktop/obs-cdss-fhir/input/cql (00:22.0254)
loadPrePages from FetchedFile[/Users/joaoalmeida/Desktop/obs-cdss-fhir/input/includes] as /Users/joaoalmeida/Desktop/obs-cdss-fhir/input/includes
loadPrePages from FetchedFile[/Users/joaoalmeida/Desktop/obs-cdss-fhir/input/pagecontent] as /Users/joaoalmeida/Desktop/obs-cdss-fhir/input/pagecontent
Processing Conformance Resources                                                 (00:22.0395)
Generating Snapshots                                                             (00:22.0597)
Publishing Content Failed: Error generating snapshot for /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition(nestedcomposition): Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition (00:22.0785)
                                                                                 (00:22.0787)
Use -? to get command line help                                                  (00:22.0788)
                                                                                 (00:22.0788)
Stack Dump (for debugging):                                                      (00:22.0788)
java.lang.Exception: Error generating snapshot for /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition(nestedcomposition): Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5405)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4667)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1005)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:856)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10010)
Caused by: org.hl7.fhir.exceptions.FHIRException: Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5458)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5403)
        ... 4 more
Caused by: org.hl7.fhir.exceptions.DefinitionException: Composition.section.section.section has no children (Composition.section.section.section) and no types in profile Medication nested.section.section
        at org.hl7.fhir.r5.conformance.ProfileUtilities.getTypeForElement(ProfileUtilities.java:1955)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1518)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1304)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1548)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1548)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:669)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5453)
        ... 5 more

view this post on Zulip João Almeida (Mar 29 2022 at 11:43):

could it be the IGPublisher? I can try and build from source

view this post on Zulip João Almeida (Mar 29 2022 at 11:53):

built from source (org.hl7.fhir.publisher.cli) and returns the same error:

FHIR IG Publisher Version 1.1.114-SNAPSHOT (Git# 84aeae9a7280). Built 2022-03-29T12:46:44.706+01:00 (5 mins old)
Detected Java version: 1.8.0_292 from /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre on Mac OS X/x86_64 (64bit). 3641MB available
dir = /Users/joaoalmeida/Desktop/fhir-ig-publisher/org.hl7.fhir.publisher.cli, path = /Users/joaoalmeida/.jenv/versions/1.8/bin:/opt/homebrew/Cellar/jenv/0.5.4/libexec/libexec:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:/Users/joaoalmeida/.rbenv/shims:/opt/homebrew/opt/libpq/bin:/opt/homebrew/opt/node@14/bin:/Users/joaoalmeida/.jenv/shims:/Users/joaoalmeida/.jenv/bin:/opt/homebrew/Caskroom/miniforge/base/bin:/opt/homebrew/Caskroom/miniforge/base/condabin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
Parameters: -ig /Users/joaoalmeida/Desktop/obs-cdss-fhir
Start Clock @ Terça-feira, 29 de Março de 2022 12H52m WEST (2022-03-29T12:52:25+01:00)

API keys loaded from /Users/joaoalmeida/fhir-api-keys.ini                        (00:00.0021)
Package Cache: /Users/joaoalmeida/.fhir/packages                                 (00:00.0024)
Run Sushi on /Users/joaoalmeida/Desktop/obs-cdss-fhir                            (00:00.0034)
Sushi: npx: installed 933 in 4.221s                                              (00:04.0376)
Sushi: info  Running SUSHI v2.3.0 (implements FHIR Shorthand specification v1.2.0) (00:04.0589)
Sushi: info  Arguments:                                                          (00:04.0590)
Sushi: info    --out /Users/joaoalmeida/Desktop/obs-cdss-fhir                    (00:04.0590)
Sushi: info    /Users/joaoalmeida/Desktop/obs-cdss-fhir                          (00:04.0591)
Sushi: info  Using configuration file: /Users/joaoalmeida/Desktop/obs-cdss-fhir/sushi-config.yaml (00:04.0593)
Sushi: info  Importing FSH text...                                               (00:04.0595)
Sushi: info  Preprocessed 1 documents with 0 aliases.                            (00:04.0622)
Sushi: info  Imported 2 definitions and 0 instances.                             (00:04.0624)
Sushi: info  Checking local cache for hl7.fhir.r4.core#4.0.1...                  (00:04.0624)
Sushi: info  Found hl7.fhir.r4.core#4.0.1 in local cache.                        (00:05.0326)
Sushi: info  Loaded package hl7.fhir.r4.core#4.0.1                               (00:05.0326)
Sushi: info  Converting FSH to FHIR resources...                                 (00:05.0355)
Sushi: info  Converted 2 FHIR StructureDefinitions.                              (00:05.0469)
Sushi: info  Exporting FHIR resources as JSON...                                 (00:05.0469)
Sushi: info  Exported 2 FHIR resources as JSON.                                  (00:05.0476)
Sushi: info  Assembling Implementation Guide sources...                          (00:05.0477)
Sushi: info  Generated ImplementationGuide-obs.cdss.ig.example.json              (00:05.0480)
Sushi: info  Assembled Implementation Guide sources; ready for IG Publisher.     (00:05.0480)
Sushi:                                                                           (00:05.0481)
Sushi: ========================= SUSHI RESULTS ===========================       (00:05.0482)
Sushi: |  -------------------------------------------------------------  |       (00:05.0482)
Sushi: | |    Profiles   |  Extensions  |   Logicals   |   Resources   | |       (00:05.0483)
Sushi: | |-------------------------------------------------------------| |       (00:05.0483)
Sushi: | |       2       |      0       |      0       |       0       | |       (00:05.0485)
Sushi: |  -------------------------------------------------------------  |       (00:05.0485)
Sushi: |  -------------------------------------------------------------  |       (00:05.0487)
Sushi: | |      ValueSets     |    CodeSystems    |     Instances      | |       (00:05.0488)
Sushi: | |-------------------------------------------------------------| |       (00:05.0488)
Sushi: | |         0          |         0         |         0          | |       (00:05.0489)
Sushi: |  -------------------------------------------------------------  |       (00:05.0489)
Sushi: |                                                                 |       (00:05.0489)
Sushi: ===================================================================       (00:05.0490)
Sushi: | FSHing for compliments? Super job!     0 Errors      0 Warnings |       (00:05.0490)
Sushi: ===================================================================       (00:05.0491)
Load Template from hl7.be.fhir.template#current                                  (00:07.0459)
 Load Template from fhir.base.template#current                                   (00:09.0908)

onLoad.findSpreadsheets:

onLoad.updateIg:
     [xslt] Processing /Users/joaoalmeida/Desktop/obs-cdss-fhir/template/onLoad-ig-working.xml to /Users/joaoalmeida/Desktop/obs-cdss-fhir/template/onLoad-ig-updated.xml
     [xslt] Loading stylesheet /Users/joaoalmeida/Desktop/obs-cdss-fhir/template/scripts/onLoad.xslt

onLoad.extend:

onLoad:
Root directory: /Users/joaoalmeida/Desktop/obs-cdss-fhir                         (00:12.0842)
Core Package hl7.fhir.r4.core#4.0.1
Terminology Cache is at /Users/joaoalmeida/Desktop/obs-cdss-fhir/input-cache/txcache. 5 files in cache (00:18.0798)
Connect to Terminology Server at http://tx.fhir.org                              (00:18.0804)
Load Package hl7.fhir.pubpack#0.0.9
Load Package hl7.fhir.xver-extensions#0.0.11
Load Package hl7.terminology.r4#3.1.0
Initialization complete                                                          (00:20.0418)
Fetch http://xxsomewhere.org/fhir/myig/package-list.json for version check       (00:20.0423)
Load Content                                                                     (00:20.0429)
Translating CQL source                                                           (00:20.0558)
Translating CQL source in folder /Users/joaoalmeida/Desktop/obs-cdss-fhir/input/cql (00:20.0560)
loadPrePages from FetchedFile[/Users/joaoalmeida/Desktop/obs-cdss-fhir/input/includes] as /Users/joaoalmeida/Desktop/obs-cdss-fhir/input/includes
loadPrePages from FetchedFile[/Users/joaoalmeida/Desktop/obs-cdss-fhir/input/pagecontent] as /Users/joaoalmeida/Desktop/obs-cdss-fhir/input/pagecontent
Processing Conformance Resources                                                 (00:20.0707)
Generating Snapshots                                                             (00:20.0870)
Publishing Content Failed: Error generating snapshot for /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition(nestedcomposition): Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition (00:21.0023)
                                                                                 (00:21.0024)
Use -? to get command line help                                                  (00:21.0025)
                                                                                 (00:21.0025)
Stack Dump (for debugging):                                                      (00:21.0025)
java.lang.Exception: Error generating snapshot for /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition(nestedcomposition): Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5405)
        at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4667)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1005)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:856)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10010)
Caused by: org.hl7.fhir.exceptions.FHIRException: Unable to generate snapshot for http://hl7.org/fhir/us/example/StructureDefinition/nestedcomposition in /Users/joaoalmeida/Desktop/obs-cdss-fhir/fsh-generated/resources/StructureDefinition-nestedcomposition
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5458)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshots(Publisher.java:5403)
        ... 4 more
Caused by: org.hl7.fhir.exceptions.DefinitionException: Composition.section.section.section has no children (Composition.section.section.section) and no types in profile Medication nested.section.section
        at org.hl7.fhir.r5.conformance.ProfileUtilities.getTypeForElement(ProfileUtilities.java:1955)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1518)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1304)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1548)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:1548)
        at org.hl7.fhir.r5.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:669)
        at org.hl7.fhir.igtools.publisher.Publisher.generateSnapshot(Publisher.java:5453)
        ... 5 more

view this post on Zulip Lloyd McKenzie (Mar 29 2022 at 15:30):

Conversation has moved past this point, but for the record, menu.xml is not generated. It's a source file that must be put in the input/includes folder for the base template to work. (There's discussion about moving to a mechanism that would allow the file to be generated, but we're not there yet.)

view this post on Zulip Jose Costa Teixeira (Mar 30 2022 at 07:56):

sushi config does generate menu.xml.

view this post on Zulip João Almeida (Mar 30 2022 at 14:57):

Having the menu.xml or not, both versions (with the latest ig publisher) return the same error :/

view this post on Zulip Lloyd McKenzie (Mar 30 2022 at 16:43):

Where are you putting the menu.xml file?

view this post on Zulip Chris Moesel (Mar 30 2022 at 19:34):

@Lloyd McKenzie -- looking at his repo, it is at input/includes/menu.xml.

For the record, if there is a menu defined in sushi-config.yaml, it will be generated to fsh-generated/input/menu.xml. The base template was updated quite a while ago to also look in this location.

view this post on Zulip João Almeida (Mar 30 2022 at 20:25):

Chris Moesel said:

Lloyd McKenzie -- looking at his repo, it is at input/includes/menu.xml.

For the record, if there is a menu defined in sushi-config.yaml, it will be generated to fsh-generated/input/menu.xml. The base template was updated quite a while ago to also look in this location.

I added the file for @Grahame Grieve usage.
But before, as @Chris Moesel said, I was using the sushi-config.yaml that is not commented out.

view this post on Zulip João Almeida (Apr 04 2022 at 13:01):

built validator from source and same error appears:

Caused by: org.hl7.fhir.exceptions.DefinitionException: Composition.section.section.section has no children (Composition.section.section.section) and no types in profile composition nested.section.section

command:

 java -jar org.hl7.fhir.publisher.cli/target/org.hl7.fhir.publisher.cli-1.1.115-SNAPSHOT.jar  -ig <path-for-ig>

built with java 11

view this post on Zulip João Almeida (Apr 06 2022 at 16:26):

been trying to debug this issue and it feels that it comes from the hapi core lib. In here:
https://github.com/hapifhir/org.hl7.fhir.core/blob/76411218acf695e64f292501fe265bf4334542db/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java#L1971

 "System.out.println(indent+" - "+cpath+": base = "+baseCursor+" ("+descED(base.getElement(),baseCursor)+") to "+baseLimit+" ("+descED(base.getElement(),baseLimit)+"), diff = "+diffCursor+" ("+descED(differential.getElement(),diffCursor)+") to "+diffLimit+" ("+descED(differential.getElement(),diffLimit)+") "+
      "(slicingDone = "+slicingDone+") (diffpath= "+(differential.getElement().size() > diffCursor ? differential.getElement().get(diffCursor).getPath() : "n/a")+")");

prints

- Composition.section.section.section: base = 53 (Composition.section.section) to 53 (Composition.section.section), diff = 9 (Composition.section:section1.section:subsection.section) to 12 (Composition.section:section1.section:subsection.section:subsubsection.entry) (slicingDone = false) (diffpath= Composition.section.section.section)

"outcome" = Composition.section.section
"outcome.getType().size()"= 0


Last updated: Apr 12 2022 at 19:14 UTC