In the previous article, we've discussed the origin of the standard HL7v2, the structure and the types of messages. Let's now look at one of the most used types of messages and an example of its structure. I'm talking about ADT. HL7 ADT messages (Admit, Discharge, Transfer) are used to communicate basic patient information, visit information and patient state at a healthcare facility. ADT messages are one of the most widely-used and high volume HL7 message types, as it provides information for many trigger events including patient admissions, registrations, cancellations, updates, discharges, patient data merges, etc. ![](/sites/default/files/inline/images/images/image(5042).png) All patient information is entered into a Hospital Information System (HIS) or Electronic Medical Record (EMR) in a healthcare setting. New patients or updates in these systems are distributed to ancillary systems through ADT messages to maintain the synchronization of current patient data. There are quite a few subtypes of this message that depend on the situation and the action to be taken. Here are some of them. | Subtype | Description | | ------- | -------------------------- | | ADT^A01 | Patient admission/visit | | ADT^A02 | Patient transfer | | ADT^A03 | Patient discharge | | ADT^A04 | Patient registration | | ADT^A05 | Patient pre-admission | | ADT^A08 | Patient information update | | ADT^A11 | Cancel patient admission | | ADT^A12 | Cancel patient transfer | | ADT^A13 | Cancel patient discharge | If we look at the general structure of this type of message, it will consist of the following segments. Considering that different versions f the HL7v2 support backward compatibility, in higher versions you may have more fields.
<span class="hljs-selector-tag">MSH</span>|^~\&|<span class="hljs-selector-tag">EPIC</span>|<span class="hljs-selector-tag">EPICADT</span>|<span class="hljs-selector-tag">SMS</span>|<span class="hljs-selector-tag">SMSADT</span>|202211031408|<span class="hljs-selector-tag">CHARRIS</span>|<span class="hljs-selector-tag">ADT</span>^<span class="hljs-selector-tag">A04</span>|1817457|<span class="hljs-selector-tag">D</span>|2<span class="hljs-selector-class">.5</span>|
<span class="hljs-selector-tag">EVN</span>||202211030800||||202211030800
<span class="hljs-selector-tag">PID</span>||0493575^^^2^<span class="hljs-selector-tag">ID</span> 1|454721||<span class="hljs-selector-tag">DOE</span>^<span class="hljs-selector-tag">JOHN</span>^^^^|<span class="hljs-selector-tag">DOE</span>^<span class="hljs-selector-tag">JOHN</span>^^^^|19480203|<span class="hljs-selector-tag">M</span>||<span class="hljs-selector-tag">B</span>|254 <span class="hljs-selector-tag">MYSTREET</span> <span class="hljs-selector-tag">AVE</span>^^<span class="hljs-selector-tag">MYTOWN</span>^<span class="hljs-selector-tag">OH</span>^44123^<span class="hljs-selector-tag">USA</span>||(216)123<span class="hljs-selector-tag">-4567</span>|||<span class="hljs-selector-tag">M</span>|<span class="hljs-selector-tag">NON</span>|400003403~1129086|
<span class="hljs-selector-tag">NK1</span>||<span class="hljs-selector-tag">ROE</span>^<span class="hljs-selector-tag">MARIE</span>^^^^|<span class="hljs-selector-tag">SPO</span>||(216)123<span class="hljs-selector-tag">-4567</span>||<span class="hljs-selector-tag">EC</span>|||||||||||||||||||||||||||
<span class="hljs-selector-tag">PV1</span>||<span class="hljs-selector-tag">O</span>|168 ~219~<span class="hljs-selector-tag">C</span>~<span class="hljs-selector-tag">PMA</span>^^^^^^^^^||||277^<span class="hljs-selector-tag">ALLEN</span> <span class="hljs-selector-tag">MYLASTNAME</span>^<span class="hljs-selector-tag">BONNIE</span>^^^^|||||||||| ||2688684|||||||||||||||||||||||||202211031408||||||002376853
In this example, you will notice that we have 5 distinct segments separated by the carriage return character: **MSH**, **EVN**, **PID**, **NK1** and **PV1**.
You will also notice that each segment contains a number of composites. For example, in the first line, the pipe character (|) separates the SMS and SMS ADT segments.
Finally, on the second line, the first name sub-field JOHN is separated from the last name DOE using the ^ character.
Also, there is always an indicator of the version of the used HL7v2 standard so that the receiving application knows what to expect in which field. In this instance, the version is 2.5.
Now let's look at each segment of this message and learn what info it carries.