Stream: shorthand
Topic: Influencing canonical URLs
Josh Mandel (Feb 17 2022 at 17:46):
From http://hl7.org/fhir/uv/shorthand/reference.html#canonical-url:
Each project MUST have an associated canonical URL, used for constructing canonical URLs for items created in the project. It is up to implementations to decide how this association is made.
With sushi is there a way for me to control the canonical URL of extensions I define in a project (e.g., so they omit the /StructureDefinition
path segment)?
Chris Moesel (Feb 17 2022 at 18:51):
Hey @Josh Mandel. By default, SUSHI will create extension definition URLs using the following formula:
${canonicalBase}/StructureDefinition/${id}
If you want to override that, you must do it on a case-by-case basis by assigning the ^url
in the extension definition. E.g.:
Extension: MyExtension
Title: "My Extension"
Description: "Didn't I already tell you it's my extension?"
* ^url = "http://example.org/stuffthatismine/thisextension"
* value[x] only boolean
Chris Moesel (Feb 17 2022 at 18:53):
We could provide a mechanism to globally override the basic format that is automatically applied by SUSHI, but there really hasn't been much (any?) demand for that.
Josh Mandel (Feb 17 2022 at 19:00):
That example accomplishes just what I want -- and it's straightforward enough syntax. Thank you!
Chris Moesel (Feb 17 2022 at 19:30):
NP. In FSH profiles and extensions you can always use * ^sdElementName
to get directly at an element in the StructureDefinition
or * elementPath ^edElementName
to get directly at an element in the ElementDefinition
. (Well, almost always. We don't allow you to directly muck with ^snapshot.element
or ^differential.element
in SDs because we really want to manage those element arrays on our own).
Last updated: Apr 12 2022 at 19:14 UTC