Naming Convention Rules
Overview
Section titled “Overview”Naming convention rules ensure consistent, predictable naming patterns across your FSH project.
style/profile-naming
Section titled “style/profile-naming”Severity: Warning Fixable: Yes (safe)
Profile names should follow PascalCase and match their resource type.
Example:
// ✓ GoodProfile: PatientProfileParent: Patient
// ✗ BadProfile: patient_profileParent: Patient
Configuration:
{ "linter": { "rules": { "style": { "profile-naming": "warn" } } }}
style/valueset-naming
Section titled “style/valueset-naming”Severity: Warning Fixable: Yes (safe)
ValueSet names should use PascalCase and be suffixed with “VS” or “ValueSet”.
Example:
// ✓ GoodValueSet: AdministrativeGenderVS
// ✗ BadValueSet: administrativeGender
style/codesystem-naming
Section titled “style/codesystem-naming”Severity: Warning Fixable: Yes (safe)
CodeSystem names should use PascalCase and be suffixed with “CS” or “CodeSystem”.
Example:
// ✓ GoodCodeSystem: ContactPointUseCS
// ✗ BadCodeSystem: contact_point_use
style/extension-naming
Section titled “style/extension-naming”Severity: Warning Fixable: Yes (safe)
Extension names should use PascalCase and be suffixed with “Extension”.
Example:
// ✓ GoodExtension: PatientBirthPlaceExtension
// ✗ BadExtension: patient-birth-place
Rationale
Section titled “Rationale”Consistent naming conventions:
- Improve code readability
- Make resource types immediately identifiable
- Follow FHIR community best practices
- Enable better IDE autocomplete