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 (4)2
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).