This topic contains 1 reply, has 2 voices, and was last updated by  Eliot Muir 9 years, 2 months ago.

How to serialize an HL7 message of type "userdata" into JSON?

  • Hi,

    I’ve been trying to change a simple MSH|….. segment into JSON format.

    Is there a way to do this in Iguana?

    My HL7 message is of type ‘userdata’, and the json APIs take tables or strings.

    Any pointers would be helpful to me.

    Thanks!

    The ability exists to iterate through node trees by using the following:

    1. The # operator gives you the count of a node’s children.
    2. The :nodeType() method gives the type of the node.
    3. And :nodeValue() gives you the value of a node.

    That gives you enough of an API to iterate through a HL7 tree and construct a JSON structure of your choosing.

You must be logged in to reply to this topic.