Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose to status of a message (and the incremented counter) in each connector #2024

Closed
rbeckman-nextgen opened this issue May 11, 2020 · 5 comments

Comments

@rbeckman-nextgen
Copy link
Collaborator

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

When we put a response in the response map, it is not taken into account. It can be a problem:

  • The Sent counter does not reflet the number of sent message. Indeed, when we create a connector to read the acknowledgement (but which does nothing else, so which does not send messages) or when we create a connector to trace some information, the Sent counter is incremented.
  • I created a filter to check whether all mandatory fields are provided. If one of these fields is missing, then the message is counted as "Filtered" althought I want it to be counted as "Error".

In the LLP Sender connector, it is possible to choose the status of the message. Would it be possible to do the same in the other connectors?

Imported Issue. Original Details:
Jira Issue Key: MIRTH-2063
Reporter: dbe
Created: 2012-01-17T05:21:11.000-0800

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

This all looks like expected behaviour to me...

A message is "sent" if it processed through a destination successfully. For a null Channel Writer for example, obviously nothing is "sent" anywhere, but the MessageObject status of SENT is still relevant.

The whole purpose of a filter is to do data validation and prevent unwanted messages from processing through, without throwing any errors. However, you can still force errors with a throw() call. if you have this filter on a Source connector and you're worried about what response is sent back to the inbound client, then the LLP Listener has built-in properties that you can set to send custom response codes/messages based on whether the message was successful, filtered, or in-error. Even if you're not using an LLP Listener, you can still create custom responses and respond from them on the Source connector.

I'm not sure what you mean by "In the LLP Sender connector, it is possible to choose the status of the message." Did you mean the LLP Listener? If so, then even on the LLP Listener, you don't choose the status of message; you only choose the HL7 MSA response code and message that is sent back to the inbound client. If you have a filter on an LLP Listener Source connector, and you're sending "AA" as the response code in all cases, then the inbound client will receive a successful ACK no matter what, but the message stored in your database will still have a status of FILTERED. This is good behaviour (not only for development but for auditing as well) in my opinion, and shouldn't be changed...

Imported Comment. Original Details:
Author: narupley
Created: 2012-03-16T07:46:40.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

I understand the current behaviour.

But, you do not think that it would be interesting to have somewhere the real number of sent messages?

Without changing the status of the stored messages, I think that it could be interesting to have the choice to disable the auto-incrementation of the counters and to
have functions to increment the counter by JavaScript code, in the channel.

Imported Comment. Original Details:
Author: dbe
Created: 2012-03-16T07:57:16.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

In the LLP Sender, there's actually not a lot of freedom to dynamically choose the response status. You can choose to "process" the HL7 ACK, but really all that is doing is looking at the MSA.1; if it's AA, then the status is SENT, otherwise it's ERROR.

It sounds like we just have a difference in semantic opinions. Different developers and systems will have different definitions of what a truly "sent" message should be.

That said, you [I]can[/I] take matters into your own hands by decrementing the sent statistic for the channel and even updating the actual status of the message in the database from SENT to something else, in the postprocessor script.

Imported Comment. Original Details:
Author: narupley
Created: 2012-03-16T08:54:01.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

http://www.mirthcorp.com/community/forums/showthread.php?t=6747

Imported Comment. Original Details:
Author: dbe
Created: 2012-03-19T00:49:25.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

@rbeckman-nextgen rbeckman-nextgen commented May 11, 2020

In 3.0, the response transformer was added to allow modification of the status and statistics based on the response that was received.

Imported Comment. Original Details:
Author: jacobb
Created: 2013-10-17T17:33:58.000-0700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant