Stream: implementers
Topic: Sushi
Shovan Roy (Feb 13 2020 at 02:10):
I'm trying to build a very basic IG using Sushi. I'm using FHIR R4 and I would like to use AU version of R4. I'm getting the following error while trying to do so : "error: Failed to add hl7.fhir.au.base:2.0.0 to ImplementationGuide instance. Could not determine its canonical URL from the FHIR cache." Any suggestion what needs to be done?
This is what I've provided as dependency
"dependencies": {
"hl7.fhir.r4.core": "4.0.1",
"hl7.fhir.au.base": "2.0.0"
},
@Chris Moesel , any suggestion?
Chris Moesel (Feb 13 2020 at 13:23):
Hi @Shovan Roy. What version of SUSHI are you using? If you're not using the latest version, could you upgrade? (npm install -g fsh-sushi
should do it). Starting in SUSHI 0.8.0, we do some additional logging. After running SUSHI, some of the first logs should be about loading dependencies. Do you get a log that the AU dependency loaded successfully, or do you get an error saying it did not?
Chris Moesel (Feb 13 2020 at 13:23):
Also, this is fine -- but you'll probably have better luck w/ future SUSHI-related questions if you ask them in the #shorthand stream.
Ronald Dendere (Oct 01 2020 at 01:38):
@Chris Moesel Does FSH support the creation of derived profiles?
Chris Moesel (Oct 01 2020 at 12:18):
If by "derived profiles" you mean profiles based on other profiles, then yes, FSH supports that -- you just declare the base profile as the "Parent". If you mean something else, please clarify and I'll try to answer!
Ronald Dendere (Oct 02 2020 at 05:59):
Chris Moesel said:
If by "derived profiles" you mean profiles based on other profiles, then yes, FSH supports that -- you just declare the base profile as the "Parent". If you mean something else, please clarify and I'll try to answer!
Yes, that's exactly what I mean. Basically, I want to create a Patient profile based on the AU Base Patient. What is the syntax for declaring the base profile as the parent? I would think that the URL of the base profile should be used, right? i.e. Parent: http://hl7.org.au/fhir/StructureDefinition/au-patient
but I am getting an error: "Parent: http://hl7.org.au/fhir/StructureDefinition/au-patient" not found
Jean Duteau (Oct 02 2020 at 06:28):
Have you declared a dependency on the AU profiles in your config?
Ronald Dendere (Oct 02 2020 at 07:49):
Jean Duteau said:
Have you declared a dependency on the AU profiles in your config?
That was the problem! Thanks Jean. All good now.
Diana_Ovelgoenne (Oct 16 2020 at 14:31):
Hi, I am doing that and I am not getting any compilation errors, but my output folder remains empty after running the IG publisher. I remove the child profile and then all works fine. Any tips on what I am doing wrong?
Diana_Ovelgoenne (Oct 19 2020 at 13:00):
Seems that this is happening when trying to add any Valueset or a Code System
Chris Moesel (Oct 19 2020 at 13:08):
@Diana_Ovelgoenne -- is your IG source code available locally? Or can you send some example we can use to try to reproduce this problem?
Patrick Ryan (Feb 22 2022 at 21:40):
Hi - can anyone point me to a reference for sushi-config.yaml?
David Pyke (Feb 22 2022 at 21:43):
https://fshschool.org/docs/sushi/configuration/
John Silva (Feb 22 2022 at 22:17):
@Patrick Ryan - FYI: the Sushi owners/experts live on the #shorthand channel.
Marco Wedekind (Mar 09 2022 at 11:21):
Hi SUSHI experts,
I am trying to get the fsh tutorial to run, but have difficulty to have SUSHI download the dependencies.
When running SUSHI
sushi .
in one of the tutorials, I am getting:
Failed to load hl7.fhir.r4.core#4.0.1: The package hl7.fhir.r4.core#4.0.1 could not be loaded locally or from the FHIR package registry.
I did verify that the proxy should be working. I did set http_proxy and https_proxy correctly. When unsetting these variables, npm for example cannot find its repositories and throws an error accordingly.
Any ideas? Especially: what is the package registry for SUSHI? registry.fhir.org? And where do I find the local cache for SUSHI? Unfortunately the SUSHI docs do not mention any of these.
Cheers
Marco
Mareike Przysucha (Mar 09 2022 at 11:22):
Hi Marco, there is a dedicated stream about #shorthand.
Ward Weistra (Mar 09 2022 at 13:41):
@Marco Wedekind AFAIK sushi uses registry.fhir.org as primary package registry and it most definitely includes that one :smile:
This has where your local FHIR package cache generally lives: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache
Marco Wedekind (Mar 10 2022 at 08:14):
@Ward Weistra Cool, I will try to manually download and extract the dependencies as outlined in the docs you have referenced. Let's see if that's a work-around...
Ward Weistra (Mar 10 2022 at 08:16):
@Marco Wedekind You can use Firely Terminal as an alternative to install the packages to your FHIR cache: https://simplifier.net/downloads/firely-terminal
Marco Wedekind (Mar 10 2022 at 11:31):
Ok, I got the firely terminal installed and used it to install the packages that SUSHI could not install. Alas, firely terminal is installing the packages into a different directory:
~/.local/share/.fhir/packages
Whereas SUSHI expects the packages in
~/.fhir/packages
Copying over the package to the directory, where SUSHI is expecting the packages, works around the problem.
I would much more prefer for SUSHI to be able to install dependencies itself. Or provide configuration options in case of proxies or different package folders. I got it working but it is way too awkward :grimacing:
I will try to open a ticket with SUSHI.
Alexander Zautke (Mar 10 2022 at 11:40):
@Marco Wedekind This issue should have been fixed in one of the last beta versions of Firely.Terminal. I would recommend using the latest available version.
Marco Wedekind (Mar 10 2022 at 11:52):
@Alexander Zautke Thanks for pointing that out, Alex. Sure it would remove an unneccessary copy, but I still regard it as an unneeded work-around. SUSHI should always be able to fetch dependencies itself.
Marco Wedekind (Mar 10 2022 at 11:53):
I have opened a ticket for SUSHI here: https://github.com/FHIR/sushi/issues/1045
Gino Canessa (Mar 10 2022 at 15:57):
Ward Weistra said:
Marco Wedekind AFAIK sushi uses registry.fhir.org as primary package registry and it most definitely includes that one :)
This has where your local FHIR package cache generally lives: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache
As an interesting note, that page does not include information about:
packages.ini
(file that core tooling uses to index)- non-version number literals (e.g.,
current
,dev
)
I could take a stab at updating the page, but it would be my (possibly incorrect) understanding of those items.
Ward Weistra (Mar 10 2022 at 16:46):
@Gino Canessa That page is only about the package cache. There's a bit more in https://confluence.hl7.org/display/FHIR/NPM+Package+Specification, and a package registry documentation at https://confluence.hl7.org/display/FHIR/FHIR+Package+Registry+User+Documentation.
But packages.ini
and currently current
and dev
are not (yet) part of the FHIR package spec, but more IG Publisher specific input files and conventions.
Gino Canessa (Mar 10 2022 at 19:51):
Thanks Ward! But I would argue that artifacts used by the current version of software should be included, even if they are not 'officially' part of the spec.
The local package cache has a packages.ini
file that at least some tooling uses to manage the local package cache. I have not looked through the code to see how synchronization is handled in that tooling, but I have to imagine it serves a purpose ;-).
Similarly, if you look in that directory you can find directives such as hl7.fhir.r4b.core#current
, which are not described. If the cache is meant to be used by different developers then it needs to be consistently implementable.
Grahame Grieve (Mar 10 2022 at 19:55):
packages.ini is just a cache. If you delete it, it'll be rebuilt
Grahame Grieve (Mar 10 2022 at 19:56):
dev and current are documented elsewhere. dev will never exist, but current does. It's just the version - how does that matter to the NPM package spec?
Gino Canessa (Mar 10 2022 at 19:59):
Yep on packages.ini - I even have implemented support for it myself. My point is that if all devs start adding undocumented files into the cache, we soon have conflicts, etc.
The confluence page of FHIR Package Cache is the page I was referring to - I do not see anything specific about the NPM package spec, just the information about the FHIR cache directory.
Gino Canessa (Mar 18 2022 at 16:54):
As a note on this file - the tooling defaults to 'wipe the cache' on any sort of issue (which makes sense, it's a local cache). But, builds were wiping my cache on each run, and everything looked right. So, I started digging my way through the source in two repos (Kindling and eventually .org.hl7.fhir.core).
Turns out the file requires \r\n
for newlines on all OSes, I my generic ini
code was defaulting to \n
on Windows. sigh (noting here so that it's Zulip-searchable)
Last updated: Apr 12 2022 at 19:14 UTC