infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
need help with using repeat and condition options for HRLs
Nancy McDaniel
I am needing to translate a ORU result message to a file with a pipe header in the first line. The rest of the document will be copied from the OBX segments on the ORU message which could be 1 big OBX or multiple OBX segments, each one representing a line.
I may also need to copy information from the NTE segments associated with the OBX segments.
What is the best way to handle this in a HRL? I created a VRL called TA_Header which has fields that make up the first line of the document with fields separated by |.
Then, I created TA_Detail VRL which represents the lines of the documents. I then created the HRL which has both files in its structure.
If I just say it repeats 5 times for example, it works fine.
I have looked at the documentation for using the repeats and conditions but haven't figured out the best way to do this.
It seems like I could set some kind of condition that repeats until no more OBX. What are the Repeat Block and the Repeat While used for and how would I set them up to accomplish what I need to do.
thanks,
Nancy Hellyer
The Vancouver Clinic
Software Analyst
(360) 397-3222
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Nancy,
I have zero experience with HRL but as far as working through the OBX repetitions, just ITERATE over the OBX in your Xlate and that will happen as many times as there are OBX segments.
Jim Kosloskey
Nancy McDaniel
I am familiar with the iterate but it appears that I have to have some kind of repeat logic in the hrl setup itself for this to work.
I could try setting some large number of repeats but would like to know more about how to use these options within HRL.
thanks,
Nancy
System
Originally posted by John Perks
Yes, in order for your HRL segment to be considered repeating, like a repeating segment in an HL7 message, you must check off one of the "Repeat Options" in the "Segment Properties" of the HRL configuration.
I had a fixed record length input file, with multiple record types, with the record type identified by three characters in a fixed position.
I checked off the "Repeat While" option in the "Segment Properties", and set the "Field" to the FRL field corresponding to the record type, and the "Value" to what is expected in that field.
Until I set it up this way, the HRL worked fine until it hit a "segment" or record type that was not expected; i.e. if I set up the HRL with Z00, Z01, Z02, Z03 records, all non-repeating, and the Z02 repeated, the Xlate quit processing when it encountered the 2nd Z02 record. Once I set it up as repeating, it processed all of them and continued.
And Jim is right, just use the ITERATE action in your Xlate on the repeating segment (FRL).
If this explanation was all too concise and you need further help, you may email me.