ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

CodeSystem — The FHIR code repository

Every coded FHIR value — a gender, a diagnosis, a medication — comes from a CodeSystem. SNOMED CT, LOINC, RxNorm, ATC, ICD-10, local codes: all are declared via this resource.

Purpose

CodeSystem declares a code system: its canonical URL (which acts as a universal identifier), its version, case sensitivity, optional concept hierarchy, the properties qualifying each code, and the explicit or implicit list of concepts.

Three modes of completeness (content):

  • not-present — only metadata is published, concepts live externally (typical for SNOMED).
  • example — a non-exhaustive sample.
  • fragment — an explicit subset (partial extensions).
  • complete — every concept listed (FHIR core CodeSystems).
  • supplement — supplement to an existing CodeSystem.

Key fields

FieldTypeCardinalityRole
urluri0..1Canonical URL (= system in Coding).
versionstring0..1CodeSystem version.
namestring0..1Machine name.
statuscode1..1Publication status.
caseSensitiveboolean0..1Code case sensitivity.
contentcode1..1Completeness (see above).
countinteger0..1Total concept count.
hierarchyMeaningcode0..1grouped-by, is-a, part-of, classified-with.
valueSetcanonical0..1The ValueSet matching all codes of the CS.
propertyBackboneElement[]0..*Concept property definitions.
conceptBackboneElement[]0..*Concepts in the CodeSystem.
concept.codecode1..1Concept code.
concept.displaystring0..1Preferred label.
concept.definitionstring0..1Narrative definition.
concept.designationBackboneElement[]0..*Synonyms and translations.
concept.propertyBackboneElement[]0..*Property values.
concept.conceptBackboneElement[]0..*Child concepts (hierarchy).

Common code systems

SystemCanonical URLUsage
SNOMED CThttp://snomed.info/sctDiagnoses, procedures, anatomy.
LOINChttp://loinc.orgLab tests, document sections.
RxNormhttp://www.nlm.nih.gov/research/umls/rxnormUS medications.
ATChttp://www.whocc.no/atcWHO medication classification.
ICD-10http://hl7.org/fhir/sid/icd-10Diagnoses.
ICD-10-CMhttp://hl7.org/fhir/sid/icd-10-cmUS diagnoses.
UCUMhttp://unitsofmeasure.orgUnits of measure.
HL7 v2 tableshttp://terminology.hl7.org/CodeSystem/v2-XXXXReused HL7 v2 tables.
HL7 v3 ActCodehttp://terminology.hl7.org/CodeSystem/v3-ActCodev3 codes.

JSON example

The canonical administrative-gender CodeSystem:

json codesystem-administrative-gender.json
{
  "resourceType": "CodeSystem",
  "id": "administrative-gender",
  "url": "http://hl7.org/fhir/administrative-gender",
  "version": "5.0.0",
  "name": "AdministrativeGender",
  "title": "AdministrativeGender",
  "status": "active",
  "experimental": false,
  "date": "2026-05-14",
  "publisher": "HL7 International (FHIR Project)",
  "description": "The gender of a person used for administrative purposes.",
  "caseSensitive": true,
  "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender",
  "content": "complete",
  "count": 4,
  "concept": [
    { "code": "male",    "display": "Male",    "definition": "Male." },
    { "code": "female",  "display": "Female",  "definition": "Female." },
    { "code": "other",   "display": "Other",   "definition": "Other." },
    { "code": "unknown", "display": "Unknown", "definition": "Unknown." }
  ]
}

Common pitfalls

  • Confusing url (system) and id — the url is the identifier used in Coding.system.
  • Editing a CodeSystem without bumping version — breaks the reproducible-expansion promise.
  • Hierarchy declared is-a but inconsistent — a child concept must logically inherit from the parent.
  • Codes case-insensitive in practice but caseSensitive=true — violates the declaration and breaks server-side comparisons.
  • SNOMED CT distributed in concept[] — SNOMED is huge and licensed: use content=not-present with an external terminology server.
  • ValueSet — selects a subset of the CodeSystem.
  • ConceptMap — inter-system mapping.
  • NamingSystem — alternate identifiers (OID, URI).
  • TerminologyCapabilities — server terminology capabilities.