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

Rewrite hl7 messages #56

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

tomunger
Copy link

@tomunger tomunger commented Mar 9, 2023

I made changes to accomplish two things.

First, Segment.assign_field() correctly re-writes values. The caller can redefine the structure of the hl7 message.

Second, a new function in Message and Segment, write_field(), first escapes the field and then calls assign_field(). This was my solution to provide write-with-escape in a backward compatible way.

(test_assign_fields.py/EscapeTest is known to fail.
Where the escape of a field is done needs to be
resolved.)
…the un-parsable escape to the output.

An optional parameter allows calling for errors to be logged.
Don't log the field value.  In the case of reports,
the field maybe very long
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant