question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generate a ACK bases on a HL7 message with MSH.2 = ^~&

See original GitHub issue

According to the documentation on some sites like HL7 v2.5.1 - MSH.2 - Encoding Characters, the recommended value for MSH.2 is ^~\&, but it is possible to set ^~& (HL7 MSH (Message Header))

There is a case where we should allow a message with the value ^~&, but when the ACK is trying to be generated, the follow exception happens

Exception: “Failed to validate the message with error - MSH.9 not available”

This is the test to reproduce this issue:

   [TestMethod]
    public void GenerateAckTest()
    {
        var sampleMessage = @"MSH|^~&|EPIC||||20191107134803|ALEVIB01|ORM^O01|23|T|2.3|||||||||||";
        sampleMessage = $"{sampleMessage}\nPID|1||MRN_123^^^IDX^MRN||Smith F S R E T^John||19600101|M";

        var message = new Message(sampleMessage);
        message.ParseMessage();
        var ack = message.GetACK();

        var ACK_MSH_2 = ack.GetValue("MSH.2");
        var MSG_MSH_2 = message.GetValue("MSH.2");

        Assert.AreEqual(ACK_MSH_2, "^~&");
        Assert.AreEqual(MSG_MSH_2, "^~&");
    }

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jaime-olivarescommented, May 4, 2023

This change it is already published in nuget version 2.36

1reaction
jaime-olivarescommented, May 3, 2023

I am able to reproduce the issue. Analysis in progress…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a custom ACK - iNTERFACEWARE Help Center
Create a custom ACK by using a script in an LLP Listener component. Source Code. -- main() is given the original HL7 message....
Read more >
Creating and managing HL7v2 messages
This page explains how to ingest, create, label, list, view, and delete HL7v2 messages. HL7v2 messages are used to transmit clinical data between...
Read more >
Important HL7 Scenarios
A negative ACK (NACK) message acknowledges that the destination is aware of the transmission but did not capture the message. The following figure...
Read more >
Parameters for the HL7 Generate Example Data pattern
This parameter specifies whether to base the generated library contents on HL7 Message definitions or individual HL7 Segment definitions (which you can then ......
Read more >
DC 11.6 | HL7 Standard Acknowledgment Message Invoker
The HL7 standard defines a general ACK structure for all message types. The HL7 Standard Acknowledgment Message Invoker is generated based on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found