Skip to content

Meta Updated By Extension

Canonical../StructureDefinition/meta-updated-by
Statusdraft · 1.26.0
BaseExtension (constraint)
ContextMeta (element)
SourceFSH · JSON

The user account that last wrote this version of the resource.

FSH

The authored source of truth: extensions/MetaUpdatedByExtension.fsh (edit on GitHub). One FSH file may define several related artifacts.

// MetaUpdatedByExtension.fsh
// Who last wrote a resource version -- carried on `Meta`, so it rides every version of everything.
//
// WHY THIS IS DECLARED. The EMR has written it on `Resource.meta.extension` for a long time and this
// guide described it nowhere. It is what the letters UI reads to render "edited by X" against a
// version, and a reader of this guide saw a `meta` with no such concept while live resources carried
// it. An undeclared extension is the same commitment as a declared one with no description attached.
//
// IT IS NOT `Provenance`, AND NOT A REPLACEMENT FOR IT. Provenance is the auditable record of an
// activity: who, when, from what, under what authority, with signatures if it needs them. This is a
// display convenience -- one identifier so that a version list can say who touched each version
// without fetching a Provenance per row. A consumer that needs to reason about authorship, rather
// than print it, should read `Provenance` or the resource's own author element.
//
// ────────────────────────────────────────────────────────────────────────────────────────────────
// THE CANONICAL HERE IS NOT THE ONE THE SOFTWARE WRITES TODAY, DELIBERATELY.
//
// This publishes under `../StructureDefinition/...`, the base
// `conventions.md` names. The EMR writes it under
// `http://services.well.com/fhir/StructureDefinition/UpdatedBy`, and this specification does not
// follow it there -- the same call made for `composition-billing` and `composition-ehr-share` in
// this release, and for the same reason: a guide that adopts every address its implementation
// happens to have minted has no canonical base at all.
//
// WHAT A WRITER SHOULD DO. Write the canonical declared here. WHAT A READER SHOULD EXPECT: both,
// for as long as resources filed under the old address are in the store. Matching on the URL suffix
// (`UpdatedBy`) reads both; resolving only the canonical below silently misses the attribution on
// every version written before the writers move.
//
// THIS ONE HAS FILED DATA BEHIND IT, unlike the block extensions, which moved before anything was
// written against them. It rides `meta` on every version of every resource the EMR has ever saved,
// so the old address does not stop appearing when the writers change -- it stops appearing on NEW
// versions, and history keeps it forever. Plan for a reader that sees both indefinitely rather than
// for a cutover.
//
// MOVING THE WRITER AT `http://services.well.com/fhir/StructureDefinition/UpdatedBy` IS TRACKED
// AS FHIR-375. The handbook states the rule and indexes every
// published artifact in this position: see `docs/guide/patterns/canonical-urls.md`.
// ────────────────────────────────────────────────────────────────────────────────────────────────
//
// THE VALUE IS AN OPAQUE USER IDENTIFIER, not a Reference. The EMR writes its identity-provider
// subject (`auth0|...`), which names a user account rather than a FHIR Practitioner: the two are not
// the same thing, not every writer has a Practitioner resource, and minting a dangling reference
// would be worse than a string a consumer can at least match on. Resolving it to a Practitioner is
// the reader's job and needs the identity directory, which this guide does not describe.

Extension: MetaUpdatedBy
Id: meta-updated-by
Title: "Meta Updated By Extension"
Description: """
The user account that last wrote this version of the resource.

**A display convenience, not an audit record.** It exists so a version list can say who touched each
version without fetching a `Provenance` per row. Anything that needs to REASON about authorship --
rather than print it -- should read `Provenance` or the resource's own author element.

**The value is an identity-provider subject, not a `Reference`.** It names a user account; not every
writer has a `Practitioner` resource, and a dangling reference would be worse than a string a
consumer can match on. Resolving it to a person needs the identity directory, which this guide does
not describe.

**Readers should expect two canonicals.** This publishes under this guide's base; the EMR writes it
today under `http://services.well.com/fhir/StructureDefinition/UpdatedBy`, and because
this rides `meta` on every version of every resource ever saved, the old address persists in version
history even after writers move. Match both addresses exactly. The two share no segment, so a suffix
rule does not reach the pre-migration one and a reader built on it misses every pre-migration
version. The handbook's Canonical URLs page indexes every published artifact in this position.
"""
* ^url = "../StructureDefinition/meta-updated-by"
* ^status = #draft
* ^context[0].type = #element
* ^context[0].expression = "Meta"
* extension 0..0
* url 1..1
* value[x] 1..1 MS
* value[x] only string
* valueString ^short = "Identity-provider subject of the user who wrote this version"
* valueString ^definition = "An opaque user-account identifier as the identity provider issues it (for example `auth0|abc123`). NOT a FHIR id and not a Practitioner reference."