FHIR Chat · Canonical of the IG itself? · shorthand

Stream: shorthand

Topic: Canonical of the IG itself?


view this post on Zulip Jean Duteau (Nov 22 2021 at 22:10):

Is there a way to specify the Canonical of the IG itself? I'm using this in the CapabilityStatement and would like to say:
*implementationGuide = Canonical(XXX) where XXX is however I would refer to the IG in general.

view this post on Zulip Chris Moesel (Nov 22 2021 at 22:19):

Oooh. No. There is not. It's an interesting idea.

Maybe * implementationGuide = Canonical(my.package.id)? That's at least kind of consistent since we allow ids to be used inside Canonical() - and it is the id of the IG resource we generate. According to that logic, I supposed you should also be able to use * implementationGuide = Canonical(MyNameFromSushiConfigYaml) since that goes into ImplementationGuide.name and we also support lookups by name.

As I said, we don't support that yet, but does that seem a reasonable approach, @Jean Duteau?

view this post on Zulip Jean Duteau (Nov 22 2021 at 22:20):

i already tried the id one in case you supported that, so that seems like a good option. the name from the config would also work.

view this post on Zulip Chris Moesel (Nov 22 2021 at 22:22):

And to be clear, that would resolve to the canonical of the IG resource itself (e.g., http://my.example.org/ImplementationGuide/my.package.id), right? Not the canonical root of the IG.

view this post on Zulip Jean Duteau (Nov 22 2021 at 22:25):

yes, to the canonical of the IG resource itself

view this post on Zulip Elliot Silver (Nov 22 2021 at 22:27):

The issue is that the IG resource is generated from sushi.yaml, and thus there isn't an actual IG resource to specify the canonical in?

view this post on Zulip Chris Moesel (Nov 22 2021 at 22:29):

Sort of. The issue is that at the time SUSHI runs, there isn't an actual IG resource to lookup by id and pull the canonical URL from (which is how SUSHI generally handles Canonical for resources -- with a few chicken-and-egg type caveats).

view this post on Zulip Chris Moesel (Nov 22 2021 at 22:31):

SUSHI#963

view this post on Zulip Elliot Silver (Nov 22 2021 at 22:34):

Can you look into the sushi.yaml for a url: value and add that to the canonical lookup table early? I'm not sure I entirely like an autogenerated canonical.

view this post on Zulip Chris Moesel (Nov 22 2021 at 22:38):

Well... you specify canonical in sushi-config.yaml to establish the root canonical. Then, by definition, I think that the IG canonical must be ${rootCanonical}/ImplementationGuide/${packageId}. Or is it the case that custom IG URLs are allowed to go outside of that pattern?

view this post on Zulip Elliot Silver (Nov 22 2021 at 22:40):

If it is fixed to that, then I'm ok. But if it isn't I'd rather not force a canonical.

view this post on Zulip Chris Moesel (Nov 22 2021 at 22:41):

I have to sign off for the day, but I'll try to confirm.

view this post on Zulip Chris Moesel (Nov 23 2021 at 19:04):

I've experimented a bit and found that the ImplementationGuide.url must end with /ImplementationGuide/${packageId}. If it doesn't match that at the end, then the IG Publisher reports errors in QA. The first part of the URL, however, can be anything and it seems it does not have to correlate w/ the canonical root of any other resources in the IG. But... I think best practice is for them to line up.

view this post on Zulip Jose Costa Teixeira (Nov 27 2021 at 07:02):

I don't think it needs to be ending with ImplementationGuide/${packageId} but ImplementationGuide/${Ig_Id}

view this post on Zulip Jose Costa Teixeira (Nov 27 2021 at 07:02):

@Chris Moesel do you want to confirm?

view this post on Zulip Chris Moesel (Nov 28 2021 at 02:14):

@Jose Costa Teixeira - I may have used those two things interchangeably. Are there cases where the package id is not the same as the IG id? I think I assumed they are meant to match.

view this post on Zulip Chris Moesel (Nov 28 2021 at 02:16):

But yeah, you’re right - in my experimentation, it was actually the IG id that I was using.

view this post on Zulip Chris Moesel (Feb 25 2022 at 22:30):

@Jean Duteau - As of the latest SUSHI 2.3.0 release, you should now be able to use Canonical(package-id) to refer to the IG URL. Thanks for the idea!


Last updated: Apr 12 2022 at 19:14 UTC