Mirth Connect is used to map out the procedure booking number
in the PR1 segment 4 (PR1.4.1).
In the following sample HL7 input message, please noted:
PR1.3.2
=
|[1] FIrst Surgical Procedure String [2] Second Surgical Procedure String [3] 3rd Surgical Procedure String|
PR1.4.1
=
|THEATRE_CODE:CATHLAB,APPTNO:OTB100056625,BOOK_MAGNITUDE:Intermediate|
In the destination software (Innovian), it will display the
sequence of procedure strings stored in PR1.3.2.
The string that follows [1] will be the first procedure string.
The string that follows [2] will be the second procedure string.
The string that follows [3] will be the third procedure string.
etc, etc
Innovian will then put the the latest (most recent) procedure entered in the system (
i.e. 3rd Surgical Procedure String in this case) on the top of the procedure list
because the software logic always put the latest (most recent) procedure
entered in the system on the top.
In addition, Innovian will not able to read the procedure booking number out from the PR1.4.1.
The following Javascript code is written in the Mirth Connect to transform
the input HL7 message before sending to the Innovian:
(Please refer to excellent article by Mr Scott Downe on
"how to split on 2 characters"
http://scottdowne.wordpress.com/2010/07/13/javascript-array-split-on-multiple-characters)
Basically I am using Downe's technique to split the whole string presented in PR1.4
on character ':' and character '," :
i.e.
this whole string:
THEATRE_CODE:CATHLAB,APPTNO:OTB100056625,BOOK_MAGNITUDE:Intermediate
is spitted into 6 parts by splitting at ':' and ',':
Part 0 -- THEATRE_CODE
Part 1 -- CATHLAB
Part 2 -- APPTNO
Part 3 -- OTB100056625
Part 4 -- BOOK_MAGNITUDE
Part 5 -- Intermediate
And then I reassign the part 3 as the Procedure Booking Number.
Then I can place this number at PR1.3.2.
In addition, I deliberately remove the opening bracket { from the original string from PR1.3.2
[1] FIrst Surgical Procedure String [2] Second Surgical Procedure String [3] 3rd Surgical Procedure String
becomes
1] FIrst Surgical Procedure String 2] Second Surgical Procedure String 3] 3rd Surgical Procedure String
Innovian will treat the new string as one single procedure string, rather than 3.
The transformed HL7 message becomes:
Please noted that the PR1.3.2 becomes:
[1] OT Booking No: OTB100056625; Booking Magnitude: Intermediate. [2] 1] FIrst Surgical Procedure String 2] Second Surgical Procedure Sting 3] 3rd Surgical Procedure Sting
Essentially, the First Procedure String becomes
[1] OT Booking No: OTB100056625; Booking Magnitude: Intermediate.
The Second Procedure String becomes
[2] 1] FIrst Surgical Procedure String 2] Second Surgical Procedure Sting 3] 3rd Surgical Procedure Sting
Therefore Innovian will put the second procedure string on top of its procedure list: