NEWFree ROI Calculators — quantify what prior auth and siloed data are costing your organization.Prior Auth ROI Siloed Data ROI
HL7 v2Data Type6 min read

HL7 RPT Data Type: Repeat Pattern

The RPT (Repeat Pattern) data type was introduced in HL7 v2.5 to replace the older RI composite with a richer expression of schedule semantics. Where RI carries a mnemonic code plus a list of clock times, RPT decomposes the schedule into a coded pattern, a calendar alignment, an optional phase range, an explicit period quantity and units (UCUM-aligned), an institution-specified-time flag, an event anchor (HS, WAKE, PC), and an event offset. RPT is the recommended carrier of repeat-pattern semantics in TQ1-3 in v2.5+ messages.

Purpose

RI cannot express schedules like "every 36 hours" or "30 minutes before bedtime" without bending the value set. RPT was designed to carry those cleanly: RPT.5 gives an explicit numeric period, RPT.6 names its units in UCUM-style codes (s, min, h, d, wk, mo, a), and RPT.8 / RPT.9 anchor the schedule to an event with a signed offset. The result is something a scheduling engine can compute on directly without a lookup table.

Component table

Source: HAPI HL7v2 v2.8.1 javadocs (RPT). Length is shown as because v2.7+ deprecated fixed maximum lengths in favour of conformance-profile constraints.

CompNameSub-typeLengthRequiredDescription
RPT.1Repeat Pattern Codecwe (HL70335)OCoded repeat pattern wrapped as CWE so the code system travels with the value.
RPT.2Calendar Alignmentid (HL70527)OCD day-of-month, CH hour-of-day, CW day-of-week.
RPT.3Phase Range Begin ValuenmOLower bound of the phase window (e.g. minute 0 of an hour).
RPT.4Phase Range End ValuenmOUpper bound of the phase window.
RPT.5Period QuantitynmONumeric period magnitude (e.g. 6 for every 6 hours).
RPT.6Period Unitsis (HL70530)OUCUM-aligned units: s, min, h, d, wk, mo, a.
RPT.7Institution Specified Timeid (HL70136)OY / N — true if the institution dictates the exact clock time.
RPT.8Eventid (HL70528)OEvent anchor: HS (bedtime), WAKE, PC (after meals), etc.
RPT.9Event Offset QuantitynmOSigned offset from RPT.8 in minutes (-30 = 30 minutes before).

Most-used components

  • RPT.5 Period Quantity and RPT.6 Period Units — together specify the recurrence numerically (e.g. 6 / h).
  • RPT.1 Repeat Pattern Code — optional mnemonic for human readers (Q6H).
  • RPT.7 Institution Specified Time — flips the schedule from "patient choice" to "facility-dictated."
  • RPT.8 / RPT.9 — anchor doses to events like bedtime or meals with a precise offset.

Where it's used

  • TQ1-3 Repeat Pattern — primary home, replacing the RI shape from v2.4 and earlier.
  • TQ1-12 explicit-times list still carries clock-pinned times when RPT.7 is Y.
  • Vendor Z-segments that adopted RPT verbatim for richer schedule expression.

Version differences

  • HL7 v2.5 — RPT introduced with the nine-component layout above.
  • HL7 v2.5.1 / v2.6 — value sets HL70527 (calendar alignment), HL70528 (event), and HL70530 (period units) extended.
  • HL7 v2.7 — fixed maximum lengths deprecated; structure unchanged.
  • HL7 v2.7.1 / v2.8 / v2.8.1 / v2.8.2 — structure stable. HAPI v2.8.1 javadoc shows the nine-component layout above.

Common mistakes

  • Populating RPT.5 without RPT.6 — a bare 6 is ambiguous (6 minutes? 6 hours? 6 days?).
  • Using non-UCUM unit codes in RPT.6 (hr, H, hours) — HL70530 mandates the lowercase UCUM-aligned forms.
  • Setting RPT.8 = HS and RPT.9 = 30 (positive) when the intent is "30 minutes before bedtime" — RPT.9 is signed, so use -30.
  • Forgetting RPT.7 when the institution dictates the clock — receivers default to "patient choice" and may reschedule.
  • Mixing RPT.1 and RPT.5/RPT.6 inconsistently (RPT.1 = Q6H but RPT.5/RPT.6 = 8/h) — the mnemonic and the explicit period must agree.

Examples

Minimal — every 6 hours:

^^^^6^h

Populated — every 6 hours for 5 days, institution does not dictate the clock:

^^^^6^h^N^^

Event-anchored — 30 minutes before bedtime:

^^^^^^^HS^-30

In context — TQ1 segment carrying an RPT-shaped pattern at 30 minutes before bedtime:

MSH|^~&|EHR|MERCY|PHARM|MERCY|20260624075500||OMP^O09^OMP_O09|MSG0213|P|2.8.1
ORC|NW|ORD-5503^MERCY|||IP
TQ1|1|1^tablet^UCUM|^^^^^^^HS^-30||1H|20260624200000|20260701200000|R
RXO|198211^Melatonin 3 mg oral tablet^RXNORM|3^mg^UCUM||TAB^Tablet^HL70162|PO^Oral^HL70162

Common pitfall — unit code drift:

^^^^6^hr^N^^

hr is not in HL70530 — the value set lists h. Receivers that strictly validate HL70530 will drop RPT.6 or reject the segment.

FHIR mapping

The v2-to-FHIR IG publishes ConceptMap-datatype-rpt-to-timing. RPT maps cleanly into Timing.repeat:

RPT componentFHIR elementNotes
RPT.5 Period QuantityTiming.repeat.periodNumeric magnitude.
RPT.6 Period UnitsTiming.repeat.periodUnitUCUM time unit.
RPT.1 Repeat Pattern Codeinformational — often dropped or surfaced via Timing.codeMnemonic for humans.
RPT.8 EventTiming.repeat.when[]HS, WAKE, PC translate to the FHIR event-timing value set.
RPT.9 Event Offset QuantityTiming.repeat.offsetMinutes; sign carried by when semantics (FHIR offset is always positive; before vs after lives in when).
RPT.2 Calendar AlignmentTiming.repeat.dayOfWeek / extensionDay-of-week alignment maps to dayOfWeek; day-of-month uses an extension.

Engine considerations

  • HL70335 → HL70530 translation: when an RI-shaped Q6H arrives and the engine is producing RPT, expand it to (period=6, periodUnit=h) so downstream consumers do not have to redo the decode.
  • Sign handling in RPT.9: NM permits a leading -. Engines that strip signs (treating the field as unsigned) will turn "30 minutes before bedtime" into "30 minutes after."
  • Calendar alignment is easy to ignore but matters for weekly schedules: CW plus RPT.3/RPT.4 expresses "Monday–Friday only."
  • RPT.7 = Y is a contract with the facility, not a hint. If the engine reschedules around institution-specified times, audit trails are essential.

How Vorro parses and produces RPT

Vorro parses RPT into the same internal schedule object used for RI, with extra slots for calendar alignment, event anchor, and signed offset. UCUM normalization happens on inbound — common drift (hrh, Hh) is corrected with provenance recorded so the source can be coached toward HL70530.

On outbound, Vorro prefers RPT for v2.5+ partners when the schedule cannot be expressed cleanly as RI (any non-mnemonic period, any event-anchored schedule). Both RPT.5/RPT.6 (the numeric form) and RPT.1 (the mnemonic) are populated when both are known, so a human reader and a machine reader see the same schedule.

Sources

← Back to HL7 v2 Guide

Ready to Integrate This Into Your Workflow?

Talk to a Vorro expert about implementing HL7 v2 in your specific environment.

Browse HL7 v2 Guides
HL7 RPT Data Type: Repeat Pattern | Vorro Academy | Vorro