-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
Hello,
I'm experiencing unexpected behavior when populating an OBX segment. Specifically, when I add data to an OBX segment like this:
from hl7apy.core import Message
m = Message()
m.obx.obx_5.datatype = 'ED'
m.obx.obx_5.ed_1 = ''
m.obx.obx_5.ed_2 = 'IM'
m.obx.obx_5.ed_3 = 'JPEG'
m.obx.obx_5.ed_4 = 'Base64'
m.obx.obx_5.ed_5 = 'SomeData'The resulting OBX message is:
OBX|||||
However, when I remove the child names using the following code:
from hl7apy.core import Message
m = Message()
m.obx.obx_5.datatype = 'ED'
m.obx.obx_5.ed_1 = ''
m.obx.obx_5.ed_2 = 'IM'
m.obx.obx_5.ed_3 = 'JPEG'
m.obx.obx_5.ed_4 = 'Base64'
m.obx.obx_5.ed_5 = 'SomeData'
for child in m.obx.obx_5.children:
child.name = NoneI get the expected output:
OBX|||||^IM^JPEG^Base64^SomeData
This seems like a workaround that shouldn't be necessary.
Expected Behavior: The first example should produce the expected OBX message with the populated data, without needing to manually remove child names.
Could you please confirm if this is an unintended behavior or if there's something I'm overlooking? I'd appreciate any guidance on how to resolve this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels