web stats
Mirth Newbie: OBX5 to include Patient Identifier information & HL7 - Page 3 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #21  
Old 05-06-2015, 11:05 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default Paragon and MPF

That's correct. I don't see missing lines of text either when looking at the code.
I'm trying to figure this out on the receiver's end.
We are using Paragon with MPF. MC is the interface between them.
The code looks correct up until we see it in MPF and it is there that the 6 lines of text just prior to the patient identifiers appears to be stripped.
The code works perfectly from MC's side, so maybe I need to investigate further from the MPF side.
Thank you for all your help! It has been greatly appreciated.
Reply With Quote
  #22  
Old 05-06-2015, 08:35 PM
Wing Wing is offline
What's HL7?
 
Join Date: Apr 2015
Posts: 4
Wing is on a distinguished road
Default

because you have insert \.br\ on every 55th segment first
and then replace the "~" to \.br\ in the second step
The output contains some double or triple sequential \.br\

MRN: MRN8888\.br\VISIT NUMBER: ABCD56789992234\.br\DATE OF BIRTH: 19880712\.br\ADMIT DATE: 201505051011\.br\\.br\\.br\56\.br\57\.br\58\

You may want to check it this triple "\.br\ breaking your receiving application?

Last edited by Wing; 05-06-2015 at 08:51 PM.
Reply With Quote
  #23  
Old 05-07-2015, 04:34 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default I got it!!!

First I want to thank you all for your help. I finally got it!!
It was on the receiving side (MPF) that I needed to edit the lines per page.
Whew!!!!

My first channel!!!!!!!!! I'm so excited that this is working.
Now I need to figure out how to take the date format from yyyymmddmmss to mm/dd/yyyy and leave off the hhmm (hour minute).
I'm not sure if I do this in MC though.
Reply With Quote
  #24  
Old 08-19-2015, 05:40 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default Question regarding code

Hello again,

I'm hoping someone can help me with my code.

The code that I am using says to count every 55 lines and then insert the PID information at the top of the page. This works for the most part, but MC seems to not count correctly and so I get part of the PID on the bottom of the first page and then the rest on the next.
I've included 3 different codes and also 2 transformed messages and regardless of which code I use, the outcome is the same.
Can someone tell me why this is happening?
Attached Files
File Type: txt 4889.txt (6.6 KB, 9 views)
File Type: txt 4860.txt (6.0 KB, 3 views)
File Type: txt code1.txt (1.6 KB, 4 views)
File Type: txt code2.txt (1.6 KB, 2 views)
File Type: txt code3.txt (1.6 KB, 3 views)
Reply With Quote
  #25  
Old 08-19-2015, 05:43 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

I forgot to mention that message 4860 is correct with the 55 line breaks read correctly and message 4889 reads only 52 before inserting the PID on the bottom of the first page to equal 55 line breaks and continue the PID on the top of the next page.
Reply With Quote
  #26  
Old 08-21-2015, 07:23 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

Okay, I figured it out. My original code hasthe ~ as the page break. Wherever there are 2 ~ characters, MIRTH is only putting in one \.br\ instead of 2 so it looks like \.br\\.br\.
In my code below, how do I do this?


for each (obx in msg.OBX)
{
var newObx5 = '';
for each (obx5 in obx['OBX.5'].children())
{
newObx5 += obx5 + '\\.br\\';
}
newObx5 = newObx5.toString().substring(0,newObx5.length - 5);//removes the last \.br\
obx['OBX.5'] = newObx5;
}
Reply With Quote
  #27  
Old 08-24-2015, 09:06 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

I still need help with this. How do I get Mirth to count and replace each tilde?

It comes in as:
OBX|1|TX|||REPORT OF OPERATION~~~~Executive branch~The California executive branch consists of the Governor of California and~seven

and is transformed to this:
OBX|1|FT|||REPORT OF OPERATION\.br\Executive branch\.br\The California executive branch consists of the Governor of California and\.br\seven

Notice after REPORT OF OPERATION there are 4 tildes but when transformed I only get one break \.br\.

Any help would be appreciated.
Reply With Quote
  #28  
Old 08-25-2015, 05:41 PM
flyerman flyerman is offline
OBX.2 Kenobi
 
Join Date: May 2015
Posts: 68
flyerman is on a distinguished road
Default

Input
OBX|1|ST||1|AAA~BBB~CCC~DDD~EEE~FFF~GGG~~~~HHH|

Output
Please note the extra whitespace between \.br\
OBX|1|ST||1|AAA\.br\BBB\.br\CCC\.br\DDD\.br\EEE\.b r\FFF\.br\GGG\.br\ \.br\ \.br\ \.br\HHH|

CODE


//Insert a whitespace in empty field

var i = msg['OBX']['OBX.5'].length();
while(i--)
{
if (msg['OBX']['OBX.5'][i]['OBX.5.1'].toString() == "" )
{
msg['OBX']['OBX.5'][i]['OBX.5.1'] =" ";
}
}

//\.br\
for each (obx in msg.OBX)
{
var newObx5 = '';
for each (obx5 in obx['OBX.5'].children())
{
newObx5 += obx5 + '\\.br\\';
logger.info(newObx5)
}
newObx5 = newObx5.toString().substring(0,newObx5.length - 5); //removes the last \.br\

obx['OBX.5'] = newObx5;
}

Last edited by flyerman; 08-25-2015 at 05:48 PM.
Reply With Quote
  #29  
Old 08-26-2015, 08:46 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

Hello Flyerman,

That works perfect as long as my document is only 2 pages long.
If it's longer, it doesn't count the lines properly and drops the PID farther down the next page.

I've tried putting the code in different spots on the transformer but it still does the same.

Maybe you can work some more of your magic!!

I've attached the incoming test document that has 4 pages associated with it.

Thank you,
Mary
Attached Files
File Type: txt PIDChannel.txt (1.9 KB, 3 views)
File Type: txt Sent.txt (4.9 KB, 2 views)
File Type: txt Transformed.txt (3.8 KB, 3 views)
Reply With Quote
  #30  
Old 08-26-2015, 10:58 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

Actually it's putting the breaks where it should. I'll check my receiver.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation