Announcement

Collapse
No announcement yet.

v2.5.1 ACK truncating MSH header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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)

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

    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.

    Comment


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

      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...

      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)!

      Comment

      Working...
      X