Previous Page TOC Index Next Page

2.24.16 EQL - embedded query language segment

The EQL segment is used to define queries using select statements based on the query language of choice (e.g., SQL). Refer to the functional chapters for the lists of HL7-defined EQL select statements.

Figure 2-23. EQL attributes

SEQ

LEN

DT

OPT

RP/#

TBL#

ITEM#

ELEMENT NAME

1

32

ST

O



00696

Query Tag

2

1

ID

R


0106

00697

Query/ Response Format Code

3

60

CE

R



00709

EQL Query Name

4

4096

ST

R



00710

EQL Query Statement

2.24.16.0 EQL field definitions

2.24.16.1 Query tag (ST) 00696

Definition: This field may be valued by the initiating system to identify the query, and may be used to match response messages to the originating query. If it is valued, the responding system is required to echo it back as the first field in the query acknowledgment segment (QAK). This field differs from MSA-2-message control ID in that its value remains constant for each message (i.e., all continuation messages) associated with the query, whereas MSA-2-message control ID may vary with each continuation message, since it is associated with each individual message, not the query as a whole.

2.24.16.2 Query/response format code (ID) 00697

Definition: This field refers to HL7 table 0106 - Query/response format code for valid values.

2.24.16.3 EQL query name (CE) 00709

Components: <identifier (ID)> ^ <text (ST)> ^ <name of coding system (ST)> ^ <alternate identifier (ID)> ^ <alternate text (ST)> ^ <name of alternate coding system (ST)>

Definition: This field contains the name of the query. Where the default HL7 coding system is used, these names are assigned by the function-specific chapters of this specification. The values for this field are equivalent to those of SPR-3-stored procedure name (see Section 2.24.20, "SPR - stored procedure request definition segment").

2.24.16.4 EQL query statement (ST) 00710

Definition: This field contains the EQL select statement that is the basis of the query.

Fields are designated by the "@" symbol concatenated with the HL7 item number for the field. If the field is divided into components, the designation may be suffixed with ".nn," to identify a particular component (a suffix of ".3" indicates the third component of the field); otherwise, the whole field is assumed. If the field is further divided into subcomponents, the designation is suffixed with ".nn.mm," which identifies the component and subcomponent requested by relative position.

Site-specific fields may be used, provided that they begin with the letter "Z." Note that in this case site-defined "z"-item numbers that do not conflict with HL7 items numbers must be negotiated as part of the site specification.

Values for this field are defined in the function-specific chapters of this specification.

Note: If the "@" is being used as one of the delimiter characters defined in MSH-2-encoding characters, it must be "escaped ." (See Section 2.9.1,"Formatting codes".)

Previous Page TOC Index Next Page