HL7-Definition V2

HL7 v2.7 - RPT - Repeat Pattern

The repeat pattern data type should be used where it is necessary to define the frequency at which an event is to take place. This data type provides a way to define repeat pattern codes "on the fly". The repeat pattern code is equivalent to the TQ data type, component 2, sub-component 1 (repeat pattern). The additional components define the meaning of the repeat pattern code. Components 2 - 10 are used to define relatively simple repeat patterns. Component 11 is provided to define complex repeat patterns. This data type forms a bridge between the 2.x Repeat Pattern concept from Quantity/Timing, and the Version 3.0 GTS General Timing Specification. Component 1 is the 2.x concept of repeat pattern. Components 2-7 are derived from the version 3.0 data type PIVL. Components 8-10 are derived from the version 3.0 EIVL data type. If a repeat pattern cannot be defined using components 2-10, then component 11, General Timing Specification is provided. This allows the full literal form of the version 3.0 GTS to be specified. When using the RPT, if an application doesn't recognize the code in component 1, then it may attempt to determine the appropriate frequency using the remaining components. If the application does recognize the code in component 1, the application is not required to determine the frequency from the remaining components. Use Case: The use case supporting this proposal is the need to define repeat patterns on the fly while placing an order. The TQ data type did not have the capability to define the meaning of a repeat pattern on the fly. To get around this problem, vendors have implemented a variety of solutions to solve this issue. One way was to add Z-components to the TQ data type to transmit information about the repeat pattern. Another solution was to attempt to parse the repeat pattern code in an attempt to decipher what the code meant. Examples: |Q1H&Every 1 Hour&HL7xxx^^^^1^h| |Q2J2&Every second Tuesday&HL7xxx^DW^2^^2^wk| |BID&Twice a day at institution specified times&HL7xxx^^^^12^h^Y| |QAM&Every morning at the institution specified time&HL7xxx^HD^00^11^1^d^Y| |QHS&Every day before the hours of sleep&HL7xxx^^^^1^d^^AHS| |ACM&Before Breakfast&HL7xxx^^^^^^^ACM|

Field Length Data Type Optionality Repeatability Table
RPT.1 - Repeat Pattern Code0CWE R -0335
Length0
OptionalityRequired
RepeatabilityNot repeatable
RPT.2 - Calendar Alignment2ID O -0527
Length2
OptionalityOptional
RepeatabilityNot repeatable
RPT.3 - Phase Range Begin Value0NM O -
Length0
Data TypeNM - Numeric
OptionalityOptional
RepeatabilityNot repeatable
RPT.4 - Phase Range End Value0NM O -
Length0
Data TypeNM - Numeric
OptionalityOptional
RepeatabilityNot repeatable
RPT.5 - Period Quantity0NM O -
Length0
Data TypeNM - Numeric
OptionalityOptional
RepeatabilityNot repeatable
RPT.6 - Period Units0CWE C -
Length0
OptionalityConditional
RepeatabilityNot repeatable
RPT.7 - Institution Specified Time1ID O -0136
Length1
OptionalityOptional
RepeatabilityNot repeatable
RPT.8 - Event3ID O -0528
Length3
OptionalityOptional
RepeatabilityNot repeatable
RPT.9 - Event Offset Quantity0NM O -
Length0
Data TypeNM - Numeric
OptionalityOptional
RepeatabilityNot repeatable
RPT.10 - Event Offset Units0CWE C -
Length0
OptionalityConditional
RepeatabilityNot repeatable
RPT.11 - General Timing Specification0GTS O -
Length0
OptionalityOptional
RepeatabilityNot repeatable