FHIR Profiling: Changing Cardinality

Ivan Bagrov
April 11, 2025
3 min

FHIR Profiling

One key function of profiles is to modify the cardinality of an element. A profile can restrict an element's cardinality within its base structure.

The foundational FHIR structure defines the following types of cardinality:

  • Optional array (0..*)
  • Optional scalar (0..1)
  • Required array (1..*)
  • Required scalar (1..1)

With the following constraints:

  • You cannot make a required element that is optional in the base profile. 
  • You cannot convert an array element into a scalar if it exists as an array in the base profile. 
  • You cannot change a scalar element into an array if it is defined as a scalar in the base profile.

Example of how to create a profile that makes the `Patient.name` field mandatory:

resourceType: StructureDefinition
url: http://example.org/fhir/StructureDefinition/patient-with-required-name
name: patient-profile
derivation: constraint
type: Patient
status: active
kind: resource
abstract: false
differential:
  element:
	- id: Patient.name
  	  path: Patient.name
  	  min: 1
  	  max: "*"

Create a profile in your own FHIR server

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