Chuyển đến nội dung chính

Lesson 12: Terminologies - CodeSystem, ValueSet, ConceptMap

Medical terminology system: ICD-10 (diagnosis), SNOMED CT (clinical), LOINC (laboratory), RxNorm (drug), CPT (procedure), ATC (drug classification). CodeSystem, ValueSet, ConceptMap in FHIR. Terminology binding (required, extensible, preferred, example). $validate-code, $expand, $lookup.

🏗️ Architecture — Lesson 12 Lesson 12: Terminologies - CodeSystem, ValueSet, ConceptMap

HL7 FHIR - Basic to Advanced Healthcare Data Standard

Part 4: Data Types, Terminologies and Profiles

xdev.asia

1. Main medical terminology systems

SystemOrganizePurposeFHIR system URI
ICD-10WHOClassification of diseases and causes of deathhttp://hl7.org/fhir/sid/icd-10
SNOMED CTSNOMED Int'lComprehensive clinical terminologyhttp://snomed.info/sct
LOINCRegenstriefLaboratory testing and clinical observationhttp://loinc.org
RxNormNLMStandardized drug names (USA)http://www.nlm.nih.gov/research/umls/rxnorm
ATCWHOClassification of drugs by group (international)http://www.whocc.no/atc
CPTAMAMedical procedure/service codehttp://www.ama-assn.org/go/cpt
CVXCDCVaccine codehttp://hl7.org/fhir/sid/cvx
UCUMRegenstriefMeasurement unithttp://unitsofmeasure.org

ICD-10 — International Classification of Diseases

Use for Condition.code, Encounter.diagnosis. Vietnam uses the official ICD-10 (WHO).

{
  "system": "http://hl7.org/fhir/sid/icd-10",
  "code": "E11.9",
  "display": "Type 2 diabetes mellitus without complications"
}

SNOMED CT — Systematized Nomenclature of Medicine

The most comprehensive terminology system, 350,000+ concepts, hierarchical relationships (ontology).

{
  "system": "http://snomed.info/sct",
  "code": "73211009",
  "display": "Diabetes mellitus"
}

LOINC — Logical Observation Identifiers Names and Codes

97,000+ codes for testing and clinical observations. Used for Observation.code, DiagnosticReport.code.

{
  "system": "http://loinc.org",
  "code": "4548-4",
  "display": "Hemoglobin A1c/Hemoglobin.total in Blood"
}

2. CodeSystem Resource

CodeSystem defines a set of concepts (codes) — can be international or custom systems.

{
  "resourceType": "CodeSystem",
  "url": "http://hospital.vn/fhir/CodeSystem/loai-kham",
  "name": "LoaiKham",
  "title": "Loại hình khám chữa bệnh",
  "status": "active",
  "content": "complete",
  "count": 5,
  "concept": [
    {
      "code": "KSK",
      "display": "Khám sức khỏe",
      "definition": "Khám sức khỏe tổng quát định kỳ"
    },
    {
      "code": "KBT",
      "display": "Khám bệnh thường",
      "definition": "Khám bệnh ngoại trú thông thường"
    },
    {
      "code": "CC",
      "display": "Cấp cứu",
      "definition": "Khám cấp cứu"
    },
    {
      "code": "BHYT",
      "display": "Khám BHYT",
      "definition": "Khám bảo hiểm y tế"
    },
    {
      "code": "DV",
      "display": "Khám dịch vụ",
      "definition": "Khám theo yêu cầu (dịch vụ)"
    }
  ]
}

3. ValueSet Resource

ValueSet Select a subset from one or more CodeSystems.

{
  "resourceType": "ValueSet",
  "url": "http://hospital.vn/fhir/ValueSet/vital-signs-codes",
  "name": "VitalSignsCodes",
  "title": "Mã dấu hiệu sinh tồn",
  "status": "active",
  "compose": {
    "include": [
      {
        "system": "http://loinc.org",
        "concept": [
          {"code": "8480-6", "display": "Systolic blood pressure"},
          {"code": "8462-4", "display": "Diastolic blood pressure"},
          {"code": "8867-4", "display": "Heart rate"},
          {"code": "8310-5", "display": "Body temperature"},
          {"code": "9279-1", "display": "Respiratory rate"},
          {"code": "2708-6", "display": "Oxygen saturation (SpO2)"},
          {"code": "29463-7", "display": "Body weight"},
          {"code": "8302-2", "display": "Body height"}
        ]
      }
    ]
  }
}

ValueSet with Filter

{
  "resourceType": "ValueSet",
  "url": "http://hospital.vn/fhir/ValueSet/icd10-cardiovascular",
  "compose": {
    "include": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "filter": [
          {
            "property": "concept",
            "op": "is-a",
            "value": "I00-I99"
          }
        ]
      }
    ],
    "exclude": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "concept": [
          {"code": "I99"}
        ]
      }
    ]
  }
}

4. ConceptMap — Mapping between CodeSystems

{
  "resourceType": "ConceptMap",
  "url": "http://hospital.vn/fhir/ConceptMap/icd10-to-snomed",
  "name": "ICD10ToSNOMED",
  "title": "ICD-10 → SNOMED CT Mapping",
  "status": "active",
  "sourceScope": "http://hl7.org/fhir/sid/icd-10",
  "targetScope": "http://snomed.info/sct",
  "group": [
    {
      "source": "http://hl7.org/fhir/sid/icd-10",
      "target": "http://snomed.info/sct",
      "element": [
        {
          "code": "I10",
          "display": "Essential (primary) hypertension",
          "target": [
            {
              "code": "38341003",
              "display": "Hypertensive disorder",
              "relationship": "equivalent"
            }
          ]
        },
        {
          "code": "E11",
          "display": "Type 2 diabetes mellitus",
          "target": [
            {
              "code": "44054006",
              "display": "Type 2 diabetes mellitus",
              "relationship": "equivalent"
            }
          ]
        }
      ]
    }
  ]
}

Relationship Types

RelationshipDescription
equivalentCompletely equivalent
source-is-narrower-than-targetSource is narrower than target
source-is-broader-than-targetSource is broader than target
not-related-toNot related

5. Terminology Binding

Binding specifies which elements are REQUIRED to use codes from ValueSet.

StrengthDescriptionFor example
required. requiredREQUIRED to use code from ValueSetPatient.gender
extensibleSHOULD be used. You can use another code if you cannot find itCondition.code
preferredRECOMMENDED. Other codes can be usedEncounter.type
exampleJust examples. Any ValueSet can be usedObservation.code

6. Terminology Service Operations

# $validate-code — kiểm tra code có hợp lệ trong ValueSet
POST /ValueSet/$validate-code
{
  "resourceType": "Parameters",
  "parameter": [
    {"name": "url", "valueUri": "http://hl7.org/fhir/ValueSet/administrative-gender"},
    {"name": "code", "valueCode": "male"},
    {"name": "system", "valueUri": "http://hl7.org/fhir/administrative-gender"}
  ]
}

# $expand — mở rộng ValueSet ra danh sách codes
GET /ValueSet/$expand?url=http://hospital.vn/fhir/ValueSet/vital-signs-codes

# $lookup — tra cứu thông tin code
GET /CodeSystem/$lookup?system=http://loinc.org&code=4548-4

# $translate — ánh xạ code qua ConceptMap
GET /ConceptMap/$translate?system=http://hl7.org/fhir/sid/icd-10&code=I10&target=http://snomed.info/sct

7. Summary

  • CodeSystem — Define code sets (ICD-10, SNOMED CT, LOINC, or custom)

  • ValueSet — Select subset from CodeSystems, used for binding

  • ConceptMap — Mapping between CodeSystems (ICD-10 ↔ SNOMED CT)

  • Binding strengths — required > extensible > preferred > example

  • Terminology operations — $validate-code, $expand, $lookup, $translate