1 of 30

Lord of the Terms

FHIR Meetup March 3rd 2022

Grahame Grieve

2 of 30

Lord of the Terms

  • Your Challenge:
    • Everyone uses terminology
    • Entry level cost = 0 (enumerations)
    • Complexity grows and grows (Ontologies, SNOMED CT)
    • Cost is infinite?
    • You have to deal with terminologies well
  • Are you a Lord of the Terms?
    • Or will the terminologies master you?

3 of 30

Forging your Terminology

  • A well-made terminology lasts�through the ages
  • Invest in your treasure, put your �power in there
  • Cimino’s Desiderata

4 of 30

Cimino's Desiderata

  • Domain completeness – cover your scope with depth and breadth (Use a grammar)
  • Unambiguous – define your terms with a clear concept, and close the definition
  • Non-redundant – don’t have more than one way to describe a concept
  • Synonymy – clearly document terms that have the same meaning
  • Multiple classification – allow multiple axes in your hierarchy
    • (don’t reflect heirarchy in your codes)
  • Consistency of views – use a common approach ruthlessly
  • Explicit relationships – make sure you’re explicit about how your concepts relate to each other

http://www.cs.man.ac.uk/~jeremy/HealthInf/RCSEd/terminology-desiderata.htm

5 of 30

Forging your Terminology

  • A well-made terminology lasts�through the ages
  • Invest in your treasure, put your �power in there
  • Cimino’s Desiderata
  • Consider how you’ll manage and�implement/distribute it

6 of 30

CTS2 - Common Terminology Service

  • The original terminology service
  • Focus: Managing and creating terminologies
  • Fully engaged with the complexity of terminologies

  • FHIR does not cover this
    • Just publishing and using terminologies
    • So how are you going to do it
    • how’s HL7 going to do it?

7 of 30

FHIR Terminology Approach

  • The whole process matters
  • All parts should be in harmony with each other
  • Done well, terminology can save your empire

8 of 30

Terminology Harmony

9 of 30

Terminology Sub-system

  • SNOMED CT / LOINC / RxNORM
  • HGVS, ICPC, MIMS + 100s more
  • ICD-X+
  • ANZSCO, METEOR
  • A drug formulary
  • A config table in an application
  • A list of enums in a java class
  • US state codes

Code System:

Defines a set of concepts with a coherent meaning��Code�Display

Definition

10 of 30

CodeSystem Resource

  • Define Concepts
    • Codes
    • Displays
    • Properties
  • May be small (2 codes) or large (500k+ codes)
  • Some defined by implication (e.g. SNOMED CT)

10

11 of 30

Terminology Sub-system

Value Set:

A selection of a set of codes for use in a particular context

Code System:

Defines a set of concepts with a coherent meaning��Code�Display

Definition

Selects

12 of 30

ValueSet Resource

  • A set of codes
    • Include codes from other code system (e.g. LOINC)
    • List the codes
    • Choose a set of codes by rules
  • Used to define conformance rules, UI functionality, system capabilities
  • Functional service built around this

13 of 30

Code System vs Value Set

  • Often mixed in common usage
  • E.g. am application table that mixes LOINC codes and custom (self defined) codes
  • The only way to know it’s a LOINC code is it has the distinctive NNN-N syntax
  • HL7 says: keep your definitions clean, or you’ll get in trouble when you exchange data
  • Separate the definition and use of a ‘concept’

14 of 30

Terminology Sub-system

Code System:

Defines a set of concepts with a coherent meaning��Code�Display

Definition

Element Definition: �Type and Value set reference

Value Set:

A selection of a set of codes for use in a particular context

Selects

Binds

15 of 30

Element Definition

16 of 30

Terminology Sub-system

Code System:

Defines a set of concepts with a coherent meaning��Code�Display

Definition

Element Definition: �Type and Value set reference

Value Set:

A selection of a set of codes for use in a particular context

Selects

Binds

Element: �code/�Coding/�CodeableConcept

Refers to

Conforms

17 of 30

Coding

Each “use of a code” (a reference into a code system) has 4 properties:

  • system: URL of the code system
  • version: stated version of the code �system (optional)
  • code: the symbol defined for the �concept (code/expression)
  • display: a human readable representation �of the concept (optional – debugging/display)

18 of 30

Examples

  • Code: "status" : "confirmed"
  • Coding: {� "system": "http://www.nlm.nih.gov/research/umls/rxnorm",� "code": "C3214954",� "display": "cashew nut allergenic extract Injectable"�}
  • CodeableConcept: {� "coding": [{ � "system": "http://snomed.info/sct",� "code": "39579001",� "display": "Anaphylactic reaction"� }],� "text" : "Anaphylaxis"�}

19 of 30

Binding Strength

required

To be conformant, instances of this element SHALL include a code from the specified value set

extensible

To be conformant, instances of this element must include a code from the specified value set if any of the codes within the value set can apply to the concept being communicated.

If the valueset does not cover the concept (based on human review), alternate codings (from different code systems, including local ones) or (data type allowing) text) may be included instead.

preferred

Instances are encouraged, to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant

example

Instances are not expected or even encouraged to draw from the specified value set. The value set merely provides examples of the types of concepts intended to be included

20 of 30

Expansions

  • Lots of power & complexity in the rules for what’s in a value set
    • Late binding of versions
    • Hard to compute expressions (ECL)
    • Modular code systems
    • Human Language variability
  • It’s intended for specialist software
  • Most software ‘just wants to get the list of actual codes’
  • That’s the ‘expansion’ of the value set – the outcome of applying the rules against actual code systems and local context

21 of 30

Concept Map

  • A set of mappings from one code system to another
  • Defined for use in a known context
  • Sometimes take advantage of local rules
  • Many to Many mapping
    • Mappings may depend on properties or produce multiple properties
  • Rules for unmapped codes

22 of 30

Terminology Subsystem

Value Set

  • Enumerated code lists
  • Code System filters
  • Expansions

Functions

  • UI Lookup
  • Validation
  • Subsumption tests

ConceptMap

  • Mapping between terminologies
  • Mapping between models

Functions

  • Translations
  • Closure Table maintenance

23 of 30

Terminology Server: Expand

  • What codes are in this value set?
    • E.g. populate a combobox
    • Answer can be really complicated to determine
  • Pass:
    • Identity of valueset
    • Details of context, text filter
    • What kind of response wanted
  • Get back:
    • List of codes
    • Possibly heirarchical

24 of 30

Terminology Server: Validate

  • Is this code valid in this value set?
    • E.g. check a code
    • Decide whether to take an action
  • Pass:
    • Identity of valueset
    • Details of context + code
    • What kind of checking wanted
  • Get back:
    • True | false + errors description
    • Display in language of choice

25 of 30

Terminology Server: Subsumes

  • Is this code subsumed by that code
    • E.g. decision making (simpler case than the previous)
    • Answer can be really complicated to determine
  • Pass:
    • Identity of valueset
    • Two codes
  • Get back:
    • True | false | unknown
  • Note: codes do not need to be in the same code system

26 of 30

Terminology Server: Translate

  • Can I get an equivalent for this code in some other code system
    • E.g. fill out a form / message
    • Prepare for a decision making service
  • Pass:
    • Code, Identity of target code system
    • Details of context, maybe a concept map reference
  • Get back:
    • 0 or matching codes
    • Details about the matching

27 of 30

Terminology Server: Closure

  • Support SQL joins.
    • Which (resources in set) have a code that (meets criteria)
    • Terminology server knows ‘meets criteria’
    • SQL Server has to evaluate the joins
    • Build a ‘closure table’ incrementally. (why?)
  • Pass:
    • Identity of closure table
    • Code added to the closure table
  • Get back:
    • List of new relationships between codes
    • Add to your sql table, and join across it

28 of 30

Using a terminology service

  • Just need to know value set URLs (and versions)
    • And code system and concept map URLs
  • And you need to know Codings (system + version + code + display)
  • Let the terminology system deal with anything else
  • You don’t have to write a sub-system for managing them
  • You don’t have to ‘import’ them
  • You don’t have to have a specialist team

29 of 30

Terminology Service

  • Just make it simple
  • Let the weirdo experts �handle terminology details
  • App writers write great�apps instead
  • There are good servers �available today – use one!

30 of 30

Lord of the Terms

  • Your terminology usage tells p�eople about your values
  • Invest in good terminology�management
  • Use a terminology server
  • You too can rule the known �universe of health IT