Reputation: 191
I was trying to create segment MSH in a HL7 message
from hl7apy.core import Message, Segment, Field
def create_msh():
msh = Segment("MSH")
msh_2 = Field("msh_2")
msh_2.value = "^~\&"
msh.add(msh_2)
print(msh.value)
return msh
create_msh()
The print result is:
MSH|^~\
Do not know why the last symbol ampersand & is NOT added to the second field in MSH segment. How to fix this issue? Your help is appreciated.
Regards, Arthur
Upvotes: 1
Views: 64