Skip to content

Duplicate Detection Rules

Duplicate detection rules identify duplicate or conflicting resource definitions.

Severity: Error Fixable: Yes (suggests renaming)

Resource names must be unique within the project.

Example:

// ✗ Bad - Duplicate profile names
Profile: PatientProfile
Parent: Patient
* name 1..1
Profile: PatientProfile // Duplicate!
Parent: Patient
* gender 1..1

Fix: Rename one of the profiles:

Profile: PatientProfile
Parent: Patient
* name 1..1
Profile: PatientDemographicsProfile
Parent: Patient
* gender 1..1

Severity: Error Fixable: No

Resource IDs must be unique across all resources.

Example:

// ✗ Bad
Profile: PatientProfile
Id: patient-profile
Extension: PatientExtension
Id: patient-profile // Duplicate ID!

Severity: Warning Fixable: Yes (safe)

Alias definitions should not be duplicated.

Example:

// ✗ Bad
Alias: $SCT = http://snomed.info/sct
Alias: $SCT = http://snomed.info/sct // Duplicate

Preventing duplicates ensures:

  • Clear resource identification
  • Prevents compilation errors
  • Avoids ambiguity in references