› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › How do I create an HL7 variant to insert FHS/BHS before MSH?
Does anyone have any tips?
Thanks,
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
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
}
Barb
Barb
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.
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