Skip to main content
Version: v0.0.2

Function: genericFor()

genericFor(graph, rxcui): RxNormNavResult

The generic form(s) of a branded concept - an SBD/BN/BPCK tradename_of its generic. The authored forward edge; the engine never inverts a has_tradename edge to synthesize this.

Parameters

graph

RxNormGraph

A loaded RxNormGraph.

rxcui

string

The branded concept.

Returns

RxNormNavResult

The generic concept(s) (possibly empty), or a typed unknown source.

Example

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

// "SBD(2) tradename_of SCD(1)": subject=RXCUI2=2, object=RXCUI1=1.
const g = loadRxNormGraph({
conso: "1|ENG||||||||||RXNORM|SCD||lisinopril 10 MG Oral Tablet||N||\n2|ENG||||||||||RXNORM|SBD||lisinopril 10 MG Oral Tablet [Zestril]||N||",
rel: "1|||RN|2|||tradename_of|||RXNORM||||||",
});
genericFor(g, "2").found; // => true