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

feat: support "AE" type in sendResponse() #100

Closed
jtarvainen opened this issue Aug 15, 2024 · 3 comments
Closed

feat: support "AE" type in sendResponse() #100

jtarvainen opened this issue Aug 15, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jtarvainen
Copy link

jtarvainen commented Aug 15, 2024

Feature Request

Describe the Feature Request

sendResponse() only supports type values "AA" (Application Accept) or "AR" (Application Reject); the value "AE" (Application Error) is only used if formulating a response fails.

The "AR" type is commonly interpreted to indicate issues with the MSH-9, MSH-11 and/or MSH-12 fields. As such, it may not be applicable if the message itself is valid but cannot be processed for some other reason (e.g. the data not being relevant to the recipient).

We have a client device that expects to receive a response of type "AE" in case of errors not related to message validity. Please add support for setting this response type manually.

Describe Preferred Solution

Add "AE" as one of the accepted response types in sendResponse. Note that _createAckMessage should construct the MSA segment of the "AE" response in the same way as that of the other response types:

    const segment = ackMessage.addSegment('MSA')
    segment.set('1', type) // <-- this should also allow "AE"
    segment.set('2', message.get('MSH.10').toString())

If the feature request is approved, would you be willing to submit a PR?

Yes

@jtarvainen jtarvainen added the enhancement New feature or request label Aug 15, 2024
@Bugs5382 Bugs5382 self-assigned this Aug 17, 2024
Bugs5382 added a commit that referenced this issue Aug 17, 2024
* updated documentation
* added unit tests for AA, AR, and AE
* updated inbound to use messageParsed vs. message for code consistency
@Bugs5382
Copy link
Owner

@jtarvainen Care to review the code I just pushed up?

Bugs5382 added a commit that referenced this issue Aug 17, 2024
@jtarvainen
Copy link
Author

@Bugs5382 Thanks for taking care of this so fast! I checked out the change; looks good to me! 👍

@Bugs5382
Copy link
Owner

@jtarvainen I give develop at least a few days for testing so this way medical applications are good.

Bugs5382 pushed a commit that referenced this issue Aug 20, 2024
# [2.5.0-beta.1](v2.4.1...v2.5.0-beta.1) (2024-08-20)

### Features

* **#100:** added AE support ([20f33c3](20f33c3)), closes [#100](#100)
* **#100:** support ae type in send response ([#101](#101)) ([5e09595](5e09595)), closes [#100](#100)
Bugs5382 pushed a commit that referenced this issue Aug 29, 2024
# [2.5.0](v2.4.1...v2.5.0) (2024-08-29)

### Features

* **#100:** added AE support ([20f33c3](20f33c3)), closes [#100](#100)
* **#100:** support ae type in send response ([#101](#101)) ([5e09595](5e09595)), closes [#100](#100)
* develop ([#104](#104)) ([b38334b](b38334b))
@Bugs5382 Bugs5382 closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants