FHIR Chat · Local FHIR cache? · shorthand

Stream: shorthand

Topic: Local FHIR cache?


view this post on Zulip Håkan MacLean (Dec 20 2021 at 16:26):

Hi! I'm trying to run SUSHI where I create a profile using FSH that is based on another custom profile to which I have the JSON file. I'm reading the docs and it mentions something about a "local FHIR cache", where I'm suspecting I'm supposed to be able to put dependencies, but the docs aren't very exhaustive on this. Is there any more info on this topic somewhere? Where is this cache located? How does it work? What kinds of files does it accept?

view this post on Zulip Chris Moesel (Dec 20 2021 at 20:21):

Hi @Håkan MacLean. The answer to your question depends on where your custom profile comes from and where it should go.

If your custom profile comes from another IG / package, then you should declare that package as a dependency of your SUSHI project. When you do that, SUSHI will download the dependency package and should be able to find the custom profile in it.

If your custom profile does not belong to another package, then you need to include it in your IG. If you drop it into one of the supported resource folders in your project (like input/resources), then SUSHI will pick it up and you should be able to reference it.

view this post on Zulip Håkan MacLean (Dec 20 2021 at 20:37):

Thanks for taking the time to reply!

When you do that, SUSHI will download the dependency package and should be able to find the custom profile in it.

So if I only have a local package that is not downloadable via its canonical URL, where do I place it so that SUSHI finds it?

If you drop it into one of the supported resource folders in your project (like input/resources), then SUSHI will pick it up and you should be able to reference it.

Where can I read more about these "supported resource folders"? Apart from input/fsh I didn't see much in the docs, but perhaps I'm reading in the wrong place?

Update: I did find a link to this page, where I found the answers to some of my questions.

view this post on Zulip Chris Moesel (Dec 20 2021 at 21:08):

Regarding your first question. If you have locally built the package w/ the profile you want (using the IG Publisher), then the IG Publisher will put it into your FHIR cache for you. To specify the local package as a dependency, you use version dev when specifying the dependency in your projects sushi-config.yaml. E.g:

dependencies:
  my.local.dependency.package.id: dev

If you have not build it locally and you just need to get it into your local FHIR cache, you can find your local FHIR cache inside your user's home directory (which differs based on OS), in a folder called .fhir. If you look at that you can probably get a feel for how the packages are structured. It may be documented somewhere, but if so, I'm not sure where.


Last updated: Apr 12 2022 at 19:14 UTC