- uSetup Submission Type Setup
- RPPreProcess Program
- Check for Archived copy
- Archive the original
- Capture MD5Sum.
- Call the Preprocessing program
- Suggested processing
- Check results
1. uSetup Submission Type Setup
To enable PreProcessing open uSetup and select the desired Submission Type.
Edit the Submission Type and enter the PreProcessing Program Name and the Parameters that need to be passed to the Program in the PreProcess Program field There are 40 Characters for the Program name and Parameters. The use of Batch Files is useful if the actual program name is too long.
For Parameters the following may be used:
$FILE – This is the current name of the Submitted file.
$OFILE – This is the original name of the file
$FPATH - This is the current location of the Submitted file.
The values for these can be seen in uControl by double-clicking on a submission
To setup the PreProcess for Program MEDMAN.bat which requires the old file name, new filename and file path enter the following into Usetup, Submisison Type maintenance:
MEDMAN.bat “$OFILE” $FILE “$FPATH”
If the data contains spaces then “ should surround the parameters. Additional Parameters may be provided as long as they fit in the 40 Character limit. Fixed values should be placed in the Batch File. As an example the File path is fixed in Uluro (the submit directory). This can be passed in the Batch file instead if desired.
This would appear in Usetup as
2. RPPreProcess Program
The RPPreProcess program is called after the file is received from FTP, Web, or Email.
During PreProcessing a log file will be created. The Logfile will be placed in the Processing directory and named for the date and time of processing in the format of YYYYMMDDHHMMSS.log.
The Processing Directory will be directory setup in Usetup processes for the PreProcessing.
If this is blank then the Processing Directory will be the directory where the RPPreProcessing program is located..
The RPPreProcess Program will perform the following
3 Check for Archived copy
The Program will look in the Archive directory for a prior copy of the Data file. If found it will copy the file back to the Submit directory for processing. This insures that resubmissions will be processed from the original datafile instead of the processed datafile.
4 Archive the original
The original data file will be copied to the Archive directory. The Archive directory will be a directory called ARCHIVE under the Processing directory. The Archived file is used later if the submission is resubmitted.
5 Capture MD5Sum
The MD5Sum of the file before PreProcessing will be determined.
6 Call the Preprocessing program
The RPPreprocessing program will create a batch file. The batch file will be placed in the Processing directory and named for the Current Submission file name plus “.bat”. This batch file will contain the program and parameters that are setup in Usetup.
The format of the batch file will be
“PreProcess Program” Parameters
Exit
For the example above of MEDMAN.bat “$OFILE” $FILE “$FPATH” this would result in a Batch file of
MEDMAN.bat “ORIGINALFILENAME.txt” 20121001154151887MEDMAN “\\192.168.1.194\shared\submit\”
Exit
If the file was processed successfully the created batch file will be deleted. If an error occurred the batch file will not be deleted.
7 Suggested processing
It is suggested that the Preprocessing program setup on the Submission Type maintenance should create a temporary directory. Copy the file into the directory. Then process the file. A log file should be created for Debugging. When processing is complete create a result file in either the Processing directory (not the Temporary directory) or the Submission file directory. If the Processing was successful then the Result file should contain
Result=0
If the Processing was not successful then the Restul file should contain
Result=1
Successful processing should copy the processed file from the Temporary directory into the Submission directory with the current file name. This will overwrite the existing file. The Temporary directory and all files within the Temporary directory should be deleted.
UnSuccessful processing should leave the Temporary directory for use in debugging the processing.
8 Check results
When the PreProcessing is finished the RPPreProcessing program will look for a file in the Processing directory named for the Submission file with the extension “.result”. The result file is not found in the Processing directory RPPreProcessing will look in the Submission file directory for the file.
If the result file is found the value of Result in the Result file will be used to determine the Success of the Processing.
If the result file is not found in the Submission file directory then the Program will check the MD5SUM of the processed file. If the MD5Sum has changed then RPPreprocessing will assume the file was processed successfully.
If Successful the Result file will be deleted.
If Preprocessing was not successful the files will not be deleted and the Submission will be placed in Error Status. When this occurs look for the Logfiles and determine the reason for the Failure. The submission can then be resubmitted.
0 Comments