Profile Rules
Overview
Section titled “Overview”Profile rules ensure profiles are correctly defined with proper parent relationships and constraints.
correctness/profile-parent-required
Section titled “correctness/profile-parent-required”Severity: Error Fixable: No
All profiles must specify a parent resource.
Example:
// ✓ GoodProfile: PatientProfileParent: Patient* name 1..1
// ✗ BadProfile: PatientProfile* name 1..1
correctness/profile-constraint-strength
Section titled “correctness/profile-constraint-strength”Severity: Warning Fixable: No
Profile constraints should not weaken parent constraints.
Example:
// ✓ GoodProfile: PatientProfileParent: Patient// Patient.name is 0..* in base, making it 1..1 is strengthening* name 1..1
// ✗ BadProfile: StrictPatientProfileParent: PatientProfile // PatientProfile has name 1..1// Cannot weaken to 0..1* name 0..1
suspicious/profile-circular-parent
Section titled “suspicious/profile-circular-parent”Severity: Error Fixable: No
Profiles cannot have circular parent relationships.
Example:
// ✗ Bad - Circular dependencyProfile: ProfileAParent: ProfileB
Profile: ProfileBParent: ProfileA
Rationale
Section titled “Rationale”Proper profile validation ensures:
- FHIR specification compliance
- Valid constraint hierarchies
- Prevents runtime validation errors