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
Adding BHS and BTS segments
Andres Alvarez
Hello all. New to cloverleaf! I am sending out VXU messages from Cerner to Cloverleaf. The data recipient needs to have these BHS and BTS segments in each message. What would you suggest as the easiest way to accomplish this within cloverleaf?
My understanding is that we have thr ability to append the messages into a batch file. What I do not understand is how to get the segments in there if they are not standard segments.
Find more posts tagged with
Clovertech
Comments
jcobane1
Andres,
There are a few different approaches you can take with this. If they are simply looking for a BHS and BTS around every message, you could just add the BHS/BTS segments to the outbound message definition in your variant and handle/map to them in your Xlate. The BHS and BTS segments should be available to add to your message definition in the HL7 configurator tool. If they are looking to have the BHS and BTS segments around a group of messages in a file, then you'll need to write some tcl code to stick the BHS and BTS segments in your file after you have accumulated the group of desired messages.
Jim Cobane
Henry Ford Health
Andres Alvarez
It looks like I will be able to get away with posting the segments in start and end of every message for now. However, it seems that they will leverage the functionality of having such segments in the future when they are able to accept batches. I' probably have more experience with tcl then. I haven't been to a tcl class yet, but have experience with other languages. I am trying to get a working knowledge through the forum and historical examples.
One question to you. This may be simple, but I can't find anything on it. In an xlate preproc where the source is hard coded "=1" and the destination has a path... What is the syntax in an IF statement to check if anything exists there at all.
For example, If I wanted to check for a value there I'd do this...
set val $xlateInVals
if { $val == "1"} {
set xlateOutVals
6
} else {
}
What if I wanted to check for the existence of the segment or path at all? I've tried NULL, " ", and {} to no avail. I found ways around it, but knowing how to achieve it in this fashion will help me make shortcuts in the future.
I greatly appreciate any help.
jcobane1
The easiest way is to probably check for the existence of a required element for that segment, then if it exists you know the segment exists - i.e. for the PID segment the Set ID (PID.1) is required so you could have an IF statement something like:
IF 0(0).PID(0).#1(0).[0] ne
@null
then your actions within the body of the IF...
You would want to use the
@null
variable for checking whether something is null or not.
Hope the makes sense.
Jim Cobane
Henry Ford Health
Andres Alvarez
Makes perfect sense. I was able to make many modifications to make my test scenarios work with that piece of knowledge. I look at this as a hard coding success. Thank you.
I am now engaging something a little more complex. I can make leaps with one good example. I've been poking around with it without much success.
Using a %G1 with a 4(0).0 basis... I wanted to leverage the iterate counter using a a series of segments into becoming ascending set ids.
SOURCE
$%g1
4(0).0(0).OBR(0).#1(0).[0].[0]
COPY
pre proc is
set invalue [lindex $xlateInVals 0]
set itervar [lindex $xlateInVals 1]
incr itervar
set xlateOutVals
Destination
4(0).0($%g1).OBR(0).#1(0).[0].[0]
Running through it in my head and in practice tells me it should probably be a %S interation on BOLD text below because that is the variable.
4(0).0(0).OBR
(1)
.#1(0).[0].[0]
4(0).0(0).OBR
(2)
.#1(0).[0].[0] : >1<
Help with putting this together once will help me understand how it all comes together. I think I have the right ideas, but just don't know how to put it together here. My next scenario is the same thing using the math functions.
jcobane1
You could use the MATH ADD command to accomplish that. Use the $g1 and =1 as you input to the MATH command and then your output field would be the destination. No tcl required.
Jim Cobane
Henry Ford Health