FHIR Chat · Examples location · shorthand

Stream: shorthand

Topic: Examples location


view this post on Zulip Jose Costa Teixeira (May 04 2020 at 10:14):

I have my example instances not in input\examples but in in sub-folders e.g. input\examples\patient, ...
(my content is not organized by base resource name, but by profile name - so if I have a Practitioner profile for physicians and another for nurses, i would have input\examples\physicians, input\examples\nurses)

view this post on Zulip Jose Costa Teixeira (May 04 2020 at 10:17):

while this helps me, others may have a different approach - the problem is that after i move the examples, sushi will them again in the examples folder.

view this post on Zulip Jose Costa Teixeira (May 04 2020 at 10:19):

any way to handle this (besides moving my files out of the fsh folder of I don't want them generated again?)

view this post on Zulip Nick Freiter (May 04 2020 at 12:08):

So was your approach to first generate the example Instances into the input/examples folder using SUSHI, and then manually sort that folder into input/examples/patient, input/examples/nurses, and so on. But then if you re-run SUSHI, the example Instances are all added again to the top level of the input/examples folder?

If I'm understanding the problem correctly, then unfortunately no there isn't really a better way to handle this. There is no way in SUSHI to specify where an example Instance should go, they are just output to the input/examples folder. If it's something enough people are feeling the need for, we can look into adding it/how it would work.

view this post on Zulip Jose Costa Teixeira (May 04 2020 at 12:48):

I actually started without sushi, then added sushi for example generation. So I already had some examples there, and I use sushi to add many more.

view this post on Zulip Jose Costa Teixeira (May 04 2020 at 12:48):

so it's kind of what you said, but the first step was not sushi

view this post on Zulip Jose Costa Teixeira (May 04 2020 at 12:49):

So was your approach to first generate the example Instances into the input/examples folder using SUSHI, and then manually sort that folder into input/examples/patient, input/examples/nurses, and so on. But then if you re-run SUSHI, the example Instances are all added again to the top level of the input/examples folder?

yes, I did that but the first step was done manually. And i wanted to see if I had some control over which files are created

view this post on Zulip Nick Freiter (May 04 2020 at 13:12):

Gotcha, I think my answer from above still applies though. There isn't really a way to control which folders files are generated into. If you want to prevent instances from being generated, the easiest way may be to just comment them out or remove the fsh files until you want to generate them again.

view this post on Zulip Etienne Cantineau (May 04 2020 at 14:20):

Edit: wrong post

view this post on Zulip Jose Costa Teixeira (May 04 2020 at 14:27):

that actually gave me an idea:
would it be an interesting feature for sushi to have a .ignore file? ( a .include could also work but a .ignore is better for the 80% of people who will not use it)


Last updated: Apr 12 2022 at 19:14 UTC