Repeatable Field Segments

The Segments table in the HL7 Access database contains a column for the last field of segments (ADD, RDT, and QPD) that Microsoft BizTalk Accelerator for HL7 (BTAHL7) defines as repeatable (Last_field_repeatable = True). BTAHL7 does not support ADD. However, both RDT and QPD are present to query tables and respond with table values. The following sample demonstrates how BTAHL7 handles these columns.

A client submits the following query and indicates that the client wants an immediate response by setting RCP-1-Response priority to "I":

MSH|^&~\|PCR|Gen Hosp|PIMS||199811201400-0800||QBP^Q42^QBP_Q13|ACK9901|P|2.4||||||||  
QPD|Q42^Tabular Dispense History^HL7nnn|Q0010|555444222111^^^MPI^MR| |19980531|19990531|  
RCP|I|999^RD|  
RDF|3|PatientList^ST^20~PatientName^XPN^48~MedicationDispensed^ST^40~RXD.3^TS^26  

The server responds one minute later with the following message:

MSH|^&~\|PIMS|Gen Hosp|PCR||199811201401-0800||RTB^K42^RTB_K13|8858|P|2.3||||||||  
MSA|AA|8699|  
QAK|Q010|OK|Q42^Tabular Dispense History^HL7nnn|4  
QPD|Q42^Tabular Dispense History^HL7nnn|Q0010|555444222111^^^MPI^MR||19980531|19990531|  
RDF|7|PatientId^CX^20~PatientName^XPN^48~OrderControlCode^ID^2~ MedicationDispensed^CE^100~DispenseDate^TS^26~QuantityDispensed^NM^20~ OrderingProvider^XCN^120  
RDT|555444222111^^^MPI^MR|Everyman^Adam|RE|525440345^Verapamil Hydrochloride 120 mg TAB^NDC |199805291115-0700|100|77^Hippocrates^Harold^H^III^DR^MD  
RDT|555444222111^^^MPI^MR|Everyman^Adam|RE|00182196901^VERAPAMIL HCL ER TAB 180MG ER^NDC |19980821-0700|100|77^Hippocrates^Harold^H^III^DR^MD  
RDT|555444222111^^^MPI^MR|Everyman^Adam|RE|00172409660^BACLOFEN 10MG TABS^NDC |199809221415-0700|10|88^Semmelweis^Samuel^^^DR^MD  
RDT|555444222111^^^MPI^MR|Everyman^Adam|RE|00054384163^THEOPHYLLINE 80MG/15ML SOLN^NDC|199810121145-0700|10|99^Lister^Lenora^^^DR^MD  

From the example, you see that QPD and RDT are custom/site defined. The HL7 specification defines QPD and RDT segments as follows.

QPD - Query Parameter Definition

The following table shows how the HL7 specification defines QPD.

SEQ LEN DT OPT RP/# TBL# ITEM# ELEMENT NAME
1 250 CE R 0471 01375 Message Query Name
2 32 ST C 00696 Query Tag
3-n 256 Varies 01435 User parameters in successive fields

RDT - Table Row Data

The following table shows how the HL7 specification defines RDT.

SEQ LEN DT OPT RP/# TBL# ITEM# ELEMENT NAME
1-n Variable Variable R 00703 Column Value

BTAHL7 interprets QPD and RDT as site-defined values that can repeat. Since BTAHL7 does not fix the data types and other details, BTAHL7 treats QPD.3 and RDT.1 as String data types in the schemas. You may have to modify these schemas depending on your own site conditions.

See Also

Using HL7 2.X Schemas