Adding z-segments to HL7 Mapping Components
When mapping HL7 EDI components, it is often necessary to add locally-defined information, or z-segments, to accommodate additional fields not included in the standard. Following is a simple walkthrough that will demonstrate how to add z-segments to the HL7 configuration files that are available as a free download with MapForce. In the example below we will be adding a ZLR segment to an HL7 2.3 Observation Results Unsolicited (ORU) message. The ZLR segment is commonly used for adding additional information for legacy laboratory-based reporting. ZLR attributes are provided below:
SEQ | LENGTH | OPT | DATA TYPE | ELEMENT NAME |
1 | 106 | true | XAD | Ordering Provider’s Address |
2 | 90 | true | XON | Ordering Facility Name |
3 | 106 | true | XAD | Ordering Facility Address |
4 | 40 | true | XTN | Ordering Facility Phone |
5 | 20 | true | SN | Patient’s Age |
6 | 40 | true | XPN | Next of Kin/Associated Party Name |
7 | 40 | true | CE | Next of Kin/Associated Party Relationship |
8 | 106 | true | XAD | Next of Kin/Associated Party Address |
9 | 40 | true | XTN | Next of Kin/Associated Party Phone |
The ZLR segment must follow each OBR (Observation Request) segment, and there can only be one ZLR per OBR. 1. Go to C:Program FilesAltovaMapForce2009MapForceEDIHL7.v230 to access the MapForce configuration files for HL7 version 2.3. 2. First, locate the message configuration file in question, ORU_R01, and open it in XMLSpy – or any text editor.[i] Add a ZLR just below OBR. 3. Save this file as ORU_R01_ZLR (or any unique name you choose). 4. Now open the EDI collection file and add the new message to the list.[i] 5. Next, simply open the HL7 SEGMENT file to add the segment details to the GENERATE DATA section as provided above.[i] 6. Finally, scroll down to the GENERATE SEGMENTS section and add the following: 7. Now, let’s access our newly customized HL7 EDI mapping component in MapForce. Open MapForce and choose Insert > EDI. In the Browse EDI collections dialog, select HL7.v230 and scroll down to select ORU_R01_ZLR. Press OK to insert. 8. Your new mapping component will appear in the MapForce design pane with the new ZLR segment included. Now you can complete your data integration design by inserting another source or target data structure(s) and dragging lines to connect nodes. MapForce supports mapping to/from XML, databases, flat files, EDI, XBRL, and Web services. [i] If you are working in XP, you will have to unclick “read-only” in the Properties dialog. Vista users will need to copy the file to another location before editing – you can then copy the file back to the appropriate HL7 collection directory. For more information about mapping HL7 and other EDI formats, please see the MapForce feature pages – or download a 30-day free trial of MapForce today!