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
alirizaadiyahsi
changed the title
Get empty property names while parsing to XML.
Get property names that have no data while parsing to XML.
Aug 29, 2023
10.5 Fields (2.5) ... In the traditional sequence oriented approach, empty fields (containing no data) are denoted as two vertical bars �||� in sequence to express the empty contents. This is essential in sequence-oriented approaches. In v2.xml an element with no contents simply can be omitted (unless explicit use of the "" is required to force a data delete action by the receiving application, see section �2.7.6. Delete Indicators, Empty Values�). In the example above there is no information for EVN.5, thus the element is omitted in the corresponding XML instance.
10.6.2 Composite Data Types (2.6.2) ... Also, empty components may be omitted in the v2.xml encoding, whereas empty components in the traditional encoding must specify an empty component by two component delimiters �^^�in sequence in order to preserve sequence.
10.7.6 Delete Indicators, Empty Values (2.7.6)
Where a sending system can ascertain that a data field has been deleted, then the two double quote marks ("") will be used to define the state of that data field. An encoded field with a value of two double quote marks ("") would instruct the receiving system to delete the contents in the database field.
If the state of a blank or null data field cannot be determined, the sending system will send the empty value or omit the element at all. An encoded field with an empty value or a missing element would instruct the receiving system to bypass processing and does not affect an already existing value in the corresponding receiving database.
The occurrence of an empty element is treated as not existing to keep backward compatibility with ER7.
its not clear if encoding empty xml nodes would confuse receiving systems.
I am trying to create a tree by parsing hl7 message to XML.
But XmlParser is checking if the component has DATA, if not then it is not adding that prop to XML tree.
Here is the nhapi code that checks if component has data:
Here is the example HL7 message.
MSH|^~\&|FDHL7|JOHNSON LABS||P1055|201007231634||ORU^R01|P1055–0000047907|P|2.3|1||NE|NE PID|1|JQ4988|108512373||SAMPLES^JUNIOR||01/10/1948^53 Y|M|||^******^^|||||||| NTE|1|P|**************************************************************************** ADD|NON FASTING
and here is the output (XML)
For example, as you see MSH.5, MSH.8, MSH.14 are missing.
Here is the output (tree)
And here is my code:
What about adding a parser option to add properties that have no data?
Or is there a way/workaround to do this?
The text was updated successfully, but these errors were encountered: