NEWFree ROI Calculators — quantify what prior auth and siloed data are costing your organization.Prior Auth ROI Siloed Data ROI
HL7 v2Segment5 min read

HL7 URL: service-endpoint URL in a query (identity note)

Important identity note up front: there is no segment named URL in HL7 v2.5.1. The HAPI v2.5.1 segment package contains no URL class (verified against the segment package summary), and no HL7 v2 version defines a URL message segment. "URL" in HL7 refers to a data type (a Uniform Resource Locator / URI value), not a segment. This page carries the bare code url as its slug, but the site blueprint refers to it as /url-seg precisely to keep it distinct from the URL data type page. The honest, useful content here is: where service-endpoint URLs actually live in HL7 v2 query traffic, and what "URL" really is.

Purpose

The goal of this page is to prevent a common mistake: expecting a URL|... segment line. HL7 v2 does not transmit a query's service endpoint in a dedicated URL segment. Instead:

  • The URL/URI data type is a value that may appear inside fields of other segments.
  • Query result URLs (for example a link a responder returns) travel as ordinary field values inside a tabular response defined by RDF and its RDT data rows, or inside a reference/pointer field.
  • Transport endpoints (where a message is sent) are matters of the lower transport layer or, at the message level, the receiving-application and facility fields of MSH — not a URL segment.

Used in

There is no URL segment, so it is "used in" nothing as a segment. Endpoint or URL values appear in:

  • Tabular query responses built with RDF (row definition) and RDT (row data), where a column can carry a URL string.
  • Query framework messages where QPD states the query and RCP controls the response. See QBP and the query framework.
  • Reference pointer fields (RP data type) and network address fields elsewhere in the standard.

Field-by-field reference

There are no segment fields to list, because URL is not a segment. For completeness, the table records the actual status verified against the HAPI v2.5.1 segment package. Source: HAPI HL7v2 v2.5.1 javadocs (segment package summary).

SeqNameData TypeLengthReqRepeatTable #Description
(no URL segment defined)HL7 v2.5.1 defines no URL message segment. URL is a data-type / field-value concept. Use RDF result columns or reference-pointer fields to carry a URL.

Most-used fields

Not applicable — no segment fields exist. The relevant construct is the URL/URI value placed inside another segment's field (for example a reference-pointer field or an RDT result column).

Version differences (2.3 to 2.8.2)

Across every published HL7 v2 version from 2.3 through 2.8.2, no URL segment is defined. What has evolved is the treatment of URL-bearing data types: earlier versions expressed web references through the RP (reference pointer) data type and free-text fields, while later work in HL7 (and its FHIR successor) formalized dedicated URI/URL data types. The query and tabular-response segments (QPD, RCP, RDF) are the stable machinery a v2 endpoint would use to return a URL value.

Common mistakes

  • Expecting a URL|... segment. It does not exist; parsers will reject or misroute such a line.
  • Confusing the URL segment (none) with the URL data type (a value). This page uses the /url-seg disambiguation for exactly that reason.
  • Trying to carry a service endpoint at the message level. Routing is a transport / MSH concern, not a body segment.

Examples

There is no valid standalone URL segment to show. The examples below show how a URL value actually travels in v2.

A URL returned as a column in a tabular query response (RDF defines the row, RDT carries the data):

RDF|2|PatientName^ST^20~ReportLink^ST^120
RDT|DOE^JANE|https://portal.example.org/reports/9f2c

Annotated breakdown:

RDF|2|PatientName^ST^20~ReportLink^ST^120
    | |            |            |
    | |            |            +-> second column: ReportLink, ST, length 120 (holds the URL)
    | |            +--------------> first column: PatientName, ST, length 20
    | +---------------------------> two columns per row
    +-----------------------------> RDF segment ID (row definition)

RDT|DOE^JANE|https://portal.example.org/reports/9f2c
    |         |
    |         +-> RDT column 2 value: the URL string
    +-----------> RDT column 1 value: patient name

In-context inside an RSP (query response) that returns a link, following a QBP request:

MSH|^~&|MPI|CENTRAL|EHR|CLINIC_A|20260701101459||RSP^K11^RSP_K11|MSG5501|P|2.5.1
MSA|AA|MSG00042
QAK|Q4815162342|OK
QPD|Z44^Demographics Query^HL70471|Q4815162342|DOE^JANE
RDF|2|PatientName^ST^20~ReportLink^ST^120
RDT|DOE^JANE|https://portal.example.org/reports/9f2c

FHIR mapping

Not mapped at the segment level, because URL is not a segment. In FHIR, endpoint and URL concepts are first-class: a service endpoint maps to Endpoint.address, and resource-level URLs map to the url element on resources such as CapabilityStatement. These are reached through the FHIR RESTful API rather than translated from a v2 segment. A URL value carried in a v2 RDT column would map to whatever target field the result column represents.

Engine considerations

  • Do not register a URL segment handler; treat any inbound URL line as nonconformant.
  • Extract URL values from where they legitimately appear: RDT result columns, reference-pointer (RP) fields, or free-text fields, then validate them as URIs.
  • Keep endpoint/routing configuration in transport and MSH handling, not in body-segment parsing.

How Vorro parses and produces URL values

Vorro does not model a URL segment. It extracts URL values from the fields that actually carry them — reference-pointer fields and tabular RDF/RDT result columns — validates them as URIs, and on FHIR output routes them to the appropriate target such as Endpoint.address or a resource url element. Message routing and endpoints are handled at Vorro's transport layer and via MSH, never through a body segment.

  • RDF — the tabular row-definition segment whose columns can carry a URL value.
  • RCP — response-control segment in the query framework.
  • QPD — query-definition segment that pairs with the response.

Sources

← Back to HL7 v2 Guide

Ready to Integrate This Into Your Workflow?

Talk to a Vorro expert about implementing HL7 v2 in your specific environment.

Browse HL7 v2 Guides
HL7 URL: service-endpoint URL in a query (identity note) | Vorro Academy | Vorro