FHIR Chat · Profiles Versioning · IG creation

Stream: IG creation

Topic: Profiles Versioning


view this post on Zulip Diana_Ovelgoenne (Jan 20 2022 at 15:33):

I always have seen that the version of the IG gets propagated to the version of the individual profiles. However from the structure definition it is saying that the version should be a timestamp or something arbitrary given manually.
I would like to read your insights on best practice, shall the profile version match the one of the IG, yes or no and why?
Thanks :smile:

view this post on Zulip John Moehrke (Jan 20 2022 at 16:04):

my opinion: there are good reasons to have an individual artifact having a specific version, but if you have no good reason then replicating the IG version in the artifact is a reasonable practice. (Note early IGs will tend to just peg them all together, but once you get high in the maturity it is best to revise only what is necessary to revise. Thus a reader can know that you just updated the IG because of a specific change so that they can determine how they react)... so it is a maturity thing more than anything.

view this post on Zulip Elliot Silver (Jan 20 2022 at 18:00):

By default, the publisher applies the IG version to all resources, unless you use the parameter apply-version=false. And if you do that, you need to make sure you give everything a version yourself. (Personally, I’d like an apply-version=if-missing option.)

view this post on Zulip Jose Costa Teixeira (Jan 20 2022 at 18:05):

Elliot Silver said:

(Personally, I’d like an apply-version=if-missing option.)

I think this makes sense and it would be handy. Should apply-version override explicit versions?

view this post on Zulip Elliot Silver (Jan 20 2022 at 18:11):

All the apply-* currently override. It makes sense to me to only apply if missing, but that would break existing behaviour.

view this post on Zulip John Moehrke (Jan 20 2022 at 18:13):

so it would be nice to have a new code added to "apply-version". Rather than just true/false... "maybe"?

view this post on Zulip Jean Duteau (Jan 20 2022 at 18:15):

apply-version = "fix it if I made a mistake"

view this post on Zulip John Moehrke (Jan 20 2022 at 18:17):

ah, leverage the clairvoyance of the IG publisher... good plan.

view this post on Zulip Jose Costa Teixeira (Jan 20 2022 at 19:03):

@Elliot Silver that is my question: should we look into changing the behaviour of the parameter? Or it's best to propose a new parameter and let the discussion flow from there?

view this post on Zulip Elliot Silver (Jan 20 2022 at 19:20):

I think it's worth proposing a change, but my expectation is that is a new value for the parameters of "if-absent" is a safer option than changing the meaning of "true"

view this post on Zulip Lloyd McKenzie (Jan 20 2022 at 20:13):

Worth adding a tracker item to the publisher

view this post on Zulip Elliot Silver (Jan 20 2022 at 22:44):

https://github.com/HL7/fhir-ig-publisher/issues/377

view this post on Zulip Diana_Ovelgoenne (Feb 14 2022 at 13:42):

Elliot Silver said:

By default, the publisher applies the IG version to all resources, unless you use the parameter apply-version=false. And if you do that, you need to make sure you give everything a version yourself. (Personally, I’d like an apply-version=if-missing option.)

do I put the parameter at the igi.ini or where exactly? I've done some experiments but still the version taken is the one of the IG and not the profile's. thanks!

view this post on Zulip Elliot Silver (Feb 14 2022 at 18:20):

The parameter is in your IG resource, at definition.parameter. Take a look at https://github.com/ElliotSilver/ca-baseline/blob/master/input/cabaseline.xml and you'll see a few other parameters (copyrightyear, etc.) although this one doesn't have apply-version in it.

view this post on Zulip Chris Moesel (Feb 14 2022 at 19:15):

So... I'm tracking this and wondering if SUSHI is too "helpful" here or if it's maybe doing what people want...

If you manually set ^version on a profile, SUSHI uses that version, but if you don't then SUSHI automatically applies the IG version when it generates the profile. So you always get the "use-the-IG-version-unless-I-specify-something-else" behavior in SUSHI. But this also means it's impossible to generate a profile w/ no version in SUSHI (i.e., version always has some value in SUSHI-generated profiles).

view this post on Zulip Lloyd McKenzie (Feb 14 2022 at 21:41):

It's probably best if the "auto-version-stamping" is left to the publisher (same with auto-population of publisher, date, etc.)

view this post on Zulip Chris Moesel (Feb 14 2022 at 22:57):

Thanks, @Lloyd McKenzie. I've filed this as SUSHI #1022.

view this post on Zulip Diana_Ovelgoenne (Feb 15 2022 at 07:39):

Chris Moesel said:

So... I'm tracking this and wondering if SUSHI is too "helpful" here or if it's maybe doing what people want...

If you manually set ^version on a profile, SUSHI uses that version, but if you don't then SUSHI automatically applies the IG version when it generates the profile. So you always get the "use-the-IG-version-unless-I-specify-something-else" behavior in SUSHI. But this also means it's impossible to generate a profile w/ no version in SUSHI (i.e., version always has some value in SUSHI-generated profiles).

I am using SUSHI and the ^version isn't getting applied, but the one from the IG.

@Elliot Silver Ig publisher is running together with sushi so i don't have control on the content of the IG resource, this would be created every time I do a _genonce, so when do I write the parameter in? I don't think it helps to change afterwards.
@Chris Moesel I still believe it would be good to define it from the sushi side as that is where we have more control of what we want to do with our IG. I saw that the Structure Definitions fsh-generated by SUSHI contain the Profile Version, but this gets lost when running the ig publisher

view this post on Zulip Chris Moesel (Feb 15 2022 at 13:59):

Hi @Diana_Ovelgoenne -- I think SUSHI is writing in the version you specified in ^version (example), but I suspect the IG Publisher is then overwriting it.

You can set IG parameters in your sushi-config.yaml file. For example:

parameters:
  apply-version: false

When I added the parameter as above, the version I specified using ^version came through correctly after publishing.

For future reference, all of the available properties in sushi-config.yaml are documented here: https://fshschool.org/docs/sushi/configuration/#full-configuration

view this post on Zulip Diana_Ovelgoenne (Feb 15 2022 at 14:08):

Thanks @Chris Moesel it worked :smile:

view this post on Zulip Notification Bot (Feb 15 2022 at 14:08):

Diana_Ovelgoenne has marked this topic as resolved.

view this post on Zulip Notification Bot (Feb 15 2022 at 15:32):

Lloyd McKenzie has marked this topic as unresolved.

view this post on Zulip Lloyd McKenzie (Feb 15 2022 at 15:32):

Note that not applying version to everything is risky. It means that you have to track everything that changes and manually update the versions of things and update versioned references.


Last updated: Apr 12 2022 at 19:14 UTC