FHIR Chat · ig-data in fshOnly · shorthand

Stream: shorthand

Topic: ig-data in fshOnly


view this post on Zulip ryan moehrke (Oct 13 2020 at 17:49):

So I use fsh and sushi in order to create mocked up structure definitions in order to test against and then to confirm different validation outputs. Recently I needed to test an explicitly faulty profile. From what I tried though I was (probably properly) kept from recreating this invalid profile through sushi, so instead I edited a full .json structure definition in order to suit my needs.

My question though, is I have vaguely seen that I can use an ig-data folder in order to pull a .json structure definition into my sushi-created folder of structure definitions. Does that not work with fshOnly? or is there some other nuance I didn't figure out?

I have it in fsh/ig-data/input/profiles/
and am running "sushi fsh -s -o TMP-TestResources" from one folder above the fsh folder
if there was anything else I needed to add to say the yaml file I for sure don't have that

view this post on Zulip Jose Costa Teixeira (Oct 13 2020 at 17:52):

which version of sushi?

view this post on Zulip Chris Moesel (Oct 13 2020 at 18:19):

Hi @ryan moehrke -- as @Jose Costa Teixeira implied above, the answer will depend on if you're using SUSHI 0.x or SUSHI 1.0 Beta.

In SUSHI 0.16.x, you can put BYOJ (Bring Your Own JSON) profiles in fsh/ig-data/input/profiles and SUSHI will consider them as it processes the FSH definitions (which may reference the BYOJ profiles). In FSHOnly mode, however, it will not copy them to the output folder (as FSHOnly produces only the FSH-defined resources).

In SUSHI 1.0 Beta, we no longer use ig-data. We've streamlined project structure to a single approach. Using the SUSHI 1.0 approach, your BYOJ profiles should go in input/profiles (or input/resources). BUT... in this case, SUSHI still does not copy the files to the output folder; it leaves them in place (regardless of FSHOnly mode). That is because they already are where the IG Publisher expects them. If you wanted SUSHI-generated files and user-provided (BYOJ) files in the same folder, you would need to create a script to copy the files from input/* as needed.

view this post on Zulip ryan moehrke (Oct 13 2020 at 18:45):

well that sucks, Im currently on 0.16.0 but sounds like neither of the versions will play the way I want them to :/


Last updated: Apr 12 2022 at 19:14 UTC