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

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

initial load of WorldVistAEHR

File size: 5.2 KB
Line 
1IBCISC ;DSI/ESG - IB EDIT SCREENS ?CLA FUNCTIONALITY ;23-FEB-2001
2 ;;2.0;INTEGRATED BILLING;**161,348**;21-MAR-94;Build 5
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; Cannot be called from the top
6 Q
7 ;
8CLA(IBIFN) ; Entry point for ?CLA processing
9 ; This is called by routine IBCSCH.
10 NEW DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
11 ;
120 ; Clear screen and display header information
13 W @IOF
14 W !!?21,"VistA-ClaimsManager Interface Options"
15 ;
16 ; Check the bill form type to make sure it's a 1500.
17 I $$CK1^IBCIUT1(IBIFN) D G CLAX
18 . W !!?5,"ClaimsManager is only available for CMS-1500 claims."
19 . W !!?5,"The form type of the bill you're editing"
20 . W " (",$G(IBBNO),") is "
21 . W $$EXTERNAL^DILFD(399,.19,"",$P(^DGCR(399,IBIFN,0),U,19)),"."
22 . I $P(^DGCR(399,IBIFN,0),U,27) D
23 .. W !?5,"The charge type of this bill is "
24 .. W $$EXTERNAL^DILFD(399,.27,"",$P(^DGCR(399,IBIFN,0),U,27)),"."
25 .. Q
26 . D EOP
27 . Q
28 ;
29 ; Check for a form type change
30 D CKFT^IBCIUT1(IBIFN)
31 ;
32 ; Display the options available and let the user choose
33 S DIR("A")="Select option or press RETURN to continue"
34 S DIR(0)="SO^1:Test Send to ClaimsManager;2:Display ClaimsManager Errors;3:Show ClaimsManager Information"
35 D ^DIR K DIR
36 I 'Y G CLAX
37 I Y=1 D TESTSEND G CLAX
38 I Y=2 D DISPERR G CLAX
39 I Y=3 D STATS G CLAX
40CLAX ;
41 Q
42 ;
43 ;
44TESTSEND ;
45 ; Send the data to ClaimsManager as it currently exists
46 ; and display any errors that ClaimsManager finds.
47 ;
48 NEW NUMBER,IBCISNT,IBCISTAT,IBCIREDT,IBCIERR
49 ;
50 ; Check for the ClaimsManager working OK flag
51 I '$$CK2^IBCIUT1() D G TSTSNDX
52 . W !!?5,"The VistA-ClaimsManager Interface is not currently working."
53 . W !!?5,"Please try again later."
54 . D EOP
55 . Q
56 ;
57 ; Check to see if the bill is no longer editable. We only want to
58 ; do test sends if the bill is still editable.
59 I '$F(".1.","."_$P($G(^DGCR(399,IBIFN,0)),U,13)_".") D G TSTSNDX ;DSI/DJW 3/21/02
60 . W !!?5,"This bill is no longer editable. The ClaimsManager interface"
61 . W !?5,"Test Send functionality is not available for this bill."
62 . D EOP
63 . Q
64 ;
65 ; Refresh the data in file 351.9 if either of these functions
66 ; report that there are no line items. We've got to know what's
67 ; going on in this case. (esg - 3/20/02)
68 I '$$LITMS^IBCIUT1(IBIFN)!'$$CKLI^IBCIUT1(IBIFN) D UPDT^IBCIADD1
69 ;
70 ; Check for the existence of line items
71 I '$$CKLI^IBCIUT1(IBIFN) D MSG4^IBCIST,EOP G TSTSNDX
72 ;
73 ; Send to ClaimsManager after setting IBCISNT=3 to indicate test send
74 S IBCISNT=3
75 D ST2^IBCIST
76 ;
77 ; No errors found by ClaimsManager
78 I IBCISTAT=3 D EOP G TSTSNDX
79 ;
80 ; Errors were found by ClaimsManager
81 I IBCISTAT=4 D G TSTSNDX
82 . W !!?5,"ClaimsManager found "
83 . S NUMBER=$O(^TMP("IBCITST",$J,""),-1)
84 . W NUMBER," error" W:NUMBER>1 "s"
85 . W " with this bill."
86 . W !?5,"Press RETURN to view the error" W:NUMBER>1 "s" W "."
87 . D EOP Q:($D(DTOUT)!$D(DUOUT))
88 . ;
89 . ; Invoke the utility to display the ClaimsManager errors
90 . ;
91 . D EN^IBCIWK(0)
92 . Q
93 ;
94 ; At this point, we know that IBCISTAT=6 so there was a communication
95 ; problem of some kind. A more descriptive error message should have
96 ; been displayed by IBCIST and a mail message should have been sent.
97 ;
98 W !!?5,"There was a communications failure:"
99 W !?8,$P(IBCIERR,U,2)
100 I $P(IBCIERR,U,3)'="" D
101 . W !?8,$P($P(IBCIERR,U,3)," - ",1)
102 . W !?8,$P($P(IBCIERR,U,3,99)," - ",2,99)
103 . Q
104 W !!?5,"Please report these errors to your system manager."
105 W !?5,"This bill was NOT successfully analyzed by ClaimsManager."
106 ;
107 D EOP
108 ;
109TSTSNDX ;
110 Q
111 ;
112DISPERR ; Display the errors that were received during the last transaction
113 ; with Ingenix ClaimsManager. These are the errors that are stored
114 ; in the error fields in the CLAIMSMANAGER FILE (#351.9). These
115 ; fields are the ERROR CODE, ERROR DATA, and ERROR TEXT. They are all
116 ; stored at or under the 1 node.
117 ;
118 I '$P($G(^IBA(351.9,IBIFN,1,0)),U,4) D G DISPERX
119 . W !!?5,"There are no errors recorded in the file."
120 . D EOP
121 . Q
122 ;
123 ; At this point we know that some errors exist. Process and display
124 ; the errors stored on the 1 node file 351.9.
125 ;
126 ; Invoke the utility to display the ClaimsManager errors
127 ; '0' indicates 'browse' mode of the ListMan display
128 ;
129 D EN^IBCIWK(0)
130DISPERX ;
131 Q
132 ;
133STATS ; Display the data elements on the 0 node of file 351.9.
134 NEW J,IBA0
135 S J=30
136 S IBA0=$G(^IBA(351.9,IBIFN,0))
137 W !!,$J("Current Status: ",J)
138 W $$EXTERNAL^DILFD(351.9,.02,"",$P(IBA0,U,2))
139 W !!,$J("Times sent to ClaimsManager: ",J)
140 W $$EXTERNAL^DILFD(351.9,.04,"",$P(IBA0,U,4))
141 W !,$J("Last sent date/time: ",J)
142 W $$EXTERNAL^DILFD(351.9,.03,"",$P(IBA0,U,3))
143 W !,$J("Last sent by: ",J)
144 W $$EXTERNAL^DILFD(351.9,.05,"",$P(IBA0,U,5))
145 W !!,$J("Date/time Entered: ",J)
146 W $$EXTERNAL^DILFD(351.9,.06,"",$P(IBA0,U,6))
147 W !,$J("Entered by: ",J)
148 W $$EXTERNAL^DILFD(351.9,.07,"",$P(IBA0,U,7))
149 W !,$J("Date/time Last Edited: ",J)
150 W $$EXTERNAL^DILFD(351.9,.08,"",$P(IBA0,U,8))
151 W !,$J("Last Edited by: ",J)
152 W $$EXTERNAL^DILFD(351.9,.09,"",$P(IBA0,U,9))
153 W !!,$J("Assigned to: ",J)
154 W $$EXTERNAL^DILFD(351.9,.12,"",$P(IBA0,U,12))
155 W !,$J("Coder: ",J)
156 W $P($$CODER^IBCIUT5(IBIFN),U,3)
157 W !,$J("Biller: ",J)
158 W $P($$BILLER^IBCIUT5(IBIFN),U,2)
159 D EOP
160STATSX ;
161 Q
162 ;
163EOP ; End of page
164 W !! S DIR("A")="Press RETURN to continue",DIR(0)="E" D ^DIR K DIR
165EOPX ;
166 Q
167 ;
Note: See TracBrowser for help on using the repository browser.