Stream: shorthand
Topic: sushi cooperating on implementationGuide
John Moehrke (Jul 10 2020 at 14:56):
So, how do I manage my implementationGuide (xml), while having sushi add the conformance resources that it created from my FSH tank?
John Moehrke (Jul 10 2020 at 14:57):
I prefer XML for my managed files, but could switch to json if I must. However I am still not clear how the cooperation is intended to be done.
Chris Moesel (Jul 10 2020 at 15:17):
The current SUSHI approach is that if you want SUSHI to populate your IG resource, you must let SUSHI create the whole IG resource -- it cannot merge data into an existing (hand-edited) IG resource. The good news is that the new config.yaml
file allows you to control all the fields in ImplementationGuide
now -- so you _could_ update your config.yaml
to reflect all of the specific values in your current IG.xml -- then SUSHI will export an IG.json with your specific values and the SUSHI-generated data.
John Moehrke (Jul 10 2020 at 15:18):
ah, okay. that is the dance... let me look at that.
Chris Moesel (Jul 10 2020 at 15:21):
But if the only thing you need is for resources to be listed, you could try using the IG Publisher's autoload-resources
parameter (which is documented here) in your hand-edited IG.xml file. In that case, you would want to add a FSHOnly: true
property to your config.yaml
so SUSHI doesn't generate a new IG.json for you. Note that this also means SUSHI won't manage anything else for you (pages, etc). You'll just get the resources and examples only.
Chris Moesel (Jul 10 2020 at 15:25):
Yeah, I think I misunderstood your question the first time. I think you're simply looking for FSHOnly: true
then. You don't need to mirror your whole IG.xml to config.yaml if you do not want to. If you're willing (or wanting) to entirely manage the IG.xml yourself, then FSHOnly: true
is the answer.
John Moehrke (Jul 10 2020 at 15:30):
that surely seems right for this project.
John Moehrke (Jul 10 2020 at 15:30):
trying that
Jose Costa Teixeira (Jul 10 2020 at 15:38):
This is the same thing I raised before (and actually the same minor issue with FSHOnly).
John Moehrke (Jul 10 2020 at 15:40):
I expected we might be converging on similar solutions.
Jose Costa Teixeira (Jul 10 2020 at 15:55):
Not sure. When the issue with FSHOnly is fixed, we can add a fsh folder to the standard template(s). It will be easier to see things once that happens
Chris Moesel (Jul 10 2020 at 16:15):
When the issue with FSHOnly is fixed
Chris Moesel (Jul 10 2020 at 16:16):
By that you mean that it requires some fields in config.yaml
that actually should not be required?
Chris Moesel (Jul 10 2020 at 16:16):
Or are you referring to something else?
John Moehrke (Jul 10 2020 at 16:17):
note that the warnings sushi spits out are not well aligned. I got conflicting warnings until I zeroed in on my current config.yaml
John Moehrke (Jul 10 2020 at 16:17):
id: ihe.mhd.fhir
canonical: http://ihe.net/fhir/ihe.mhd.fhir
name: ihe.mhd.fhir
version: 0.1.0
fhirVersion: 4.0.1
status: active
FSHOnly: true
Jose Costa Teixeira (Jul 10 2020 at 16:30):
Chris Moesel said:
By that you mean that it requires some fields in
config.yaml
that actually should not be required?
yes, the fields that are not needed should not cause sushi to stop if FSHOnly is true
Keith Boone (Jul 21 2020 at 13:43):
Thanks to @Sean McIlvenna there's a tool to convert between XML and JSON in JavaScript at https://github.com/lantanagroup/fhir.js. That might be very useful to developers (e.g., @Chris Moesel ) of Sushi.
Chris Moesel (Jul 21 2020 at 13:58):
Keith Boone said:
Thanks to Sean McIlvenna there's a tool to convert between XML and JSON in JavaScript at https://github.com/lantanagroup/fhir.js. That might be very useful to developers (e.g., Chris Moesel ) of Sushi.
Yes, indeed. Merged six days ago! https://github.com/FHIR/sushi/pull/510
Last updated: Apr 12 2022 at 19:14 UTC