Interface: RepeatPattern
An order/medication timing repeat pattern (HL7 Table 0335): the frequency/SIG field (TQ1-3, or the legacy embedded TQ interval RI.1).
Safety contract. code is the decoded field value (HL7 escapes are
unescaped as with every field read) and is never resolved to clock times,
normalized, or mapped to a different frequency: reading Q6H as "daily"
or silently dropping a BID changes the administered dose count, a
transcription-class harm. kind/interval are convenience provenance ONLY;
code is the authoritative value.
Example
import type { RepeatPattern } from "@cosyte/hl7";
const q6h: RepeatPattern = { code: "Q6H", kind: "parametric", interval: { count: 6, unit: "H" } };
const bid: RepeatPattern = { code: "BID", kind: "named" };
Properties
code
readonlycode:string
The Table-0335 repeat-pattern code exactly as authored (e.g. "Q6H", "BID"). Never normalized.
interval?
readonlyoptionalinterval?:object
For a "parametric" Q<integer><unit> template only: the load-bearing
integer and its unit letter (S/M/H/D/W/L, or J for
day-of-week). OMITTED for "named"/"unknown" patterns. Informational,
code remains authoritative.
count
readonlycount:number
unit
readonlyunit:string
kind
readonlykind:RepeatPatternKind
Provenance classification of code: never used to resolve a schedule. See RepeatPatternKind.