I am attempting to convert a single JSON field into multiple HL7 NTE segments based on the number of comma separated values.
Example:
JSON Input
"caseComments" : "+ ABC, + CBA, + CAB",
HL7 Output
NTE|1|+ ABC|
NTE|2|+ CBA|
NTE|3|+ CAB|
Number of comma separated values changes per message
Normally the JSON has multiple separate segments with an individual value in each and I can split based on a predetermined number of values.
But, I am unsure how to take the string split it into an array with different amounts each time and map each value to a single NTE each.