source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCICME.m@ 862

Last change on this file since 862 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.3 KB
RevLine 
[613]1IBCICME ;DSI/ESG - IBCI CLAIMSMANAGER ERROR REPORT ;6-APR-2001
2 ;;2.0;INTEGRATED BILLING;**161**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 NEW STOP,IBCIRTN,DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT,POP,RPTSPECS
6 ;
7 S STOP=0
8 S IBCIRTN="IBCICME"
9 W @IOF
10 W !?10,"ClaimsManager Error Report",!
11 ;
12 ; If there are no errors currently stored in the file,
13 ; then there is no point in going any further.
14 I '$D(^IBA(351.9,"AEC")) D G EXIT
15 . W !!?5,"There are no errors currently recorded in the ClaimsManager"
16 . W !?5,"file. There is no data to report."
17 . W !! S DIR("A")="Press RETURN to continue",DIR(0)="E" D ^DIR K DIR
18 . Q
19 ;
20 ;
21A10 D ERRCODE I STOP G EXIT
22A20 D DATE^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A10
23A30 D DTRANGE^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A20
24A40 D STATUS^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A30
25A50 D TYPE^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A40
26A60 D ERRDISP I STOP G:$$STOP^IBCICMS EXIT G A50
27A70 D SELASN^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G:RPTSPECS("TYPE")="S" A50 G A60
28A80 D ASSIGN^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A70
29A90 D SORTBY^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A80
30A100 D ERRTXT I STOP G:$$STOP^IBCICMS EXIT G A90
31A110 D COMMENTS^IBCICMS I STOP G:$$STOP^IBCICMS EXIT G A100
32A120 D DEVICE^IBCICMS(IBCIRTN) I STOP G:$$STOP^IBCICMS EXIT G:RPTSPECS("TYPE")="S" A50 G A110
33 ;
34EXIT ;
35 QUIT ; quit from routine
36 ;
37COMPILE ; This entry point is called from EN^XUTMDEVQ in either
38 ; direct mode or queued mode.
39 NEW IBCISCNT
40 D BUILD^IBCICME1 ; compile report
41 I '$G(ZTSTOP) D EN^IBCICMEP ; print report
42 D ^%ZISC ; close the device
43 KILL ^TMP($J,IBCIRTN) ; kill main scratch global
44 KILL ^TMP($J,IBCIRTN_"-TOTALS") ; kill totals scratch global
45 I $D(ZTQUEUED) S ZTREQ="@" ; purge the task record
46COMPX ;
47 QUIT ; quit from routine
48 ;
49 ;
50 ;
51ERRCODE ; This procedure displays the error codes currently in the file and
52 ; lets the user select all of them or some of them.
53 ;
54 NEW J,ERR,PCE,NUM
55 KILL ^TMP($J,"IBCICME ERROR CODES")
56 ;
57 ; The first entry should be ALL
58 S J=1,ERR="ALL Error Codes in the ClaimsManager File"
59 S ^TMP($J,"IBCICME ERROR CODES",J)=ERR
60 S DIR("A",J)=$J(J,12)_" "_ERR
61 ;
62 ; Loop through all error codes to build the arrays
63 S ERR=""
64 F J=2:1 S ERR=$O(^IBA(351.9,"AEC",ERR)) Q:ERR="" D
65 . S ^TMP($J,"IBCICME ERROR CODES",J)=ERR
66 . S DIR("A",J)=$J(J,12)_" "_ERR
67 . Q
68 S DIR("A",J)=" " ; blank line before the prompt
69 ;
70 S DIR(0)="L^1:"_(J-1)
71 S DIR("A")="Please Select the Error Codes to include"
72 S DIR("B")=1
73 S DIR("?",1)=" This response must be a list or range."
74 S DIR("?",2)=" For example, 1,3,5 or 2-4,8"
75 S DIR("?",3)=" "
76 S DIR("?",4)=" If you include #1, then all codes will be included"
77 S DIR("?")=" regardless of what you enter here."
78 D ^DIR K DIR
79 I $D(DIRUT) S STOP=1 G ERRCODEX
80 ;
81 ; Add a comma to the front of Y so the $F will work
82 ; Check to see if the user response included ALL CODES
83 S Y=","_Y
84 KILL RPTSPECS("SELECTED ERRCODES")
85 S RPTSPECS("ALL ERRCODES")=0
86 I $F(Y,",1,") S RPTSPECS("ALL ERRCODES")=1 G ERRCODEX
87 ;
88 ; remove the leading the trailing commas and then build the list
89 S Y=$E(Y,2,$L(Y)-1)
90 F PCE=1:1:$L(Y,",") D
91 . S NUM=$P(Y,",",PCE),ERR=""
92 . I NUM'="" S ERR=^TMP($J,"IBCICME ERROR CODES",NUM)
93 . I ERR'="" S RPTSPECS("SELECTED ERRCODES",ERR)=""
94 . Q
95 ;
96ERRCODEX ;
97 KILL ^TMP($J,"IBCICME ERROR CODES")
98 Q
99 ;
100 ;
101ERRTXT ;
102 I RPTSPECS("TYPE")="S" S RPTSPECS("DISPLAY ERROR TEXT")=0 G ERRTXTX
103 ; Only ask question if it is a detailed report
104 W !
105 S DIR(0)="Y"
106 S DIR("A")="Do you want to see the ClaimsManager Error Messages for these bills"
107 S DIR("B")="YES"
108 S DIR("?",1)=" Enter YES if you would like to see the full description of the error"
109 S DIR("?",2)=" including all lines of error message text."
110 S DIR("?")=" Enter NO if you do not want to see this information."
111 D ^DIR K DIR
112 I $D(DIRUT) S STOP=1 G ERRTXTX
113 S RPTSPECS("DISPLAY ERROR TEXT")=+Y
114ERRTXTX ;
115 Q
116 ;
117 ;
118ERRDISP ; get the error display type (esg - 6/12/01)
119 I RPTSPECS("TYPE")="S" S RPTSPECS("ERROR DISPLAY TYPE")=1 G ERRDISPX
120 ; Only ask question if it is a detailed report
121 NEW CH
122 W !
123 S CH="1:Display all ClaimsManager Errors for a Bill;"
124 S CH=CH_"2:Display all Bills for a ClaimsManager Error Code"
125 S DIR(0)="SO^"_CH
126 S DIR("A")="Select the Error Display Type"
127 S DIR("B")=1
128 S DIR("?",1)=" The answer to this question will determine how the Bills and Errors"
129 S DIR("?",2)=" are displayed on the report."
130 S DIR("?",3)=" "
131 S DIR("?",4)=" Select option 1 if you want to display all of the ClaimsManager"
132 S DIR("?",5)=" errors for each bill that appears on the report. These errors will"
133 S DIR("?",6)=" appear together with the bill."
134 S DIR("?",7)=" "
135 S DIR("?",8)=" Select option 2 if you want to break this report out by ClaimsManager"
136 S DIR("?",9)=" error code. In this case, you will see separate sections for each"
137 S DIR("?",10)=" error code and all bills in which a particular error code is present."
138 S DIR("?",11)=" "
139 S DIR("?",12)=" Remember that the bills and errors are still subject to the other"
140 S DIR("?")=" selection and sort criteria that you enter."
141 D ^DIR K DIR
142 I $D(DIRUT) S STOP=1 G ERRDISPX
143 S RPTSPECS("ERROR DISPLAY TYPE")=Y
144 ;
145ERRDISPX ;
146 Q
147 ;
Note: See TracBrowser for help on using the repository browser.