-
Notifications
You must be signed in to change notification settings - Fork 0
Use Cases
Four end-to-end scenarios. Each starts from a client created as in Getting-Started and imported as holon. For method details, see API-Reference; for terms, see Concepts.
You hold a patient's active medications as concept ids and need to know which pairs interact before you sign off.
// screen-medications.ts
import { holon } from "./client";
const medications = [11289, 1191, 197361];
const screen = await holon.interactions.checkList(medications);
console.log(screen);checkList screens the whole set in one call, so you do not fan out pairwise checks yourself. When you only have two drugs, interactions.check(a, b) returns { hasInteraction, interactions } for that pair.
An inbound record carries a RxNorm code and your downstream system speaks SNOMED. Translate before you store.
// rxnorm-to-snomed.ts
import { holon } from "./client";
const result = await holon.mappings.translate("197361", "RxNorm", "SNOMED");
console.log(result.source, result.target);
console.log(result.mappings);translate returns { source, target, mappings }. Drop the third argument to get mappings into every available vocabulary instead of only SNOMED.
You have a lab result reported with a LOINC code, plus the patient's age and sex, and you need to read the value as high, low, or in range for that patient.
// interpret-lab.ts
import { holon } from "./client";
const ranges = await holon.referenceRanges.getByLoincCode("2093-3", 45, "male");
console.log(ranges);age and sex are optional. Supplying them narrows the range to that demographic; omitting them returns the unadjusted range. When you hold a HOLON measurement concept id instead of a LOINC code, use referenceRanges.getByConceptId(conceptId).
You have two sets of phenotype concept ids (two patients, or a patient and a candidate condition) and want a single similarity score, since the codes will not line up one to one.
// compare-phenotypes.ts
import { holon } from "./client";
const patientA = [9826, 4245975];
const patientB = [9826, 31967];
const match = await holon.phenotype.match(patientA, patientB);
console.log(match);The score tells you how alike the two sets are, which is the signal you want where an exact code match would return nothing.