QRF — Query Filter
Appears after QRD in QRY messages to provide additional filter criteria. Optional companion to QRD.
The QRF segment provides additional filtering criteria for queries defined by QRD. It allows specification of date ranges, user qualifiers, and other selection criteria for the query results. This segment is deprecated in HL7 v2.5+ along with QRD.
Real-World Context
QRF is the where clause of legacy HL7 queries. It narrows down what QRD requests by adding date ranges and additional qualifiers. In practice, you see this most often in legacy lab result query interfaces. The date range fields (QRF.2 and QRF.3) are the most commonly used and most commonly misconfigured.
Field Reference
Click any row to see the full description, common values, and troubleshooting tip.
| # | Field Name | Type | Req | Max Len | |
|---|---|---|---|---|---|
| 1 | Where Subject Filter | ST | R | 20 | ▶ |
| 2 | When Data Start Date/Time | TS | O | 26 | ▶ |
| 3 | When Data End Date/Time | TS | O | 26 | ▶ |
| 4 | What User Qualifier | ST | O | 60 | ▶ |
| 5 | Other QRY Subject Filter | ST | O | 60 | ▶ |
| 6 | Which Date/Time Qualifier | ID | O | 12 | ▶ |
| 7 | Which Date/Time Status Qualifier | ID | O | 12 | ▶ |
| 8 | Date/Time Selection Qualifier | ID | O | 12 | ▶ |
| 9 | When Quantity/Timing Qualifier | TQ | O | 60 | ▶ |
| 10 | Search Confidence Threshold | NM | O | 10 | ▶ |
Example Segment
1QRF||LAB|20260101000000|20260310235959|||COL
Related Segments
Parse messages with QRF in real time
Paste any HL7 message into our free viewer. Decodes every segment and field instantly, client-side.
Open HL7 Message Viewer →Need HL7 mapping templates?
The HL7 Integration Toolkit includes field mapping worksheets, interface spec templates, and a go-live checklist for every major HL7 message type.
View HL7 Integration Toolkit →