Function: identifier()
identifier(
rng,typeCode?):SyntheticIdentifier
A synthetic identifier (MRN / account / member id) scoped to the synthetic assigning authority.
There is no reserved MRN range, so non-collision is guaranteed by the namespace, not the value: the
identifier lives under a SYNTH authority no real facility uses.
Parameters
rng
The seeded generator.
typeCode?
"MR" | "AN" | "MB"
The HL7 identifier type: MR (default), AN, or MB.
Returns
Example
import { createRng, identifier } from "@cosyte/synth";
identifier(createRng(1), "MR"); // { value, typeCode: "MR", assigningAuthority: "COSYTE-SYNTH", ... }