In the previous article, we've seen the structure of one of the most used types of HL7 message - ADT (Admit, Discharge, Transfer) and an example of ADT^A04 with the description of all its fields. Now let's look at another flow of data having to do with ordering and fulfilling the orders of tests. I'm talking about ORM (as of version 2.5 you should use specific messages to order tests, like OMG, OML, OMD, OMS, OMN, OMI, and OMP), ORL and ORU messages. In a very simplified case, the exchange of data may look like this. ![](/sites/default/files/inline/images/images/image(5043).png) Let's look at these messages in more detail. ## HL7 OML messages HL7 OML – Laboratory Order - may be used for the communication of laboratory and other order messages and must be used for lab automation messages. The trigger event for this message is any change to a laboratory order. Such changes include the submission of new orders, cancellations, updates, etc. OML messages can originate also with a placer, filler, or an interested third party. Depending on the number of specimens and containers one has to use different subtypes of this message. There are 4 different subtypes of this type of message in version 2.8. | Subtype | Description | | ------- | -------------------------------------------------------------------------------- | | OML^O21 | Laboratory order | | OML^O33 | Laboratory order for multiple orders related to a single specimen | | OML^O35 | Laboratory order for multiple orders related to a single container of a specimen | | OML^O39 | Specimen shipment centric laboratory order | If we look at the general structure of this type of message they consist of the following segments. | Segment | Description | | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | MSH | Message Header. This segment contains information about the message sender and receiver, the date and time that the message was created. This segment is required. | | [SFT] | Software Information. This segment provides additional information about the software product(s) used as a Sending Application. The primary purpose of this segment is for diagnostic use. There may be additional uses per site-specific agreements. This segment is optional. | | [UAC] | User Authentication Credential. This optional segment provides user authentication credentials, a Kerberos Service Ticket or SAML assertion, to be used by the receiving system to obtain user identification data. It is to be used when the receiving application system requires the sending system to provide end-user identification for accountability or access control in interactive applications. Since user authentication implementations often limit the time period for validity of the session authentication credentials, this segment is not intended for use in non-interactive applications. | | [NTE] | Notes and Comments. This optional segment is commonly used for sending notes and comments. | [ ] = optional Apart from these 4 segments, common for all the messages of this type, for OML^O21, for example, there are also segments related to the patient and order. Since patient information uses the same segments in different messages I won't go into details - an example of version 2.5 is described in the [previous article](https://community.intersystems.com/post/types-hl7-adt-message-and-example-adta04). Let's better have a look at the order segments that are the main point of this message.