Conversation
This comment has been minimized.
This comment has been minimized.
|
Will look into the failing tests tomorrow. |
|
Ok one of the tests that is failing is failing because I changed However, I beleive the actual result i.e. So ill update the test and push those changes along with the StyleCop warning fixes. The second failing test... This one requires a discussion since its failing because of a Unicode hexadecimal representation of a carriage return i.e. This is what the hl7 v24 standard says at section 2.10.5
Both Hapi and nHapi currently use the Unicode hexadecimal representation of the carriage return i.e. This Pull Request changes what nHapi uses from Other hl7 libraries such as HL7-dotnetcore which is based from the java library hl7inspector use the latter. Also, Intersystems who are the company behind the integration engine software ensemble also suggest to use the latter. I would like to use @duaneedwards @ryankelley @AMCN41R what are your opinions on this one? |
8861db6 to
27139d4
Compare
This comment has been minimized.
This comment has been minimized.
|
Was a bit concerned about the first change but if I understand this right, you are basically looking to undo the changes made in this commit? 521934d#diff-16e92736eac2a191a20e92f6a74ee9ac812c2c31ba196ec1427d69ca4dda37e7 It looks like this was previously set to expect the value you are proposing to change it to now? Otherwise the changes look fine, do agree with the idea of putting these behind a major release as it's highly likely someone might run into issues due to some particular system encoding / decoding things some particular way. |
Yes however that change was only made to make the tests pass, since I just assumed all the tests from the project should already be passing (that was done a long time ago 😁)
Yes since this is the correct behaviour (from what I have come to understand anyway, plus it is in line with hapi)
I'm still looking into the second one, just in case, as I don't want to introduce anything which isn't correct as far as the standards are concerned. |
|
@duaneedwards @AMCN41R having looked further into HL7-dotnetcore and hl7inspector they actually uses |
27139d4 to
a7d88b6
Compare
This comment has been minimized.
This comment has been minimized.
a7d88b6 to
07bbff3
Compare
This comment has been minimized.
This comment has been minimized.
|
@duaneedwards @AMCN41R I asked the question in the hl7.org zulip chat and here are the responses: In the future we can make it configurable instead. |
|
Interesting, would it be much work to make it configurable? I'm thinking that ideally if it were going to be changed from |
I'm not sure how difficult it would be to make it configurable but I'll look into it, there was one final reply on the hl7 zulip chat: |
07bbff3 to
66cd5d9
Compare
|
@duaneedwards ok the escape sequence for line feed Possible values for If the configuration isn't specified in the |
66cd5d9 to
002cfb7
Compare
This comment has been minimized.
This comment has been minimized.
002cfb7 to
32ed72e
Compare
This comment has been minimized.
This comment has been minimized.
Changed behaviour of Escape to (mostly) match hapi implementation Also added unit test to ensure Escape behaves correctly (some borrowed from hapi) Make line feed / carriage return hexadecimal escape sequences configurable Add .gitattributes to prevent the line endings of txt files being changed on checkout (was breaking tests)
32ed72e to
f293ba1
Compare
Unit Test Results 5 files 54 suites 7s ⏱️ Results for commit f293ba1. |


What's in this pull request
Trim()fromEscape.csfixes HL7 TX type, obx.5 leading space being trimmed PipeParser #103.\rto\X0D\from\X000d\.\X000d\for carriage returns..gitattributesfile to prevent the line endings of text files being changed on checkout (as this was breaking some tests when running on linux).Could potentially be a breaking change for those relying on existing behaviour but this implementation should be more "correct" in line with the hl7 standards, plus the next release is a Major one anyway so breaking changes are expected.
Hexadecimal line feed and carriage return escape sequence configuration
The escape sequence for line feed
\nand carriage return\rare now configurable to 1 of 3 values each respectively.example
App.configconfiguration:Possible values for
lineFeedHexadecimalareX0A,X00AandX000a(they map to an enum)Possible values for
carriageReturnHexadecimalareX0D,X00DandX000d(they map to an enum)If the configuration isn't specified in the
App.configthe default values areX0Afor line feed andX0Dfor carriage return.