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

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2014, 08:23 PM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default Mirth Newbie: OBX5 to include Patient Identifier information & HL7

I am trying to create a channel that will take an Outbound HL7 message and insert the following OBX segments after every 54 OBX segments.
These segments will allow Patient Identifer information to display on each page of the document.

According to the HPF document,the segment I need to create is the following:
OBX||TX||\x0c|
OBX||TX||Patient Name: XXXXX, XXXXXX Account Number: 123456789|
OBX||TX||||


It looks easy enough to do on the Interface, but I am having problems figuring this out.
We are using MC 3.0.3.7171.

I created the Channel using TCP Listener as the Connector Type. Message Templates are HL7 v2.x, both source and destination.

Can anyone help me?
Reply With Quote
  #2  
Old 12-31-2014, 05:22 AM
LDHL7 LDHL7 is offline
Mirth Guru
 
Join Date: Apr 2011
Posts: 200
LDHL7 is on a distinguished road
Default

Are the 54 OBX segments under a single OBR segment?
Reply With Quote
  #3  
Old 12-31-2014, 09:23 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default OBX 54 lines

I mistyped.
I meant to say that after 54 lines of text, a page break will happen, on the next page the patient identifier information is added to the top of the page.
Reply With Quote
  #4  
Old 01-02-2015, 12:09 PM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default Still need help please.

I'm still struggling with this. I've been reading a lot of the messages and a few might be able to help me but I'm still at a loss as to where to begin.
Reply With Quote
  #5  
Old 01-05-2015, 07:54 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,125
narupley is on a distinguished road
Default

There are many threads here already that deal with repeating segments. Basically, you can use the insertSegmentAfter method to accomplish that. It's in the Reference tab.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #6  
Old 03-26-2015, 08:57 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default More clarification on OBX segments

Hello again,

It's been a while since I last posted and have figured a few things out.
I believe I didn't explain this very well.

This is what I have so far.
Connector Type: TCP Listener (Source) TCP Sender (Destination)
Message Type: HL7 Incoming and Outgoing
Repeating Segments: OBX

From the Incoming Source, there is only one OBX segment which, when viewed in MC, breaks down into multiple segments.

I need MC to loop thru the OBX segments until I get to OBX 5.1.54. At that segment, I need to 'Create a Segment After' that will create a page break ( \x0c).
Then, beginning with OBX 5.1.55 (top of next page), I need to insert PID and PV1 segments (repeating fields?) --- In the following Format:
OBX5.1.55 PATIENT NAME: PID.5.1, PID.5.2
OBX5.1.56 VISIT ID: PV1.19.1
OBX5.1.57 DATE OF VISIT: PV1.44.1
OBX5.1.58 empty field
OBX5.1.59 empty field
OBX5.1.60 Continues from where it left off at OBX5.1.54

Then I need it to continue to loop thru the next 54 segments (beginning with OBX5.1.60) and create the headers again.

However, I need the loop to stop and not insert the above if the OBX segments do not go past 54 segments.

I don't know which is the best way to go about this. Do I create a transformer to get this accomplished? Do I create JS code?
I really need help with this.
Thank you for your assistance.
Reply With Quote
  #7  
Old 03-26-2015, 09:00 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default Obx

In the example above, I realize I didn't figure in the page break segment.
This is what it should look like.

OBX5.1.55 \x0c //end of page
OBX5.1.56 PATIENT NAME: PID.5.1, PID.5.2 //beginning of new page
OBX5.1.57 VISIT ID: PV1.19.1
OBX5.1.58 DATE OF VISIT: PV1.44.1
OBX5.1.59 empty field
OBX5.1.60 empty field
OBX5.1.61 Continues from where it left off at OBX5.1.54
Reply With Quote
  #8  
Old 03-30-2015, 06:31 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

Is there no one that can help me?
Did I ask the question wrong?
Reply With Quote
  #9  
Old 03-31-2015, 07:06 AM
kwokwh@gmail.com kwokwh@gmail.com is offline
Mirth Newb
 
Join Date: May 2014
Posts: 9
kwokwh@gmail.com is on a distinguished road
Default

Please clarify your question with some sample input message and your preferred output

What do you mean when you say 54 OBX?
msg[‘OBX’][54][‘OBX.5′][‘OBX.5.1′] (Version 1)
msg[‘OBX’][‘OBX.5′][54][‘OBX.5.1′] (Version 2)
msg[‘OBX’][‘OBX.5′][‘OBX.5.54′] (Version 3)

VERSION 1: (repeated OBX segments) (msg[‘OBX’][54][‘OBX.5′][‘OBX.5.1′])

MSH|^~\&|||
PID|||||
OBR|||
OBX|1||
OBX|2||
OBX|3||
OBX|4||
.
.
//
.
OBX|54||
OBX|55||||\x0c||||||



VERSION 2 (repetitive field in OBX5.1 separated by ~) (msg[‘OBX’][‘OBX.5′][54][‘OBX.5.1′] )

MSH|^~\&|||
PID|||||
OBR|||
OBX|1||||1~2~3~4~5~6~………..~53~54~\x0c~56~…||||


VERSION 3: (OBX5.55) (msg[‘OBX’][‘OBX.5′][‘OBX.5.54′] )

MSH|^~\&|||
PID|||||
OBR|||
OBX|1||||||||||11||||||||||21||||||||||31|||1||||| |41|||||||||51|52|53|54|\x0c|||||||||||||||||||||| ||||||||||||||||||||||||
Reply With Quote
  #10  
Old 04-02-2015, 10:37 AM
Murph1 Murph1 is offline
OBX.1 Kenobi
 
Join Date: Dec 2014
Posts: 27
Murph1 is on a distinguished road
Default

We are on Version 2 with repetitive OBX segments.

When the HL7 is sent out, the message is in one OBX segment. Once it is received, the message is broken up into repeated OBX segments.

Because it is broken up into repeated segments, there is nothing in those segments that says to break and then add the patient identifiers onto the top of the next page. The receiving system does not do this and says it is our responsibility to have an interface engine to do this for us.

The receiving system does insert a page break, but the segments continue onto the next page at the very top. This is difficult for all concerned because there is no way to know which subsequent pages go with the first page of the document.

I would think this would be so easy to do.

I have some criteria for this OBX segment. I have to change the OBX2.1 value from a 'TX' to a 'FT'. That seems easy enough. I then need to insert a page break at the OBX 5.1.55 segment. And then follow with the patient identifiers on the next page.

I've looked all over MC trying to find a 'like' example, but have failed to find anything.

I would so appreciate some help with this. There are two of us that are working on this and we are struggling. If I can just get one going, I think I would understand what I'm doing a lot better.


Comes in as:

OBX|1|TX|||1~2~3~4~5~6~..~53~54~55~56~57~57~.......~85 |||||

Would like it to go out as:

OBX|1|FT|||1~2~3~4~5~6~..~53~54~55~\x0c\(page break)~56~Patient Name: (Hardcoded and then mapped fields from PID)~57~Visit ID: (mapped field)~58 (blank line)~59 (blank line)~60(begin rest of document)~61~62~(rest of document)~||||

I also need it to loop through first 55 lines and then again the next 55 lines and continue to loop until the end of the document.
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 12:00 PM.


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