web stats
Leading whitspace in NTE segments - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2006, 10:17 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Leading whitspace in NTE segments

Running into a problem (Mirth 1.0.3) in NTE segments....

Our LIS sends certain results (microbiology) as NTE messages somewhat formatted as "ready to print in a monospaced font". Problem is they use leading spaces in NTE lines to space things out, and either Mirth or HAPI removes these leading spaces from the message.

End result - column headers are left-justified instead of being over the column data.

Any idea how to turn off this behaviour?

thanks - mike

Reply With Quote
  #2  
Old 10-10-2006, 10:15 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

I believe this was fixed in 1.1. There is an option in HAPI to trim or ignore whitespace on NTE segments which we set to preserve.

-Chris
__________________
Chris Lang
Reply With Quote
  #3  
Old 10-10-2006, 09:05 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

I'll give a try - thanks.
Reply With Quote
  #4  
Old 10-12-2006, 09:11 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Switched over to 1.1.0 last night, but the problem still exists.

Sent by LIS:
NTE|1|L| Source: Urine|N

Stored in Mirth:
NTE|1|L|Source: Urine|N

Ideas?

thanks - mike
Reply With Quote
  #5  
Old 10-13-2006, 10:58 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Hmm, we have code specifically to prevent this:

Code:
			logger.debug("encoding XML message to ER7:\n" + message);
			xmlParser.setKeepAsOriginalNodes(new String[]{"NTE.3", "OBX.5"});
			Message messagex = xmlParser.parse(message);
			return pipeParser.encode(messagex);
I'm guessing that you are grabbing the ER7 from a different part of the system which doesn't pass through this step. This is a problem on our part, as no conversion should remove whitespace.

What is the design of your channel, and where are you getting the HL7 from within Mirth?

Thanks,
-Chris
__________________
Chris Lang
Reply With Quote
  #6  
Old 10-14-2006, 10:16 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Source is an LLP listener with default options (except address/port). Goes to two destinations - each has a filter to handle either ADT or ORU records - the ORU one is the one breaking. (LIS isn't sending ADT records yet.)

ORU filter:

var rv = false;
// return true if this is an ORU message
if (msg['MSH']['MSH.9']['CM_MSG.1'] == 'ORU') {
rv = true;
}
return rv;

The ORU transformer has one Javascript step (step 0) that looks through the HL7 and defines a few variables in localMap, and steps 1-7 are simple Mappers. I don't do anything with NTE segments here - basically just loop through OBRs, count things, and pull out a few values.

Connector type is Database Writer, going to Postgres. Nothing fancy here - just a pair of INSERTs.

INSERT INTO slab_hl7results (acn, recline, csid) VALUES (${Accession}, ${HL7 ER7}, ${ControlSequence});
INSERT INTO pendingreports (acn, cli, lastname, firstname, testcount, finalrpt, ordphysln, ordphysfn, ordphysupin, testlist, lvorderid) VALUES (${Accession}, ${Client}, ${LastName}, ${FirstName}, ${count}, ${testResult}, ${OrdPhysLastName}, ${OrdPhysFirstName}, ${OrdPhysUPIN}, ${TestList}, ${LVorderID});


I see the trimmed NTEs under View Messages from the status screen, and in the stored HL7 ER7 record in Postgres.

I suppose it's possible that the LIS is doing the trimming - I'll run Ethereal and prove/disprove this. They have a "view sent HL7" thing that does show the records correctly, but....

Let me know if you want me to export/sanitize the entire channel definition and post it.

mike
Reply With Quote
  #7  
Old 10-14-2006, 10:37 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Just captured a transaction - Ethereal shows that the LIS is not trimming leading white space... Eliminates one possibility...

mike
Reply With Quote
  #8  
Old 10-15-2006, 12:50 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Thanks Mike, the info you provided is great, we now know where to look. If you could send a sanitized sample message (with the whitespace intact), I can take a look at this first thing Monday morning.

Thanks,
-Chris
__________________
Chris Lang
Reply With Quote
  #9  
Old 10-15-2006, 08:43 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Here ya go...

Code:
MSH|^~\&|XYZ|Acme Lab and Bait Shop|Outreach|Acme Lab and Bait Shop|200610140904||ORU^R01||P|2.3|
PID|1|30002464855|30002464855|A1234567|PATIENT^TEST^||19710305|F||||||||||XYZ|
Z01|LV2006-10-13-76631|
PV1||2430-0|O|
ORC|RE||A1234567||CM|||||||A11111|
OBR|1|A1234567|A1234567|450100^Protime (including INR)|||200610140425|||||||200610140820||A11111^Quack^Ima^^^^^^^^^A11111||||||200610140904|||F|
OBX|1|NM|45010^Protime Control||10.1|sec|||||F|||200610140903||USER^User^Joe^|
OBX|2|NM|45020^Protime Patient Time||28.6|sec|10.0-13.5|H|||F|||200610140903||USER^User^Joe^|
OBX|3|NM|45030^INR||3.0||||||F|||200610140903||USER^User^Joe^|
NTE|1|L|============== Recommended INR Ranges ==============||
NTE|2|L|Pre-op oral anticoagulant||
NTE|3|L|     Not hip surgery:                      1.5 - 2.0||
NTE|4|L|     Hip surgery:                          2.0 - 3.0||
NTE|5|L|Prevention of venous thrombosis:           2.0 - 3.0||
NTE|6|L|Recurrent venous thrombosis:               2.5 - 4.0||
NTE|7|L|Prevention of arterial thrombo-embolism:   3.0 - 4.0||
NTE|8|L|     (Includes patients with mechanical heart valve)||
NTE|9|L|====================================================||
Also can be found at http://www.argos.org/hl7msg1.txt

thanks - mike
Reply With Quote
  #10  
Old 10-23-2006, 08:19 PM
mnowlin mnowlin is offline
OBX.3 Kenobi
 
Join Date: Sep 2006
Posts: 141
mnowlin is an unknown quantity at this point
Default Re: Leading whitspace in NTE segments

Chris - any news on this? Not trying to be pushy... (I have a meeting tomorrow, and I know somebody's going to ask.)

Thanks for the help.

mike
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple IN1 Segments with Optional IN2 Segments bdilworth Support 4 07-29-2008 10:24 AM


All times are GMT -8. The time now is 03:46 AM.


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