FHIR Chat · Extension.url must be an absolute URL · shorthand

Stream: shorthand

Topic: Extension.url must be an absolute URL


view this post on Zulip David Pyke (Sep 01 2020 at 17:36):

I'm using an inline extension and sushi has no problem with it but the publisher doesn't like the fact that the extension url is just the name of the extension. I can't override it because it's marked as fixed. What's a poor fisherman to do?

view this post on Zulip David Pyke (Sep 02 2020 at 12:28):

Anyone? Beuller?

view this post on Zulip Chris Moesel (Sep 02 2020 at 12:47):

Sorry... so... inline extensions can definitely be just a name when they are used within a complex extension. I assume you are trying to do an inline extension in a profile? If so, I guess it is possible that this is not supported by FHIR -- but we can try to dig in to see... (and by "dig in", I mean ask someone smarter than me ;-).

view this post on Zulip David Pyke (Sep 02 2020 at 12:54):

Okay, then I'll just make it an external extension and save trouble

view this post on Zulip Chris Moesel (Sep 02 2020 at 13:08):

Thinking on it more, I guess it makes sense that it might only be supported within extensions themselves. Here's my thinking:

  • When you use an inline extension in a complex extension, then "url": "foo" is considered relative to the canonical URL of the extension.
  • Any time you actually use the complex extension it is a part of, the extension's URL will always be explicitly identified (because that's just how you specify extensions in an instance).
  • So... in any instance of a FHIR resource, that inline extension with a relative URL will always be accompanied by the parent URL it is relative to. There is no chance for ambiguity.

Compare that to attempting to use an inline extension as an extension on a profile.

  • The inline extension's url (e.g., "foo") could be considered as relative to the profile's canonical URL.
  • But... an instance of a FHIR resource does not have to declare what profiles it conforms to.
  • So... in some instances of FHIR resources, the profile URL will not be specified anywhere in the instance, so an inline extension with URL "foo" would not have that reference point that it is relative to. Therefore, the actual definition of the extension is ambiguous to consumers.

view this post on Zulip David Pyke (Sep 02 2020 at 13:09):

That makes good sense.

view this post on Zulip Chris Moesel (Sep 02 2020 at 13:10):

It's probably something worth noting in the documentation of FHIR Shorthand. It might be too late for the 1.0.0 documentation, but if so, we can be sure to include it in the next version. @Mark Kramer -- take note.

view this post on Zulip David Pyke (Sep 02 2020 at 13:11):

It should also generate an error so you don't have to wait for the publisher to complain

view this post on Zulip Chris Moesel (Sep 02 2020 at 13:12):

Ah. Good point! I'll file an issue on SUSHI to implement that check.

view this post on Zulip Chris Moesel (Sep 02 2020 at 13:16):

https://github.com/FHIR/sushi/issues/591


Last updated: Apr 12 2022 at 19:14 UTC