Function: resolveSystem()
resolveSystem(
id):ResolveSystemResult
Resolve a code-system identifier to its canonical SystemIdentity.
Accepts, in order of attempt: a canonical URI (case-insensitive), a v2-XXXX mnemonic or a
v2 table URI/OID (resolved structurally), a bare or urn:oid:-prefixed OID, or an HL7 v2
Table 0396 mnemonic. Whitespace is trimmed. An empty or unrecognized identifier yields a typed
UnknownSystem - the resolver never invents a URI.
Parameters
id
string
The identifier (canonical URI, OID, urn:oid: OID, or mnemonic).
Returns
The resolved SystemIdentity, or { unknown: true, input }.
Example
import { resolveSystem } from "@cosyte/terminology";
resolveSystem("2.16.840.1.113883.6.1"); // => { url: "http://loinc.org", … }
resolveSystem("SCT"); // => { url: "http://snomed.info/sct", … }
resolveSystem("http://example.com/nope"); // => { unknown: true, input: "http://example.com/nope" }