Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBCICME

IBCICME.m

Go to the documentation of this file.
  1. IBCICME ;DSI/ESG - IBCI CLAIMSMANAGER ERROR REPORT ;6-APR-2001
  1. ;;2.0;INTEGRATED BILLING;**161**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. NEW STOP,IBCIRTN,DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT,POP,RPTSPECS
  1. ;
  1. S STOP=0
  1. S IBCIRTN="IBCICME"
  1. W @IOF
  1. W !?10,"ClaimsManager Error Report",!
  1. ;
  1. ; If there are no errors currently stored in the file,
  1. ; then there is no point in going any further.
  1. I '$D(^IBA(351.9,"AEC")) D G EXIT
  1. . W !!?5,"There are no errors currently recorded in the ClaimsManager"
  1. . W !?5,"file. There is no data to report."
  1. . W !! S DIR("A")="Press RETURN to continue",DIR(0)="E" D ^DIR K DIR
  1. . Q
  1. ;
  1. ;
  1. A10 D ERRCODE I STOP G EXIT
  1. A20 D DATE^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A10
  1. A30 D DTRANGE^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A20
  1. A40 D STATUS^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A30
  1. A50 D TYPE^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A40
  1. A60 D ERRDISP I STOP G:$$STOP^IBCICMS EXIT G A50
  1. A70 D SELASN^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G:RPTSPECS("TYPE")="S" A50 G A60
  1. A80 D ASSIGN^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A70
  1. A90 D SORTBY^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A80
  1. A100 D ERRTXT I STOP G:$$STOP^IBCICMS EXIT G A90
  1. A110 D COMMENTS^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A100
  1. A120 D DEVICE^IBCICMS(IBCIRTN) I STOP G:$$STOP^IBCICMS EXIT G:RPTSPECS("TYPE")="S" A50 G A110
  1. ;
  1. EXIT ;
  1. QUIT ; quit from routine
  1. ;
  1. COMPILE ; This entry point is called from EN^XUTMDEVQ in either
  1. ; direct mode or queued mode.
  1. NEW IBCISCNT
  1. D BUILD^IBCICME1 ; compile report
  1. I '$G(ZTSTOP) D EN^IBCICMEP ; print report
  1. D ^%ZISC ; close the device
  1. KILL ^TMP($J,IBCIRTN) ; kill main scratch global
  1. KILL ^TMP($J,IBCIRTN_"-TOTALS") ; kill totals scratch global
  1. I $D(ZTQUEUED) S ZTREQ="@" ; purge the task record
  1. COMPX ;
  1. QUIT ; quit from routine
  1. ;
  1. ;
  1. ;
  1. ERRCODE ; This procedure displays the error codes currently in the file and
  1. ; lets the user select all of them or some of them.
  1. ;
  1. NEW J,ERR,PCE,NUM
  1. KILL ^TMP($J,"IBCICME ERROR CODES")
  1. ;
  1. ; The first entry should be ALL
  1. S J=1,ERR="ALL Error Codes in the ClaimsManager File"
  1. S ^TMP($J,"IBCICME ERROR CODES",J)=ERR
  1. S DIR("A",J)=$J(J,12)_" "_ERR
  1. ;
  1. ; Loop through all error codes to build the arrays
  1. S ERR=""
  1. F J=2:1 S ERR=$O(^IBA(351.9,"AEC",ERR)) Q:ERR="" D
  1. . S ^TMP($J,"IBCICME ERROR CODES",J)=ERR
  1. . S DIR("A",J)=$J(J,12)_" "_ERR
  1. . Q
  1. S DIR("A",J)=" " ; blank line before the prompt
  1. ;
  1. S DIR(0)="L^1:"_(J-1)
  1. S DIR("A")="Please Select the Error Codes to include"
  1. S DIR("B")=1
  1. S DIR("?",1)=" This response must be a list or range."
  1. S DIR("?",2)=" For example, 1,3,5 or 2-4,8"
  1. S DIR("?",3)=" "
  1. S DIR("?",4)=" If you include #1, then all codes will be included"
  1. S DIR("?")=" regardless of what you enter here."
  1. D ^DIR K DIR
  1. I $D(DIRUT) S STOP=1 G ERRCODEX
  1. ;
  1. ; Add a comma to the front of Y so the $F will work
  1. ; Check to see if the user response included ALL CODES
  1. S Y=","_Y
  1. KILL RPTSPECS("SELECTED ERRCODES")
  1. S RPTSPECS("ALL ERRCODES")=0
  1. I $F(Y,",1,") S RPTSPECS("ALL ERRCODES")=1 G ERRCODEX
  1. ;
  1. ; remove the leading the trailing commas and then build the list
  1. S Y=$E(Y,2,$L(Y)-1)
  1. F PCE=1:1:$L(Y,",") D
  1. . S NUM=$P(Y,",",PCE),ERR=""
  1. . I NUM'="" S ERR=^TMP($J,"IBCICME ERROR CODES",NUM)
  1. . I ERR'="" S RPTSPECS("SELECTED ERRCODES",ERR)=""
  1. . Q
  1. ;
  1. ERRCODEX ;
  1. KILL ^TMP($J,"IBCICME ERROR CODES")
  1. Q
  1. ;
  1. ;
  1. ERRTXT ;
  1. I RPTSPECS("TYPE")="S" S RPTSPECS("DISPLAY ERROR TEXT")=0 G ERRTXTX
  1. ; Only ask question if it is a detailed report
  1. W !
  1. S DIR(0)="Y"
  1. S DIR("A")="Do you want to see the ClaimsManager Error Messages for these bills"
  1. S DIR("B")="YES"
  1. S DIR("?",1)=" Enter YES if you would like to see the full description of the error"
  1. S DIR("?",2)=" including all lines of error message text."
  1. S DIR("?")=" Enter NO if you do not want to see this information."
  1. D ^DIR K DIR
  1. I $D(DIRUT) S STOP=1 G ERRTXTX
  1. S RPTSPECS("DISPLAY ERROR TEXT")=+Y
  1. ERRTXTX ;
  1. Q
  1. ;
  1. ;
  1. ERRDISP ; get the error display type (esg - 6/12/01)
  1. I RPTSPECS("TYPE")="S" S RPTSPECS("ERROR DISPLAY TYPE")=1 G ERRDISPX
  1. ; Only ask question if it is a detailed report
  1. NEW CH
  1. W !
  1. S CH="1:Display all ClaimsManager Errors for a Bill;"
  1. S CH=CH_"2:Display all Bills for a ClaimsManager Error Code"
  1. S DIR(0)="SO^"_CH
  1. S DIR("A")="Select the Error Display Type"
  1. S DIR("B")=1
  1. S DIR("?",1)=" The answer to this question will determine how the Bills and Errors"
  1. S DIR("?",2)=" are displayed on the report."
  1. S DIR("?",3)=" "
  1. S DIR("?",4)=" Select option 1 if you want to display all of the ClaimsManager"
  1. S DIR("?",5)=" errors for each bill that appears on the report. These errors will"
  1. S DIR("?",6)=" appear together with the bill."
  1. S DIR("?",7)=" "
  1. S DIR("?",8)=" Select option 2 if you want to break this report out by ClaimsManager"
  1. S DIR("?",9)=" error code. In this case, you will see separate sections for each"
  1. S DIR("?",10)=" error code and all bills in which a particular error code is present."
  1. S DIR("?",11)=" "
  1. S DIR("?",12)=" Remember that the bills and errors are still subject to the other"
  1. S DIR("?")=" selection and sort criteria that you enter."
  1. D ^DIR K DIR
  1. I $D(DIRUT) S STOP=1 G ERRDISPX
  1. S RPTSPECS("ERROR DISPLAY TYPE")=Y
  1. ;
  1. ERRDISPX ;
  1. Q
  1. ;