Check if a node is a leaf node

Added by iNTERFACEWARE

Use node.isLeaf() to check if a node is a leaf node (has no children), works for all node types

Source Code
   local Msg, Name = hl7.parse{vmd='example/demo.vmd', data=Data}
   
   -- test if the patient birth time is is a leaf node
   local isleaf = Msg.PID[7][1]:isLeaf()
   --> true
   
   -- test if the patient "Family Name" is a leaf node
   local isleaf = Msg.PID[5][1][1]:isLeaf()
   --> false
Description
Use node.isLeaf() to check if a node is a leaf node (has no children), works for all node types