Components: <name of field (ST)> ^ <relational operator (ID)> ^ <value (ST)> ^ <relational conjunction (ID)>
Definition: This field indicates the conditions that qualify the rows to be returned in the query response. (This field conveys the same information as the "WHERE" clause in the corresponding SQL expression of the query, but is formatted differently.)
The name of the field that is participating as a qualifier (usually the "key"). Refer to Section 2.8.30, "QIP - query input parameter list", for field naming conventions.
Refer to HL7 table 0209 - Relational operator for valid values.
Table 0209 - Relational operator
Relational operator |
Value |
EQ |
Equal |
NE |
Not Equal |
LT |
Less than |
GT |
Greater than |
LE |
Less than or equal |
GE |
Greater than or equal |
CT |
Contains |
GN |
Generic |
The value to which the field will be compared.
Refer to HL7 table 0102 - Relation conjunction for valid values. The relational conjunction, defined as follows: If more than one comparison is to be made to select qualifying rows, a conjunction relates this repetition of the field to the next.
Table 0210 - Relational conjunction
Relational conjunction |
Note |
AND |
Default |
OR |
When applied to strings, the relational operators LT, GT, LE, and GE imply an alphabetic comparison.
A "generic" comparison selects a record for inclusion in the response when the beginning of the designated field matches the select string.
Where a repeating field is specified as an operand, a match on any instance of that field qualifies the row for inclusion in the response message.
AND takes precedence over OR. More sophisticated precedence rules require that the query be expressed as an embedded query language message or a stored procedure query message (see Section 2.19, "ENHANCED MODE QUERY MESSAGES," and also Sections 2.24.16, "EQL - embedded query language segment," and 2.24.20, "SPR - stored procedure request definition segment."