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
Iterate vrl to hl7
Jayne Stutz
I am brand new to Cloverleaf, just finished level 1 class. I have built my first translation, vrl to hl7. It worked to a point. I have reviewed other posts on this topic but not finding one to match what I'm doing. Please forgive me if I missed it.
I have a vrl file, 10 records, fields delimted by |. I need to create MSH, MFI, then repeating groups of CD1, CD2, CD3. Currently my output is creating repeats of MSH, MFI, CD1, CD2, CD3.
I know I need to use the iterate function. I want to repeat the group of CD segments. But I don't understand what to put in the basis and what/where to assign the variable. I tried to put group 1 in the basis, it shows as ~1. I get an error Unable to get iteration basis address '1(0).CD1(0)' I don't know what to copy from the source because it's multiple fields into each segment.
Hope I have explained this correctly. Thanks in advance for any assisstance you can give me.
Find more posts tagged with
Clovertech
Comments
Tom Rioux
Jayne,
You mentioned you were getting the following error:
Unable to get iteration basis address '1(0).CD1(0)'
I would imagine that you have the CD1, CD2, and CD3 grouped together in your variant. If that is the case, try using the just the group indicator as your basis. Try entering "1(0)" as your basis and see if that gets you the desired results.
I'd be curious to see your code since you say the MSH is repeating as well.
Thanks...
Tom Rioux
Baylor Health Care
RobertKersemakers
Hi Jayne,
I'm a bit confused...
If the vrl is the inbound format, then you should be iterating over a basis within the vrl. And not within the HL7 outbound format.
Jayne Stutz
I may not have clearly defined what I have and what I want to create. I have 1 source file with 3 records in it, vrl format, delimited by a |. Example:
1235|this is an item||||xx456
4567|this is another item||||xx567
59688|this is a third item||||xx998
These data elements belong in various places in the CD1, 2, and 3 segments
I want 1 destination file, a batch file, with repeating groups of segments, except for MSH and MFI.
Example:
MSH|~^&||||||||
MFI|CDM||
CD1|1235||||
CD2|||||
CD3|||||
CD1|4567||||
CD2|||||
CD3|||||
CD1|59688||||
CD2|||||
CD3|||||
My CD1,2,3 is a repeating group in my message, so this part is fine. But I don't want multiple messages, therefore I don't want more then 1 MSH and MFI.
If anyone has done anything like this, I appreciate your help. But I can't use tcl yet, I don't know it enough, so I need to figure it out within the gui.
Thanks.
RobertKersemakers
You can do this without tcl, but you need to define an HRL as your inbound format. This HRL consists of (one or more of) the VRLs you already defined.
By using this HRL as your inbound format in the translation, you can then iterate throught the VRL's and fill the CD1/2/3 segments, while only creating one MSH messages.
Hope this gives you an indication on how this works. The difficulty lies in defining the Repeat Options of the VRLs in the HRL. I always use the Repeat While option, but I'm not sure if this is possible in your case.