FHIR Chat · setting base url · shorthand

Stream: shorthand

Topic: setting base url


view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 20:39):

why am i getting this message?
Unable to locate the profile "undefined/undefined/StructureDefinition/be-patient" in order to validate against it

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 20:42):

@Chris Moesel ? Am i missing something?

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:24):

Uh... I don't know. I haven't seen that before. Is that coming from the IG Publisher? It doesn't look like a SUSHI message. Did this work correctly with SUSHI 0.10.0 and is now not working with SUSHI 0.11.1? Or is it not necessarily related to the latest SUSHI release?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:26):

perhaps this was there before... but this is an error message from the Publisher, but due to the fact that sushi populates my profiles with

{
  "resourceType": "StructureDefinition",
  "id": "be-careplan",
  "url": "undefined/StructureDefinition/be-careplan",
...

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:31):

what can i do to fix this?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:31):

(couldn't find it in the docs)

view this post on Zulip Pétur Valdimarsson (Mar 27 2020 at 21:33):

Jose Costa Teixeira said:

what can i do to fix this?

How does your ig-data/package.json look?

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:33):

Do you have a package.json in your FSH folder with the canonical set to your package's canonical URL?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:35):

right, no i didn't

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:35):

thanks

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:36):

so i need 2 package.json files? one inside fsh and one for the publisher?

view this post on Zulip Pétur Valdimarsson (Mar 27 2020 at 21:37):

Just one package.json for sushi and one ig.ini for the publisher...I think. Been a little while since I set up my last project

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:37):

You should only need the one for FSH, which will get re-exported to the output (so then the publisher will use that one).

view this post on Zulip Pétur Valdimarsson (Mar 27 2020 at 21:37):

Screenshot-2020-03-27-at-22.37.26.png

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:42):

Chris Moesel said:

You should only need the one for FSH, which will get re-exported to the output (so then the publisher will use that one).

yes, but if my sushi is driven by my publisher should I not have it in my folder above fsh?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:43):

same for the ini file. I have one on my parent folder, so it's not intuitive that I have to change the one from ./fsh/ig-data, and not the one from the main folder..

view this post on Zulip Pétur Valdimarsson (Mar 27 2020 at 21:46):

Since I started using fsh as the main authoring language, I have moved away from the previous publisher-specific files and rely on what sushi generates. Works quite well.

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:47):

yes, but if my sushi is driven by my publisher should I not have it in my folder above fsh?

I think that's one of the things being sorted out. This integration came up kind of by surprise -- so right now it's based on how SUSHI currently works -- and SUSHI expects that it's package.json file is in the root folder passed to SUSHI -- which now is the ./fsh subfolder. So SUSHI wouldn't know to look up a folder.

I thought the way the integration was going to work was the publisher runs SUSHI as its first step -- which would then put the package.json, ig.ini, and everything else in the proper place for the publisher to then run as normal. But it seems like maybe the publisher is (or was) looking for some of those files prior to running SUSHI. It's a bit of a chicken and egg problem right now.

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:47):

doesn't seem hard now that things are working.

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:48):

can sushi not check for an ini file in the output folder and use that one before using the one from ig-data?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:48):

that would fix the issue, right?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:49):

since when using the publisher, the output folder is above fsh, not below

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:50):

(sorry for cross-posting, but in this stream i leave my technical suggestion for sushi to the best of my understanding. on the IG creation stream i am asking for a common approach)

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:51):

can sushi not check for an ini file in the output folder and use that one before using the one from ig-data?

That could result in some pretty unexpected behavior. If someone is using a normal FSH project and runs SUSHI, it will generate an ig.ini file to the output folder (say, ./build). Now imagine they edit the ig.ini in the FSH source and run SUSHI again -- if SUSHI chose the old ig.ini in the output folder over the ig.ini in the FSH source, then the intended changes are ignored. The only way the author could force the changes would be to delete the output folder before every build.

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:53):

We just need SUSHI to have a special mode for when it's being run in the context of the IG Publisher. This is something we will work to iron out.

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:54):

But in that mode, yes, it probably makes sense to use the project.json and potentially other files from the root folder. And in fact, potentially the ig-data folder would go away entirely. We'd need to think about the implications and try to design it out properly.

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:54):

Chris Moesel said:

can sushi not check for an ini file in the output folder and use that one before using the one from ig-data?

That could result in some pretty unexpected behavior. If someone is using a normal FSH project and runs SUSHI, it will generate an ig.ini file to the output folder (say, ./build). Now imagine they edit the ig.ini in the FSH source and run SUSHI again -- if SUSHI chose the old ig.ini in the output folder over the ig.ini in the FSH source, then the intended changes are ignored. The only way the author could force the changes would be to delete the output folder before every build.

true

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:55):

can sushi not detect if it is running inside the publisher, and in that case check for an ini file in the output folder and use that one before using the one from ig-data?

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:56):

Whatever solution I think we should make sure both sets of tools work autonomously as well as when integrated, so that people don't have to be forced to an option

view this post on Zulip Chris Moesel (Mar 27 2020 at 21:57):

The one thing I don't like about having FSH source in a sub-folder and outputting to its parent folder, especially if there is other source in the parent folder, is that now the parent folder is a complex mix of source files, generated files, and temporary files. Doing a truly clean build will be very challenging as you need to delete the generated and temporary files using a scalpel. The way it was before, with a dedicated build subfolder for output made clean builds simple -- just delete the build folder. We're losing that now.

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 21:57):

Chris Moesel said:

We just need SUSHI to have a special mode for when it's being run in the context of the IG Publisher. This is something we will work to iron out.

ah, the Chirashi from my diagram yesterday :) Yes, we need that in any case

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 22:00):

Chris Moesel said:

The one thing I don't like about having FSH source in a sub-folder and outputting to its parent folder, especially if there is other source in the parent folder, is that now the parent folder is a complex mix of source files, generated files, and temporary files.

I agree fully, but well, that is not surprising ( i remember discussions about a folder structure)
both tools have the other tool's content in children folders...

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 22:02):

Chris Moesel said:

The way it was before, with a dedicated build subfolder for output made clean builds simple -- just delete the build folder. We're losing that now.

that can be fixed. We can for example have sushi produce output in another folder (say "input2") and have the template or IG merge the folders before publishing.

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 22:02):

(sorry, it's a very raw idea - you can think of better)

view this post on Zulip Jose Costa Teixeira (Mar 27 2020 at 22:08):

Pétur Valdimarsson said:

Since I started using fsh as the main authoring language, I have moved away from the previous publisher-specific files and rely on what sushi generates. Works quite well.

it's my main language for examples, but it is not my main language for other things. And I still need to tweak the publisher specific stuff, so I agree it is an option but it cannot be my only option now

view this post on Zulip Pétur Valdimarsson (Mar 27 2020 at 22:09):

I understand completely


Last updated: Apr 12 2022 at 19:14 UTC