FHIR Profiling: Slicing

Ivan Bagrov
April 11, 2025
2 min

Slicing

The slicing mechanism enables the specification of requirements for array elements. For instance, slices can be used to define requirements such as:

  • A specific extension must be included on the resource.
  • If a patient has a home address, it must include state information.
  • A transactional bundle must contain a resource that conforms to a specific profile.

An example of slicing that requires the patient’s home address to include state information:

resourceType: StructureDefinition
url: http://example.org/fhir/StructureDefinition/patient-profile
name: patient-profile
derivation: constraint
type: Patient
status: active
kind: resource
abstract: false
differential:
  element:
	- id: Patient.address
  	  path: Patient.address
  	  slicing:
    	    discriminator:
      	      - type: pattern
               path: use
    	    rules: open
	- id: Patient.address:home
  	  path: Patient.address
  	  sliceName: home
  	  min: 1
  	  max: "1"
  	  type:
    	    - code: Address
  	  patternAddress:
    	    use: home
	- id: Patient.address:home.state
  	  path: Patient.address.state
  	  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