Function: primaryCode()
primaryCode(
u):string|undefined
The primary code to key a result on: the inline LOINC candidate when a vendor
supplied one, otherwise the local (vendor) code. Returns undefined when the
field carries no code at all (name-only or empty): never a guess.
Parameters
u
A recognized Universal Test ID.
Returns
string | undefined
The primary code, or undefined.
Example
import { primaryCode, recognizeUniversalTestId } from "@cosyte/astm";
primaryCode(recognizeUniversalTestId(["2345-7", "Glucose", "LN", "687"])); // "2345-7"