Coding
A code from a standardized medical terminology system, equivalent to FHIR's Coding datatype. Contains a code value, the system it belongs to, and display text. Supports SNOMED-CT, LOINC, ICD-10/11, ATC, RxNorm, CPT, and other international and national coding systems.
Overview
Coding represents a single concept from a medical terminology or classification system. It is the fundamental building block for encoding clinical concepts in a standardized, interoperable way. Each Coding includes the code value, the terminology system that defines it, an optional version, and human-readable display text. This entity aligns with the FHIR Coding datatype for healthcare interoperability.
Key Concepts
Coding Structure
Each Coding contains:
| Field | Purpose | Example |
|---|---|---|
code | Machine-readable identifier | "38341003" |
system | Terminology that defines the code | "SNOMED-CT" |
version | Specific version of the terminology | "20230901" |
display | Human-readable term | "Hypertension" |
userSelected | Whether user explicitly chose this code | true |
Terminology Systems
Clinical Terminologies
SNOMED-CT- Comprehensive clinical terminology for diagnoses, procedures, findingsLOINC- Laboratory and clinical observation identifiersICD-10/ICD-11- International disease classification for diagnosesCIM-10-FR- French adaptation of ICD-10
Medication Terminologies
ATC- Anatomical Therapeutic Chemical classification (WHO)RxNorm- US drug terminology with ingredients, strengths, formsNDC- National Drug Code (US product identifiers)
Procedure Terminologies
CPT- Current Procedural Terminology (US procedures/services)CCAM- Classification Commune des Actes Médicaux (French procedures)NABM- Nomenclature des Actes de Biologie Médicale (French lab acts)NGAP- Nomenclature Générale des Actes Professionnels (French professional acts)
Vaccine Terminologies
CVX- CDC vaccine administered codes
Version Importance
The version field is critical because:
- Code meanings can change between versions
- New codes are added, some deprecated
- Hierarchies and relationships evolve
- Regulatory requirements may specify versions
User Selection Flag
The userSelected boolean indicates:
true- A clinician explicitly chose this codefalse- System inferred, defaulted, or auto-populated- Important for clinical decision support and quality reporting
Calculated System URL
The systemUrl field computes the canonical FHIR URI:
| System | FHIR URI |
|---|---|
| SNOMED-CT | http://snomed.info/sct |
| LOINC | http://loinc.org |
| ICD-10 | http://hl7.org/fhir/sid/icd-10 |
| ATC | http://www.whocc.no/atc |
| RxNorm | http://www.nlm.nih.gov/research/umls/rxnorm |
| CVX | http://hl7.org/fhir/sid/cvx |
Use Cases
Diagnosis Coding
When recording a diagnosis:
- Search terminology by display text or code
- Select appropriate code from results
- Set
userSelected: truefor clinician-chosen codes - Include version for temporal consistency
- Store in diagnosis record
Laboratory Order Coding
When ordering lab tests:
- Use LOINC codes for test identification
- Map to local lab system codes if needed
- Include display text for result reports
- Version ensures consistent interpretation
Medication Coding
When prescribing medications:
- Use RxNorm for US systems, ATC for international
- Encode ingredient, strength, and form
- Map to NDC for dispensing
- Cross-reference for drug interactions
Procedure Coding
For billing and documentation:
- Use CPT (US) or CCAM (France) for procedures
- Include modifier codes as needed
- Validate against payer requirements
- Document in encounter record
FHIR Interoperability
When exchanging data:
- Use canonical system URIs
- Include version when available
- Provide display text for human readers
- Validate codes against terminology servers
Related Entities
| Entity | Relationship | Description |
|---|---|---|
| Diagnosis | Used by | Diagnosis records encoding conditions |
| Prescription | Used by | Medication orders with drug codes |
| LaboratoryTest | Used by | Lab tests with LOINC codes |
| Encounter | Used by | Visit types and reason codes |
Calculated Fields
| Field | Type | Description |
|---|---|---|
systemUrl | string | Canonical FHIR URI for the terminology system |
Enums
system
| Value | Full Name | Purpose |
|---|---|---|
SNOMED-CT | Systematized Nomenclature of Medicine - Clinical Terms | Comprehensive clinical terminology for diagnoses, findings, procedures |
LOINC | Logical Observation Identifiers Names and Codes | Laboratory tests and clinical observations |
ICD-10 | International Classification of Diseases, 10th Revision | Disease classification for diagnosis coding and statistics |
ICD-11 | International Classification of Diseases, 11th Revision | Latest WHO disease classification |
CIM-10-FR | Classification Internationale des Maladies (French ICD-10) | French adaptation of ICD-10 |
ATC | Anatomical Therapeutic Chemical Classification | WHO drug classification by therapeutic use |
RxNorm | RxNorm | US standardized drug nomenclature |
CCAM | Classification Commune des Actes Médicaux | French medical procedure classification |
NABM | Nomenclature des Actes de Biologie Médicale | French laboratory act nomenclature |
NGAP | Nomenclature Générale des Actes Professionnels | French professional act nomenclature |
CPT | Current Procedural Terminology | US medical procedure and service codes |
CVX | CDC Vaccine Administered Codes | US vaccine identification codes |
NDC | National Drug Code | US drug product identifiers |
custom | Custom terminology | Institution-specific or trial-specific codes |
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| code | string | stored | The actual code value from the terminology system - the machine-readable identifier that uniquely represents the concept within its system namespace Example: | Required |
| system | string | stored | The standardized medical terminology or classification system that defines and governs this code Values: Example: | Required |
| version | string | stored | Version identifier of the terminology system in use - critical for ensuring temporal consistency as code meanings and hierarchies evolve over time Example: | Optional |
| display | string | stored | Human-readable text representation of the code - the preferred term or label as defined by the terminology system, used for display in user interfaces Example: | Optional |
| userSelected | boolean | stored | Indicates whether this code was explicitly chosen by a human user (true) versus being system-inferred, defaulted, or auto-populated (false or absent) - critical for validating clinical intent in decision support and quality reporting Example: | Optional |
| systemUrl | string | calculated | The canonical FHIR URI for the terminology system - computed from the system property to provide standardized system identifiers for FHIR resource interchange and validation | Optional |
Examples
Example 1
{
"@type": "Coding",
"code": "38341003",
"system": "SNOMED-CT",
"version": "http://snomed.info/sct/900000000000207008/version/20230901",
"display": "Hypertension",
"userSelected": true,
"_comment": "systemUrl: http://snomed.info/sct"
}Example 2
{
"@type": "Coding",
"code": "2345-7",
"system": "LOINC",
"version": "2.74",
"display": "Glucose [Mass/volume] in Serum or Plasma",
"userSelected": false,
"_comment": "systemUrl: http://loinc.org"
}Example 3
{
"@type": "Coding",
"code": "E11.9",
"system": "ICD-10",
"version": "2024",
"display": "Type 2 diabetes mellitus without complications",
"userSelected": true,
"_comment": "systemUrl: http://hl7.org/fhir/sid/icd-10"
}Example 4
{
"@type": "Coding",
"code": "C09AA05",
"system": "ATC",
"version": "2024",
"display": "ramipril",
"userSelected": false,
"_comment": "systemUrl: http://www.whocc.no/atc"
}Example 5
{
"@type": "Coding",
"code": "197361",
"system": "RxNorm",
"version": "20240101",
"display": "Lisinopril 10 MG Oral Tablet",
"userSelected": true,
"_comment": "systemUrl: http://www.nlm.nih.gov/research/umls/rxnorm"
}Example 6
{
"@type": "Coding",
"code": "YYYY043",
"system": "CCAM",
"version": "v72.0",
"display": "Pose d'un cathéter veineux central par voie transcutanée",
"_comment": "systemUrl: http://terminology.hl7.org/CodeSystem/fr-ccam"
}Example 7
{
"@type": "Coding",
"code": "208",
"system": "CVX",
"version": "20231108",
"display": "SARS-COV-2 (COVID-19) vaccine, mRNA, spike protein, LNP, preservative free, 30 mcg/0.3mL dose",
"userSelected": false,
"_comment": "systemUrl: http://hl7.org/fhir/sid/cvx"
}Example 8
{
"@type": "Coding",
"code": "CUSTOM-DX-001",
"system": "custom",
"display": "Institution-specific diagnostic code for clinical trial protocol XYZ",
"userSelected": true,
"_comment": "systemUrl: custom system URIs are institution-defined"
}