Unfortunately, the repeating elements in the HL7 are not supported by the hpath. I will enter an enhancement to see if this can be supported.
However using stringUtils we can support you finding this value using the code below.
//define variable for nte3.2 value when found
var nte32DateOfIllness = '';
// Split the nte=3 segment into seperate values
var nte3split = StringUtils.splitByWholeSeparator(message.getNode('NTE-3'), '~');
//Loop through each NTE-3 value and look for Dateofillness
for (var i = 0; i < nte3split.length; i++) {
//split the value into separate strings
var nte3valueSplit = StringUtils.splitByWholeSeparator(nte3split[i], '^');
//Evaluate if this is the value we want
if (StringUtils.equalsIgnoreCase(nte3valueSplit[0], 'Dateofillness')) {
//if Dateofillness is found in nte-3.1 then set nte32DateOfIllness to nte-3.2
nte32DateOfIllness = nte3valueSplit[1];
}
}
qie.debug(nte32DateOfIllness);