Skip to content

Naming Convention Rules

Naming convention rules ensure consistent, predictable naming patterns across your FSH project.

Severity: Warning Fixable: Yes (safe)

Profile names should follow PascalCase and match their resource type.

Example:

// ✓ Good
Profile: PatientProfile
Parent: Patient
// ✗ Bad
Profile: patient_profile
Parent: Patient

Configuration:

{
"linter": {
"rules": {
"style": {
"profile-naming": "warn"
}
}
}
}

Severity: Warning Fixable: Yes (safe)

ValueSet names should use PascalCase and be suffixed with “VS” or “ValueSet”.

Example:

// ✓ Good
ValueSet: AdministrativeGenderVS
// ✗ Bad
ValueSet: administrativeGender

Severity: Warning Fixable: Yes (safe)

CodeSystem names should use PascalCase and be suffixed with “CS” or “CodeSystem”.

Example:

// ✓ Good
CodeSystem: ContactPointUseCS
// ✗ Bad
CodeSystem: contact_point_use

Severity: Warning Fixable: Yes (safe)

Extension names should use PascalCase and be suffixed with “Extension”.

Example:

// ✓ Good
Extension: PatientBirthPlaceExtension
// ✗ Bad
Extension: patient-birth-place

Consistent naming conventions:

  • Improve code readability
  • Make resource types immediately identifiable
  • Follow FHIR community best practices
  • Enable better IDE autocomplete