source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCEMCA2.m@ 868

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1IBCEMCA2 ;ALB/ESG - Multiple CSA Message Management - Actions ;20-SEP-2005
2 ;;2.0;INTEGRATED BILLING;**320,377**;21-MAR-1994;Build 23
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5 Q
6 ;
7CANCEL ; mass claim cancel
8 NEW NS,IBIFN,NSC,DIR,X,Y,DUOUT,DTOUT,DIRUT,DIROUT,IBDA,IB364,DISP,IBCE
9 NEW IBMCSRSC,IBMCSRNB,IBMCSCNT,IBMCSTOT,IBMCSTOP,IBMCSCAN,MRACHK,IBCAN,IBMCSCAC
10 D FULL^VALM1
11 ;
12 I '$$KCHK^XUSRB("IB AUTHORIZE") D G CANCELX
13 . W !!?5,"You don't hold the proper security key to access this option."
14 . W !?5,"The necessary key is IB AUTHORIZE. Please see your manager."
15 . D PAUSE^VALM1
16 . Q
17 ;
18 S NS=+$G(^TMP($J,"IBCEMCL",4))
19 I 'NS D G CANCELX
20 . W !!?5,"There are no selected messages." D PAUSE^VALM1
21 . Q
22 ;
23 ; count number of claims too
24 S IBIFN=0 F NSC=0:1 S IBIFN=$O(^TMP($J,"IBCEMCL",4,2,IBIFN)) Q:'IBIFN
25 ;
26 W !!?5,"Number of messages selected: ",NS
27 W !?7,"Number of claims selected: ",NSC
28 W !!,"In order to cancel "
29 W $S(NSC=1:"this claim",1:"these claims")
30 W ", a Reason Cancelled and a Reason Not Billable"
31 W !,"are required. You may also provide an optional CT Additional Comment."
32 W !,"These will be used as the default responses for "
33 W $S(NSC=1:"this claim",1:"all claims")
34 W "."
35 ;
36CANQ1 ; reader call for the Reason Cancelled field
37 W !
38 S DIR(0)="399,19"
39 S DIR("A")="Reason Cancelled"
40 D ^DIR K DIR
41 I X="",Y="" W *7,!,"This is a required response. Enter '^' to exit." G CANQ1
42 I $D(DIRUT) G CANCELX
43 M IBMCSRSC=Y ; save the entered text for reason cancelled
44 ;
45CANQ2 ; reader call for the reason not billable field
46 W !
47 S DIR(0)="356,.19"
48 S DIR("A")="Reason Not Billable"
49 D ^DIR K DIR
50 I X="",Y="" W *7,!,"This is a required response. Enter '^' to exit." G CANQ2
51 I $D(DIRUT) G CANCELX
52 M IBMCSRNB=Y ; save the reason not billable code/desc
53 ;
54CANQ3 ; reader call for the Claims Tracking Additional Comment field
55 W !
56 S DIR(0)="356,1.08O"
57 S DIR("A")="CT Additional Comment"
58 D ^DIR K DIR
59 I $D(DIRUT) G CANCELX
60 M IBMCSCAC=Y
61 ;
62 W !
63 S DIR(0)="YO"
64 S DIR("A")="OK to proceed into the cancel claim loop",DIR("B")="No"
65 D ^DIR K DIR
66 I Y'=1 G CANCELX
67 ;
68 S IBIFN=0,IBMCSCNT=0,IBMCSTOT=NSC,IBMCSTOP=0
69 F S IBIFN=$O(^TMP($J,"IBCEMCL",4,2,IBIFN)) Q:'IBIFN D Q:IBMCSTOP
70 . S IBMCSCNT=IBMCSCNT+1
71 . S IBDA=+$O(^TMP($J,"IBCEMCL",4,2,IBIFN,""),-1) ; most recent 361 ien
72 . S IB364=+$P($G(^IBM(361,IBDA,0)),U,11) ; transmit bill 364 ien
73 . W !!," *** Processing MCS claim# ",IBMCSCNT," of ",IBMCSTOT," ***"
74 . S DISP=$$DISP^IBCEM3(IBIFN,"cancel","",1,.DIRUT)
75 . ;
76 . I $D(DIRUT) D Q ; up arrow or time-out
77 .. N DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
78 .. S DIR(0)="YO"
79 .. S DIR("A")="Do you want to Exit this MCS cancel claim loop"
80 .. S DIR("B")="Yes"
81 .. W ! D ^DIR K DIR
82 .. I Y=1 S IBMCSTOP=1 ; Yes, exit out altogether
83 .. Q
84 . ;
85 . I 'DISP Q ; user said No to cancel
86 . ;
87 . I 'IBDA!'IB364 D Q
88 .. W !?4,"Cannot determine the EDI transmission record."
89 .. W !?4,"This claim can't be cancelled here."
90 .. D PAUSE^VALM1
91 .. Q
92 . ;
93 . D MRACHK^IBCECSA4 I MRACHK Q
94 . ;
95 . ; set-up required variables for main call to cancel this claim
96 . S IBCAN=1,IBMCSCAN=1
97 . S IBCE("EDI")=1
98 . S Y=IBIFN
99 . D
100 .. ; protect variables to be restored after call to IBCC and
101 .. ; leftover junk variables from IBCC
102 .. NEW IBIFN,IBMCSTOP,IBMCSCNT,IBMCSTOT,IBCSAMCS
103 .. NEW IBCCCC,IBCCR,IBQUIT,NAME,POP,RDATES,COL,CTRLCOL,FINISH
104 .. D NOPTF^IBCC
105 .. Q
106 . Q
107 ;
108 I IBMCSTOP W !!?5,"MCS cancel loop aborted."
109 I 'IBMCSTOP W !!?5,"Done with MCS cancel loop!"
110 D PAUSE^VALM1
111 ;
112 ; rebuild the list
113 KILL ^TMP($J,"IBCEMCA"),VALMHDR
114 S VALMBG=1
115 D UNLOCK^IBCEMCL
116 D INIT^IBCEMCL
117 I $G(IBCSAMCS)=1 S IBCSAMCS=2 ; flag to rebuild CSA
118 ;
119CANCELX ;
120 S VALMBCK="R"
121 Q
122 ;
Note: See TracBrowser for help on using the repository browser.