FHIR Profiling: Extensions

Ivan Bagrov
April 11, 2025
3 min

Extensions

In FHIR, you can define a profile not only for a resource but also for an extension. A profile on an extension allows for restricting the acceptable types of extension values, specifying a binding for a coded value, and describing the validation of the value using FHIRPath.

Example of how to describe your own extension that describes a patient’s place of birth:

POST /fhir/StructureDefinition

resourceType: StructureDefinition
id: my-extension
type: Extension
baseDefinition: http://hl7.org/fhir/StructureDefinition/Extension
url: http://example.org/fhir/StructureDefinition/my-extension
name: MyExtension
kind: complex-type
abstract: false
derivation: constraint
differential:
  element:
   - id: Extension.url
     path: Extension.url
     fixedUri: http://example.org/fhir/StructureDefinition/patient-birthPlace
   - id: Extension.value[x]
     path: Extension.value[x]
     min: 1
     type:
      - code: string
How did you like the article?
Be the first to know!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

contact us

Get in touch with us today!

By submitting the form you agree to Privacy Policy and Cookie Policy.
Thank you!
We’ll be in touch soon.

In the meantime, you can:
Oops! Something went wrong while submitting the form.

Never miss a thing
Subscribe for more content!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
By clicking “Subscribe” you agree to Health Samurai Privacy Policy and consent to Health Samurai using your contact data for newsletter purposes