Stream: shorthand
Topic: Overriding CodeSystem URL
Nick Goupinets (Mar 17 2021 at 19:43):
Hello, is there a way to override a URL of a code system being generated by FSH? If I am adding a resource like this:
CodeSystem: AddressValidationResultsCodeSystem
Title: "Address Validation Results Code System"
Description: "Code System for Address Validation Results"
- #valid "Valid" "Valid Address as validated by an external service"
- #invalid "Invalid" "Invalid Address as validated by an external service"
Is there a way to make belong to a different namespace than what's defined in the project, or I will need to build a separate fsh project/IG for that?
Chris Moesel (Mar 17 2021 at 19:45):
Yep. You can use a "caret" rule to set top-level fields in the CodeSystem. So in this case you would just want to add a rule like:
* ^url = "http://my.custom.url"
That will override the default URL value with the one you provide.
Nick Goupinets (Mar 17 2021 at 19:52):
Worked like charm, thank you so much Chris!
Matt Rouhana (Nov 29 2021 at 16:19):
Is there a way to specify a specific URL "pattern" you'd like to follow for a SUSHI project? For example, our internal convention is that all canonical URLs are completely lowercase, so rather than: http://example.com/fhir/StructureDefinition/my-practitioner
, the URL should be: http://example.com/fhir/structuredefinition/my-practitioner
. I realize that I can use a caret rule on each profile definition to accomplish this (or just do some post-processing on the generated artifacts), but it would be nice to be able to set this in the sushi-config.yaml instead.
Matt Rouhana (Dec 01 2021 at 17:07):
Any ideas on the above?
Chris Moesel (Dec 01 2021 at 18:34):
Hi @Matt Rouhana -- unfortunately, no, I don't have any ideas. We're following common practice, as FHIR Core and most IGs seem to use the pattern w/ capital type names (since type names are generally case-sensitive in the spec). I recognize that the spec doesn't say you have to do this for canonical URLs (as far as I can tell), but I think I'd want to see some more demand for a feature like this before complicating SUSHI w/ another configuration parameter.
Are there other people out there who want to use a different canonical URL pattern throughout their IG?
Grahame Grieve (Dec 01 2021 at 23:14):
yes why do this? The practice isn't mandatory, but it's widely followed because it means the specification is an instance of a FHIR server
Matt Rouhana (Dec 02 2021 at 14:31):
@Chris Moesel @Grahame Grieve those are fair points. I think we can either change our internal convention, or I can just do some post-processing on the generated FHIR artifacts.
Last updated: Apr 12 2022 at 19:14 UTC