Skip to main content
Version: v0.0.4

Function: resolveNdc()

resolveNdc(graph, ndc): NdcResult

Resolve an NDC (National Drug Code) to its RXCUI in the loaded release, carrying the temporal status and the as-of release. NDC↔RXCUI is many:1 and changes across releases, so an NDC present in the release is active as of that release; an absent NDC is a typed NdcUnmapped, never a guessed RXCUI.

Parameters

graph

RxNormGraph

A loaded RxNormGraph (load with sat supplied to populate NDC attributes).

ndc

string

The NDC (as it appears in the release, e.g. 11-digit).

Returns

NdcResult

An NdcResult - a resolution with status + asOf, or a typed absence.

Example

import { loadRxNormGraph, resolveNdc } from "@cosyte/terminology";

const g = loadRxNormGraph({
conso: "2|ENG||||||||||RXNORM|SCD||lisinopril 10 MG Oral Tablet||N||",
rel: "",
sat: "2||||||||NDC|RXNORM|00000000000|N||",
version: "RXNORM_2026AA",
});
const r = resolveNdc(g, "00000000000");
r.resolved && r.status; // => "active"