Question
· May 17, 2023

Looping through repetitive HL7 segment groups in business rule

Hi,

we get HL7 ORU messages from a laboratory system. Messages that do not contain an observation date should not be forwarded to the business operation. My problem is that the observation date can be in any repetition of the ORCgrp. How can I loop through the ORCgrps in a business rule?

Regards

Robert

Product version: HealthShare 2017.2
$ZV: Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2 (Build 865_0_18359U) Wed Jul 25 2018 16:08:01 EDT [HealthShare Modules:Core:15.032.9686 + Linkage Engine:15.032.9686]
Discussion (7)4
Log in or sign up to continue

This should work (no looping required):

I'm using the parenthesis syntax with the Matches() function to locate a pattern of any number of punctuation characters (.P) followed by 8 numeric characters (8N) followed by any number of any character (.E).

The parenthesis syntax returns the repeating values in the form "<><><20230512191543><>" where <> represents an empty iteration of the repeating field (and fortunately qualifies as a punctuation character).

I'm trying to do something similar, but the condition is checking the number of OBX segments in messages that can contain multiple ORC groups. The condition pasted below does not work. It also does not work if I replace the curly braces with parentheses. The only way it works is if both a PIDgrpgrp index is included and an ORCgrp index is included, and only if the outer punctuation characters are curly braces, not parentheses. We're on HealthShare version 2023.1.3.