LINKMED® Interface Tutorial: Creating Mapper Interface Template

LINKMED® INBOUND HL7 Multiple Segments Configuration

The LINKMED® Mapper robust features allows user to deal with this with 2 simple configuration steps (see example below):

STEP I: Insert the Mapper [HL7TEMPLATE] Tag to the HL7 segment that has multiple occurence right in the Mapper interface template (see example)
STEP II:
Set File/Field Rules and condition Tag in the Mapper interface template (LINKMED® Interface Engine will recognize the Tag and parse message accordingly)

Example below is HL7 ORU^R01 Laboratory result message example below. We see that two HL7 segments OBR and OBX contained multiple occurrences

MSH|^~\&|NTN|NHQ||99999978|20010504115412||ORU^R01|58513001|P|2.2||
PID|4|000110000|005294N|0058216||||||||||||||99999978|000110000

OBR|
1|000110000|005294N|^AMPHETAMINE, D&L^^717960^d AND l ISOMER SEPARATION|||20010228120000|||ZZ^MC/TH CORP HLTH SERV^1201 SOUTH COLLEGEVILLE ROAD^^COLLEGEVILLE^PA^19426^|A||PRE^PRE-EMPLOYMENT|20010306132052|R|99999978||||||20010504115412|||F|||||||SAMPLE,BARRY
OBX|
1||^^^72563^d-METHAMPHETAMINE ||75|%||N|||F|||20010228120000
OBX|
2||^^^72564^l-METHAMPHETAMINE ||25|%||N|||F|||20010228120000
OBX|
3||^^^72565^d-AMPHETAMINE ||73|%||N|||F|||20010228120000
OBX
|4||^^^72566^l-AMPHETAMINE ||27|%||N|||F|||20010228120000
OBR
|2|000110000|005294N|^SPECIFIC GRAVITY^^735146^SPECIFIC GRAVITY (REFLEX)|||20010228120000|||ZZ^MC/TH CORP HLTH SERV^1201 SOUTH COLLEGEVILLE ROAD^^COLLEGEVILLE^PA^19426^|A||PRE^PRE-EMPLOYMENT|20010306132052|R|99999978||||||20010504115412|||F|||||||SAMPLE,BARRY
OBX|
1||^^^72503^SPECIFIC GRAVITY ||1.003||1.003 - 1.025|N|||F|||20010228120000
OBR|
3|000110000|005294N|^SAP 6-50 + ALC W/NIT^^735899^SUBSTANCE ABUSE PANEL|||20010228120000|||ZZ^MC/TH CORP HLTH SERV^1201 SOUTH COLLEGEVILLE ROAD^^COLLEGEVILLE^PA^19426^|A||PRE^PRE-EMPLOYMENT|20010306132052|R|99999978||||||20010504115412|||F|||||||SAMPLE,BARRY
OBX|
1||^^^72479^AMPHETAMINES (300 ng/mL SCREEN)||NEGATIVE||300/300 ng/mL|N|||F|||20010228120000
OBX|
2||^^^72435^ AMPHETAMINE ||POSITIVE||/300 ng/mL|A|||F|||20010228120000
OBX
|3||^^^72436^ METHAMPHETAMINE ||POSITIVE||/300 ng/mL|A|||F|||20010228120000
OBX|
4||^^^72451^BENZODIAZEPINES ||NEGATIVE||300/200 ng/mL|N|||F|||20010228120000
OBX|
5||^^^72432^COCAINE METABOLITES ||NEGATIVE||300/150 ng/mL|N|||F|||20010228120000
OBX|
6||^^^72452^MARIJUANA METABOLITES, (50 ng/mL SCREEN)||NEGATIVE||50/15 ng/mL|N|||F|||20010228120000
OBX|
7||^^^72434^OPIATES ||NEGATIVE||300/300 ng/mL|N|||F|||20010228120000
OBX|
8||^^^72426^PHENCYCLIDINE ||NEGATIVE||25/25 ng/mL|N|||F|||20010228120000
OBX|
9||^^^72509^ALCOHOL, ETHYL (U) ||NEGATIVE||/.04 |N|||F|||20010228120000
OBX|
10||^^^72508^pH ||6.5||4.5-9.0|N|||F|||20010228120000
OBX
|11||^^^72524^CREATININE ||19.0|mg/dL||A|||F|||20010228120000
OBX
|12||^^^72506^NITRITES ||NEGATIVE|||N|||F|||20010228120000

Figure1: Multiple HL7 Segments Lab results example

LINKMED® Mapper Interface Configuration:

STEP I: Select HL7 as Input file format and XML as Output file format from the Mapper configuration dialog box

1. launch the LINKMED® Mapper, click on [Mapper/Config Icon] to open the Mapper configuration dialog box
2- Click on [HL7] Button to access the Mapper HL7 library and select the following HL7 segments:
MSH, PID, OBR, OBX
, and one Custom Segment Output XO1 (figure 2)

Figure 2

3- Tag the HL7 message segments (OBR and OBX) [HL7TEMPLATE] in each segment's first field. This Value tell the LINKMED® Interface Engine that this HL7 segment has multiple occurrences or repeating items.
Configure the[OBR] and [OBX] segments to look like the following example:

OBR_1 [HL7TEMPLATE]_OBR
OBX_1[HL7TEMPLATE]_OBX ( Figure 3)


Figure 3

4- Next configure the Custom Segment output XO1_1: This segment is required by the LINKMED® Interface Engine for instruction specify in its File and Field Rules:
X01_1 [OUTHL7TEMPLATE2]_X01_1 set the character length to 3000 (figure 4)


Figure 4

STEP II: Set the condition and mapping rules to the X01 segment as follow:
1- Right click on the File Rule box to bring up the [Field Rules] configuration dialog box.
2- Select the "GotoOffset=816" from the bottom pane to bring the condition mapping up to the Top pane. Leave it at the default value of zero [GotoOffset=0], check the [Use condition] on the top of the pane, click save.
3- Right click on the Field Rules, select the [READINNUMOFCHARS=] from the bottom pane, double click to bring it up into the top pane, then type in "100000" to give the read in value of [READINNUMOFCHARS=100000], check the [Map Field] on the top of the pane, then click [Save] to exit ( Figure 5)

Note: increase the read in number of characters to : 200000, 300000, 400000 if your input file is larger than 64000 bytes in size

4- Save your Mapper Interface Template(*.mpr). Using system command prompt call the LINKMED® Interface Engine to do your data transformation . Your XML output should be well formed, use Internet browser to validate your XML output file (C:\LINK\LTUP.exe C:\LINK\Mapperfilename.MPR)



Figure 5