Skip to content

Profile Rules

Profile rules ensure profiles are correctly defined with proper parent relationships and constraints.

Severity: Error Fixable: No

All profiles must specify a parent resource.

Example:

// ✓ Good
Profile: PatientProfile
Parent: Patient
* name 1..1
// ✗ Bad
Profile: PatientProfile
* name 1..1

Severity: Warning Fixable: No

Profile constraints should not weaken parent constraints.

Example:

// ✓ Good
Profile: PatientProfile
Parent: Patient
// Patient.name is 0..* in base, making it 1..1 is strengthening
* name 1..1
// ✗ Bad
Profile: StrictPatientProfile
Parent: PatientProfile // PatientProfile has name 1..1
// Cannot weaken to 0..1
* name 0..1

Severity: Error Fixable: No

Profiles cannot have circular parent relationships.

Example:

// ✗ Bad - Circular dependency
Profile: ProfileA
Parent: ProfileB
Profile: ProfileB
Parent: ProfileA

Proper profile validation ensures:

  • FHIR specification compliance
  • Valid constraint hierarchies
  • Prevents runtime validation errors