Cloverleaf produced the following Excel freindly tab delimited files from this morning’s daily pharmacy charge file run:
2013.06.12__05.38.42__prod_batch_020__charges_in_CDM_table_but_bogus_math_number.log
2013.06.12__05.38.42__prod_batch_020__charges_in_CDM_table_missing_UOM.log
2013.06.12__05.38.42__prod_batch_020__charges_in_CDM_table_quantity_changed.log
2013.06.12__05.38.42__prod_batch_020__charges_in_CDM_table_quantity_not_changed.log
2013.06.12__05.38.42__prod_batch_020__charges_not_in_CDM_table.log
2013.06.12__05.38.42__prod_batch_020__credits_DOS_before_golive_quantity_not_changed.log
Our batch integration for pharmacy is about 20,000 charges per day runnning up around 5 million dollars so to big to do any analysis without creating some Excel friendly files.
In my case I made them tab delimited to avoid any commas that might be in the fields but the concept is still the same for CSV or tab delimited.
My soultion met my needs but not exactly effeicient becuase the lines are appended to my Excel files during the xlate based on the conditions indicated by the file names.
That means I have the overhead of open/close for each line appended to a Excel friendly file but I gain the flexibility of inserting the appends in the xlate at exactly the right spot.
I ended up liking it overall and these supplemental Excel friendly files have made visible concerns that had been hidden previously.
The bulk of the work is done by a xlate proc ( xlt_020_append_next_line_to_file.tcl ) I wrote seen below:
# Begin Module Header ==========================================================
#
#——
# Name:
#——
#
# xlt_020_append_next_line_to_file
#
#———
# Purpose:
#———
#
# Append the next line to file,
# which can be useful to create an audit log file from an xlate.
#
#——–
# Inputs:
#——–
#
# xlateInVals 1 = dir_name
#
# xlateInVals 1 = file_name
#
# xlateInVals 2 = next_line
#
#———
# Outputs:
#———
#
# xlateOutVals = not used so be sure to use a CALL and not a COPY in the xlate
#
#——-
# Notes:
#——-
#
# The dir_name specified has to already exist or an ERROR will be generated an no action will be taken.
#
# If the file_name doesn’t already exist it will be created but a WARNING will be issued generated.
#
#———
# History:
#———
#
# 2009.04.14 Russ Ross
#
[code]
# Begin Module Header ==========================================================
#
#
# Name:
#
#
# xlt_020_append_next_line_to_file
#
#
# Purpose:
#
#
# Append the next line to file,
# which can be useful to create an audit log file from an xlate.
#
#
# Inputs:
#
#
# xlateInVals 1 = dir_name
#
# xlateInVals 1 = file_name
#
# xlateInVals 2 = next_line
#
#
# Outputs:
#
#
# xlateOutVals = not used so be sure to use a CALL and not a COPY in the xlate
#
#
# Notes:
#
#
# The dir_name specified has to already exist or an ERROR will be generated an no action will be taken.
#
# If the file_name doesn’t already exist it will be created but a WARNING will be issued generated.
#
#
# History:
#
#
# 2009.04.14 Russ Ross
#
Russ Ross
RussRoss318@gmail.com