Skip to main content
Version: v0.0.4

Interface: UniversalTestId

A recognized ASTM Universal Test ID. All components are surfaced verbatim (already escape-decoded by the tokenizer); nothing is looked up.

Example

import { recognizeUniversalTestId } from "@cosyte/astm";
const u = recognizeUniversalTestId(["", "", "", "687"]);
u.localCode; // "687"
u.provenance; // "local-code"

Properties

codingScheme?

readonly optional codingScheme?: string

Component 3 - the coding-scheme selector, when present.


components

readonly components: readonly string[]

The field's components, verbatim and in order.


localCode?

readonly optional localCode?: string

Component 4 - the vendor/local code: the primary identifier when no inline LOINC is given.


loincCandidate?

readonly optional loincCandidate?: string

Component 1 when populated - a candidate LOINC (provenance only, never validated).


provenance

readonly provenance: UniversalTestIdProvenance

Where the primary identifier came from.


testName?

readonly optional testName?: string

Component 2 - the test / battery name, when present.