FHIR Chat · Same profile defined in FSH *and* JSON: Error or Warning? · shorthand

Stream: shorthand

Topic: Same profile defined in FSH *and* JSON: Error or Warning?


view this post on Zulip Chris Moesel (Oct 15 2020 at 15:16):

Here is a bug that we're currently addressing in the beta: If you define MyFooProfile using FHIR Shorthand in input/fsh/profiles.fsh and you define MyFooProfile using a standard StructureDefinition in input/profiles/StructureDefinition-MyFooProfile.json, SUSHI 1.0.0 Beta 1 generates the FSH definition -- which becomes a duplicate resource definition when you run the IG Publisher.

We're changing the behavior so that the JSON definition (in input/profiles) is preferred and the FSH definition is ignored. We know we should notify the user that this is happening. The question is, should it be a WARNING or an ERROR? When SUSHI is run by the IG Publisher, an ERROR aborts the process, but a WARNING allows it to keep running.

If it were considered an ERROR, authors would need to either comment out their FSH definition or delete the JSON definition. If it were a WARNING, authors wouldn't need to do anything and might even miss the fact that they have a duplicate. We're leaning toward making it an ERROR, but current SUSHI 0.x behavior treats it as a warning -- so we're looking for feedback. @Jose Costa Teixeira and @Jean Duteau -- I think this is a feature both of you have expressed interest in, so interested in hearing from you.

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:19):

I was happy with a warning.
One reason : sometimes I want to create an FSH, then this creates the json, and then I change the json manually, and i don't worry anymore.

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:20):

As I think of this, the main reason is that it saves me the immense task of typing a couple of /* and //.

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:20):

so, I don't know if there is a reason to have it as warning.

view this post on Zulip Jean Duteau (Oct 15 2020 at 15:20):

Oh my no, I would never do this. I shudder when I read why Jose wants this. :). Either use FSH for your definition or use a standard StructureDefinition, but never mix them. What is the point of creating it in FSH in the first place? So count me out on having an opinion on this. :)

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:21):

But this would only work well if the search is done by ID, not filename

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:23):

Now I have to look up a new verb to understand what you mean @Jean Duteau :)

view this post on Zulip Nick Freiter (Oct 15 2020 at 15:24):

If having this as an ERROR and adding comments is an OK solution for you @Jose Costa Teixeira , I think there are some advantages to having it be an ERROR. Mainly, if someone accidentally left some JSON in input/profiles, and it was overwriting their FSH definitions with only a WARNING, it may be easier for them to miss that WARNING than if it was an ERROR.

view this post on Zulip May Terry (Oct 15 2020 at 15:24):

FWIW, I'm currently contributing to the CG Reporting IG migration to FSH and I find a SUSHI ERROR for duplicate profiles being more helpful.

view this post on Zulip Chris Moesel (Oct 15 2020 at 15:25):

The search is actually done by URL. We determine what the URL would be of the FSH definition (via a ^url rule if it exists, or calculating it using the IG canonical base ) and compare to the URL in the SD.

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:26):

those should not be mixed, indeed. I had them mixed temporarily because a man can be lazy, right?

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:27):

as i mentioned, nobody ever said fortune is for the lazy

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:28):

I agree with error

view this post on Zulip Chris Moesel (Oct 15 2020 at 15:29):

OK. It's sounding like all of us (so far) are at least comfortable with an error -- so that is probably the way we'll go on this. @Jean Duteau -- the main use case I personally think of for using this feature is if there is a bug in SUSHI that produces an incorrect SD that you temporarily need to override. Or if there is some gap in the FHIR Shorthand language that makes it impossible (or at least really difficult) to do some edge case thing.

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:30):

like translations?

view this post on Zulip Jose Costa Teixeira (Oct 15 2020 at 15:30):

:)

view this post on Zulip Elliot Silver (Oct 19 2020 at 03:58):

Jose Costa Teixeira said:

like translations?

Out of curiosity, what is the current state of support for translating IGs? Is fully supported in the IG resource? In the publisher? in fsh/sushi?

view this post on Zulip Jose Costa Teixeira (Oct 19 2020 at 11:12):

I pointed to the other stream - in this one I meant the multi-language elements, of which I recall there are are 2:

  • inside a codesystem, multiple language displays
  • for all other stuff, use the standard extension

Last updated: Apr 12 2022 at 19:14 UTC