Appendix A: Docsplitter File Formats

Annotated Example Script Files

Example 1 – Windows Batch File

    @echo off
    set BinDir=C:\Foresight\Instream\Bin\
Must be the BIN directory under Instream’s directory
    set InputDir=C:\Foresight\Instream\DemoData\
Directory containing the EDI input text file
    set OutputDir=C:\Foresight\Instream\DemoData\Output\
Directory where results will be written
    set Guideline=PDSA835
GuidelinePlus for Instream to use
    set EDIInput=%InputDir%835_Data.txt
Path and filename to the EDI Input file
    set HVResults=%OutputDir%835_Results.txt
Path and filename to the validation detail results file
    set Valid=%OutputDir%835_Valid.txt
Path and filename to the valid EDI output file
    set Invalid=%OutputDir%835_Invalid.txt
Path and filename to the invalid EDI output file
    set Report=%OutputDir%835_Report.xml
Path and filename to the Docsplitter report file
    cd "%BinDir%"
Go to the Bin directory before executing
    @echo Running data through Instream...
    HVInStream.exe -i"%EDIInput%" -o"%HVResults%" -g%Guideline%
Execute Instream
    @echo Running data through Docsplitter...
DocSplitter.exe -i"%HVResults%" -d"%EDIInput%" -r"%Report%" - ov"%Valid%" -oi"%Invalid%" -l0 -fxp -cb
Execute Docsplitter, report valid and invalid claims, with debug           logging, to an XML report
    @echo Finished
    pause

Example 2 – Windows Batch File

This file is designed so that you can make most changes at the top and not have to edit the entire file. Frequently changed places are circled below.

@echo off
rem InStreamRoot is set to root Instream dir during install
set InStreamRoot=E:\Foresight\Instream
set BinDir=%InStreamRoot%\Bin
set InputDir=%InStreamRoot%\DemoData
set OutputDir=%InStreamRoot%\Output
rem Input File assumed to have .txt extension
set RootFile=Tutorial837IA
set Guideline=PDSA837I
set EDIInput=%InputDir%\%RootFile%
set HVResults=%OutputDir%\%RootFile%_Results.txt 
set Valid=%OutputDir%\%RootFile%_Valid.txt
set Invalid=%OutputDir%\%RootFile%_Invalid.txt
set Report=%OutputDir%\%RootFile%_Report.xml
 

validation

 

@echo Running data through Instream... "%BinDir%\HVInStream.exe" -i"%EDIInput%" -o"%HVResults%" -g%Guideline%   rem Test for Instream error (an ERRORLEVEL > 100 is an error) if NOT ERRORLEVEL 101 goto noiserror @echo. @echo [ERROR %ERRORLEVEL%] There was a problem running HVInStream.exe. @echo See the file %HVResults% for details. @echo. goto end   :noiserror

Docsplitter

 

@echo Running data through DocumentSplitter... "%BinDir%\DocSplitter.exe" -i"%HVResults%" -d"%EDIInput%" -r"%Report%" -ov"%Valid%" -oi"%Invalid%" -l0 -fxp -cb   rem Test for Docsplitter error (an ERRORLEVEL > 100 is an error) if NOT ERRORLEVEL 101 goto nodserror @echo. @echo [ERROR %ERRORLEVEL%] There was a problem running DocSplitter.exe. @echo See the file %Report% for details. @echo. :noderror @echo Finished - Results can be found in %OutputDir% : end pause

Example 3 – Windows Batch File

"C:\Foresight\Instream\Bin\HVInStream.exe" 
-i"C:\Foresight\Instream\DemoData\Tutorial837IA.txt"
-o"C:\Foresight\Instream\Output\Tutorial837IA_Results.txt"
-gPDSA837I
"C:\Foresight\Instream\Bin\DocSplitter.exe" 
-i"C:\Foresight\Instream\Output\Tutorial837IA_Results.txt"
-d"C:\Foresight\Instream\DemoData\Tutorial837IA.txt"
-r"C:\Foresight\Instream\Output\Tutorial837IA_Report.xml"
-ov"C:\Foresight\Instream\Output\Tutorial837IA_Valid.txt"
-oi"C:\Foresight\Instream\Output\Tutorial837IA_Invalid.txt"
-fxp -cb -l1 pause
  1. Command to run validation. Put paths and filenames in quotation marks if they contain spaces.

  2. Command to run Docsplitter.

  3. The detailed results file written by validation now becomes input to Docsplitter.

  4. The same EDI file used as input by validation is also input to Docsplitter.

  5. The report file to be written by Docsplitter.

  6. The valid EDI file to be written by Docsplitter.

  7. The invalid EDI file to be written by Docsplitter.

  8. -fxp means the report format is to be XML. The -cb means the report is to contain information about valid and invalid EDI. The -l1 means no logging information should be placed in the report.

Example 4 – Unix Batch File

#!/usr/bin/sh
export FSINSTREAMINI=/HVInStream/bin
export LIBPATH=/HVInStream/bin:$LIBPATH
 
/HVInStream/bin/HVInStream -i"/HVInStream/DemoData/Tutorial837IA.txt" 
-o"/HVInStream/output/Tutorial837IA_Results.txt" -gPDSA837I   echo "validation return code = " $?   /HVInStream/bin/DocSplitter -i"/HVInStream/output/Tutorial837IA_Results.txt"
-d"/HVInStream/DemoData/Tutorial837IA.txt"
-r"/HVInStream/output/Tutorial837IA_Report.xml"
-ov"/HVInStream/output/Tutorial837IA_Valid.txt"
-oi"/HVInStream/output/Tutorial837IA_Invalid.txt" -fxp -cb -l1   echo "Docsplitter return code = " $?