web stats
v2.5.1 ACK truncating MSH header - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-29-2017, 12:06 PM
jridderhoff jridderhoff is offline
OBX.1 Kenobi
 
Join Date: Jan 2015
Posts: 38
jridderhoff is on a distinguished road
Question v2.5.1 ACK truncating MSH header

We're trying to implement a feed with a lab equipment provider who sends us messages with a value in MSH-18 for Character Set that causes it to be required in that message profile (OUL^R22). However, the ACKs that Mirth are replying with stop at MSH-12 and never include the MSH-18 field, which is causing the vendor to say that our ACKs are invalid.

I can't seem to find any configuration options that would affect the auto-generated ACKs... is that a bug, a feature, or am I just missing something obvious?

Thanks!
-Josh

(Edit, specs: Mirth Connect v3.2.2.7694)
Reply With Quote
  #2  
Old 03-29-2017, 12:51 PM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

Well first, it's worth noting that your vendor is wrong... here's an excerpt from the actual HL7 specifications:

Quote:
An HL7 message uses field MSH-18-character set to specify the character set(s) in use. Valid values for this field are specified in HL7 Table 0211, "Alternate Character Sets". MSH-18-character set may be left blank, or may contain one or more values delimited by the repetition separator. If the field is left blank, the character set in use is understood to be the 7-bit ASCII set, decimal 0 through decimal 127 (hex 00 through hex 7F). This default value may also be explicitly specified as ASCII.
Also in the specifications is a table showing what fields in the MSH segment are required. MSH-1,2,7,9,10,11,12 are required and no others.

If you'd like to set MSH-18 anyway that's easy enough to do. Instead of using the Auto-generate response, choose Postprocessor, and then in your postprocessor script do this:

Code:
var serializer = SerializerFactory.getSerializer('HL7V2');
var ack = new XML(serializer.toXML(ACKGenerator.generateAckResponse(message.getMergedConnectorMessage().getRawData(), 'AA', '')));
ack.MSH['MSH.18']['MSH.18.1'] = 'UNICODE UTF-8';
return serializer.fromXML(ack);
__________________
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
  #3  
Old 03-29-2017, 01:40 PM
jridderhoff jridderhoff is offline
OBX.1 Kenobi
 
Join Date: Jan 2015
Posts: 38
jridderhoff is on a distinguished road
Default

Nick, you're awesome -- thanks for the reply!

Quote:
Originally Posted by narupley View Post
Well first, it's worth noting that your vendor is wrong...
Yeah, that's what I'd thought, but then I they sent a screenshot of specs that said it was required in their profile, and then I found other implementation guides online that said it's conditional. Anyway, I've seen more evidence lending credence to it being optional as well, so I think that's probably the right answer. Even still...

Quote:
Originally Posted by narupley View Post
If you'd like to set MSH-18 anyway that's easy enough to do. Instead of using the Auto-generate response, choose Postprocessor, and then in your postprocessor script do this
...that sounds super-easy enough & what I'd seen hinted at in a couple of other places, just not as concisely documented as that. Many modpoints in your direction for the help (as always)!
Reply With Quote
Reply

Tags
ack, acknoweldgement, msh.18, oul, r22

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 05:03 PM.


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