|
3 min read

FHIR Profiling: FHIRPath Constraints

Summarize this blog post with:

FHIRPath Constraints

Constraint - a validation rule that is defined on a profile and described using the FHIRPath syntax.

Constraints allow for describing more complex data requirements.

Example of a profile with a constraint:

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
  	  path: Patient
  	  constraint: 
           - key: patient-data
             severity: error
             human: Patient's name or address are required
             expression: Patient.name.exists() or Patient.address.exists()

In this example, a profile with a constraint is described that checks whether the patient must have either a name or an address specified.

Constraints can be specified for the entire resource and for specific complex and primitive types.

Aidbox FHIR server supports the entire FHIRPath syntax.

See also: FHIR Profiling and Unlocking FHIRPath Power.

Comments
Comments
Sign in
Loading comments...
Subscribe to our blog

Get the latest articles on FHIR, interoperability, and healthcare IT.