nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
940 stars 280 forks source link

[IDEA] The XML standard is that attribute order doesn't matter. #6360

Open frankparth opened 1 day ago

frankparth commented 1 day ago

When create OBX segments if the order of the XML children is out of order fields are being added that shouldn't exist and order is being rearranged in HL7 v2 representation.

In this specific case if in the XML version of the HL7 message has OBX.2.1 come before OBX.3.1 additional fields are created in the HL7 v2 version of the message. In our case the value in OBX.14.1 in the XML was being moved to OBX.16.1 in the v2 message.

1 code display system CWE ...

XML order should not matter.

pacmano1 commented 1 day ago

Build segments in order.

Or https://github.com/nextgenhealthcare/connect-examples/tree/master/Code%20Templates/Fix%20HL7%20Node%20Order

frankparth commented 1 day ago

Thanks pacmano1! Hope you're doing well! I already created a code template to do the same thing but why isn't fixHL7NodeOrder embedded in the solution?