Skip to main content
Version: v0.0.4

Interface: Coding

A single coded value - a code drawn from a code system, optionally versioned and displayed.

Models FHIR R4 Coding. system is the code system's canonical URI (e.g. http://loinc.org), not a mnemonic or OID - use ../systems/resolve.resolveSystem to canonicalize before constructing one. system is optional because a raw wire code sometimes arrives without one; the engine surfaces that rather than inventing a system.

Example

import { coding } from "@cosyte/terminology";

const c = coding({ system: "http://loinc.org", code: "2160-0", display: "Creatinine" });
c.code; // => "2160-0"

Properties

code

readonly code: string

The symbol in the code system's syntax. Required - a coding without a code is meaningless.


display?

readonly optional display?: string

The human-readable label. Carried verbatim from the source; never fabricated by the engine.


system?

readonly optional system?: string

The code system's canonical URI (e.g. http://snomed.info/sct). Optional when unknown.


version?

readonly optional version?: string

The code system version this code is drawn from, when known (mappings are release-scoped).