📖 Extensibility
FHIR base resources focus on information that is common across many healthcare settings. Sometimes an implementation needs to exchange an additional concept for which the base resource has no suitable element. FHIR can represent that concept with an extension.
An extension is not a resource on its own. It is a structured
element that can appear at an allowed location inside a resource. The
formal definition of an extension is published as a
StructureDefinition resource and is identified by a canonical URL.
That definition explains what the extension means, where it may be
used, and what type of value it may contain.
This governance matters. A sender should not invent an unexplained field, and a receiver should not guess what an unfamiliar field means. When both systems use the same published extension definition, they can refer to the same meaning. A profile can then require the extension or place additional constraints on its use.
Extensions must not be used to change the meaning of an existing
element. FHIR also has a stricter form called a modifierExtension for
the exceptional case where the added information changes how the
containing element or resource must be interpreted. Systems are not
allowed to ignore modifier extensions they do not understand.
In short:
- the base resource supplies the common structure;
- an extension represents a governed additional concept;
- a profile states how the resource and its extensions must be used in a particular context; and
- an implementation guide brings those agreements together for a project or community.