You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that modifies HL7 messages and have run into a couple bugs. Your documentation say that the library may eventually contain the ability to create HL7.
Modifying a field to greater depth fails
MSH|^~\\&|field|rep1~rep2|
A call to
seg.assign_field("NewRep", 3, 1)
Will fail because the field object contains a string, not a repetition. The desired behavior is to replace the sting with a repetition containing the new value.
I have a fix for this.
Added fields are not escaped.
Fields get added through Segment.assign_fields(). My first thought was to add escaping to this method. However, this breaks several tests that construct HL7 message. It does not appear to break parsing, but it does break creation of ACK messages.
I'm not sure what a fix for this should be. Candidates:
All code that adds fields call escape() explicitly.
Code alternate to assign_fields() that escapes the value before writing.
If given some guidance, I'll implement that fix and then offer a pull request.
The text was updated successfully, but these errors were encountered:
I'm working on a project that modifies HL7 messages and have run into a couple bugs. Your documentation say that the library may eventually contain the ability to create HL7.
A call to
Will fail because the field object contains a string, not a repetition. The desired behavior is to replace the sting with a repetition containing the new value.
I have a fix for this.
Fields get added through
Segment.assign_fields()
. My first thought was to add escaping to this method. However, this breaks several tests that construct HL7 message. It does not appear to break parsing, but it does break creation of ACK messages.I'm not sure what a fix for this should be. Candidates:
escape()
explicitly.assign_fields()
that escapes the value before writing.If given some guidance, I'll implement that fix and then offer a pull request.
The text was updated successfully, but these errors were encountered: