Skip to main content
Version: v0.0.4

Function: loadComplexMap()

loadComplexMap(input): ComplexMap

Load a SNOMED→ICD-10-CM complex map from caller-supplied rows or a raw RF2 refset into an immutable ComplexMap, keyed by source concept and ordered by (group, priority).

Liberal on load: a structurally unusable RF2 row is skipped and surfaced as a warning; only an unusable source (empty content, header missing required columns) is a fatal FATAL_CODES.TERM_CROSSWALK_MALFORMED. Ships no SNOMED CT release or refset - the rows are the caller's, under their own licence.

Parameters

input

ComplexMapInput

Structured rows, or a raw RF2 extended-map refset content.

Returns

ComplexMap

The immutable ComplexMap.

Throws

TERM_CROSSWALK_MALFORMED when the source is structurally unusable.

Example

import { loadComplexMap } from "@cosyte/terminology";

const map = loadComplexMap({
format: "rows",
rows: [
{ source: "195967001", group: 1, priority: 1, rule: "TRUE", advice: "ALWAYS J45.909", target: "J45.909", category: "447637006" },
],
});
map.count; // => 1