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 content - the rows are the caller's, under their own licence.
Parameters
input
Structured rows, or a raw RF2 extended-map refset content.
Returns
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