#71. Inconsistent canonical URLs

Every conformance resource you create has a canonical URL. Profiles, extensions, ValueSets, CodeSystems and SearchParameters are all identified by their url. Identifier systems work in much the same way (not always, but often enough).

That URL is the resource’s identity. Change it, and as far as FHIR is concerned you have a different resource.

Decisions about canonical URLs get made throughout the project’s life cycle, from start to finish. Problem is, over the lifetime of a project many things change.

The product gets renamed, sometimes more than once. The old name was in the URL. New resources get the new name, existing resources stay the same, because changing them means changing every app that uses them.

New hires pick http or https out of habit or because they think it’s best practice. Linters brought in late in the day force “corrections” to URLs that have to be reversed later.

Sometimes the URL sits on a domain or subdomain that the product team doesn’t own or have control over. Another reason for a change.

More often than not the decision is put off. “We’ll sort out the URLs later.” Only later never comes, but the production release does. And that release contains a mix of different base URLs and different URL structures.

In extreme cases changing a URL can lead to downtime in dev and test environments that lasts days. I’ve seen one case where changing the URL of a SearchParameter broke a host of QA servers, right in the middle of a V&V. It required escalation and vendor support to fix each broken server.

Signs to look for:

  • More than one base URL across your StructureDefinitions, ValueSets, CodeSystems and SearchParameters
  • Product names in canonical URLs
  • Canonical URLs that differ only by http or https
  • Canonical URLs on domains or subdomains the product team can’t access
  • No named owner for canonical URLs

---

I work with teams on a project, retainer or fractional basis. Learn more →

Download my “FHIR Architecture Decisions” book