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

Add Decoding of special chars #22

Closed
wokket opened this issue Aug 8, 2021 · 2 comments
Closed

Add Decoding of special chars #22

wokket opened this issue Aug 8, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@wokket
Copy link
Owner

wokket commented Aug 8, 2021

HL7 escapes special chars in various ways, eg \Cxxyy\ for arbitary unicode bytes, \F\ for the field separator char etc.

I'd like to add support for decoding these chars, but keep it separate from the current structs initially:

  • Make this a pay-to-play behaviour, if you're sure you don't have escaped characters (say, because you control the other end of the wire) we don't pay a performance penalty
  • Keep the existing files smaller/cleaner
@sempervictus
Copy link
Contributor

Feature like the mllp bit? If you dont control the wire then you take the hit until you know all your data is clean...

@wokket
Copy link
Owner Author

wokket commented Aug 9, 2021

A feature could work well actually, although it does complicate the testing etc matrix a bit.

Neatly solves the pay-to-play aspect without having to pass every, single, field, through a de-escaper of some sort...

I think I'd like to get your query stuff merged to master and a new release pushed for you pretty soon, and this can come in a +1 behind it. If you want to take this on feel free to assign yourself, otherwise if it's not something you have to deal with I'll look at it when I get a chance.

@wokket wokket added this to the 0.5 milestone Aug 9, 2021
@wokket wokket self-assigned this Aug 14, 2021
@wokket wokket added the enhancement New feature or request label Aug 14, 2021
wokket added a commit that referenced this issue Aug 14, 2021
…ecause of HL7's full on spec. This will prob come in stages.
@wokket wokket closed this as completed in 10c4a0a Aug 17, 2021
sempervictus pushed a commit to sempervictus/rust-hl7 that referenced this issue Aug 18, 2021
* WIP: starting on an escape sequence decoder

* feat wokket#22: WIP on escape sequence handling, not as easy as I'd hoped because of HL7's full on spec.  This will prob come in stages.

* feat wokket#22: Good progress on simple delimiter escape sequences

* feat wokket#22: Ensure highlighted text sequences (\N\, \H\)are ignored

* perf: better than halved the perf of the 'No escape sequence' benchmark using a regex(!) rather than a simple str.find()

* feat: Added support for ignoring custom (\Zdd\) escape sequences

* chore: docs pass, moved decoder into better module/location

* perf: Moved to the regex for all searching ops, about a 15% improvement in the benchmark

* docs

* docs: Added demo example for info on how to use the library

* docs: Docs pass

* feat: Added support for \X..\ escape sequences

* docs: Updated docs for \X\ sequences.
sempervictus pushed a commit to sempervictus/rust-hl7 that referenced this issue Aug 25, 2021
* WIP: starting on an escape sequence decoder

* feat wokket#22: WIP on escape sequence handling, not as easy as I'd hoped because of HL7's full on spec.  This will prob come in stages.

* feat wokket#22: Good progress on simple delimiter escape sequences

* feat wokket#22: Ensure highlighted text sequences (\N\, \H\)are ignored

* perf: better than halved the perf of the 'No escape sequence' benchmark using a regex(!) rather than a simple str.find()

* feat: Added support for ignoring custom (\Zdd\) escape sequences

* chore: docs pass, moved decoder into better module/location

* perf: Moved to the regex for all searching ops, about a 15% improvement in the benchmark

* docs

* docs: Added demo example for info on how to use the library

* docs: Docs pass

* feat: Added support for \X..\ escape sequences

* docs: Updated docs for \X\ sequences.
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