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
How do I create an HL7 variant to insert FHS/BHS before MSH?
System
Originally posted by Justin Olson
I am trying to create a variant that will allow me to insert FHS and BHS prior to the MSH, but it will not let me.
Does anyone have any tips?
Thanks,
Justin
Find more posts tagged with
Clovertech
Comments
jcobane1
Justin,
You won't be able to create a variant with the BHS/FHS as the HL7 configurator is based on a 'message' paradigm, where BHS/FHS are used for a 'batch' of HL7 messages. You'll need to create(or remove) the BHS/FHS segments in a tps proc.
Hope this helps.
Jim Cobane
Henry Ford Health
Barb Dozier
You are right, it won't let you. Or at least we found that creating a tcl script took care of the issue. We had to create a file to send charges to meditech so we created a script that created the file and wrote the FHS/BHS segments at the same time. When the end of the desired messages was identified, the script then inserts the BTS/FTS segments as well.
Barb Dozier
System
Originally posted by Justin Olson
Thank you both for your replies. Is that script something that can be shared? In the past when we've sent data to clients that use Meditech the clients apply these headers and trailers. This will most likely not be the case here.
Barb Dozier
Below is a section of code where we create the file and add the fhs/bhs segments. This snippet is in the RUN section of a tps proc. Hope this helps.
set slash "\"
set carrot "^"
set rep "~"
set sub "&"
set field "|"
set sendApp $systemName
set fhs "FHS"
set bhs "BHS"
set recApp "BAR"
set msgCtl ""
set segEnd r
# set directory path
set root_path [exec env HCIROOT]
#echo "ROOTpath: $root_path"
set site_path [exec env HCISITEDIR]
#echo "SITEpath: $site_path"
append site_path "/billingOUT/"
#echo "SITEpath: $site_path"
;# Get the time in system seconds
set systemTime [clock seconds]
;# Set the time using the hour, minute and second descriptors.
set CurDate [clock format $systemTime -format {%Y%m%d}]
set CurDateTime [clock format $systemTime -format {%Y%m%d%H%M}]
#echo "CurDate: $CurDate"
# set the user data... for the message
set filename [append systemName "." $hosp "." $CurDate]
set fullname $site_path$filename
if {![file exists $fullname] } {
echo "File doesn't exist"
set curFileID [open $fullname a+]
puts $curFileID $fhs$field$carrot$rep$slash$sub$field$sendApp$field$hosp$field$recApp$field$hosp$field$CurDateTime$segEnd
puts $curFileID $bhs$field$carrot$rep$slash$sub$field$sendApp$field$field$field$field$CurDateTime$segEnd
close $curFileID
}
System
Originally posted by Rick Pritchett
Do you use a seperate proc to add the BTS and FTS segments. (a pre and post proc). Or do you do this all at once?
Barb Dozier
We actually do it separately. Code section is basically the same but we add the trailer segments in the same script that we move the file where it needs to go.
Barb
System
Originally posted by Rick Pritchett
Might i see the code to do this i am also interested in how you are moving the file. I would like to use ftp as little as possible. Before i used a simple bat file in the task manager to rename and another to move the file to a mapped drive.
Mike Grieger
Though I also prefer to take care of headers/trailers in a tcl proc, it IS possible to add them to a variant. You just have to add it manually, outside of the GUI. Used to have this configuration on a billing interface.
Barb Dozier
What do you mean and how do you do it "outside the GUI"?
Barb
Mike Grieger
I mean manually edit the variant message type by using your text editor of choice (vi for Unix or notepad for Windows, etc.). If we're talking about the DFT message type, navigate to that variant/message type from command line, and edit it.
If that message type would be (as a simplified example):
MSH
PID
FT1
edit it to be
FHS
{
MHS
PID
FT1
}
FTS
Then the Xlate will recognize that structure.
Barb Dozier
Our move process is actually a couple steps. First we get all files into a central directory and then use Samba to move them off our AIX machine to the multiple resulting locations.
I've attempted to attached example scripts that we call from cron for this process. If you have issues accessing them, please contact me directly.
Thanks, Barb