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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1IBEPTC3 ;ALB/ARH - TP FLAG ALL CLINICS ; 3/26/96
2 ;;Version 2.0 ; INTEGRATED BILLING ;**55**; 21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 W @IOF,!,"FLAG ALL CLINICS FOR THE THIRD PARTY AUTO BILLER:"
6 W !!,"I - IGNORED"
7 W !," Stops the auto biller from creating bills for all Clinics."
8 W !," This should only be used if the outpatient auto biller is turned on."
9 W !," After using this option, individual or a group of clinics can be set"
10 W !," to be auto billed resulting in a small number of clinics being auto billed."
11 W !!,"B - BILLED"
12 W !," Resets all clinics to be billed by the auto biller."
13 W !!,"This option does not change a clinics billable status, only whether or not"
14 W !,"all billable clinics are processed by the auto biller."
15 ;
16 S DIR("A")="Set ALL Clinics to be ignored or billed by the Third Party auto biller"
17 S DIR(0)="SO^I:IGNORED;B:BILLED",DIR("?")="^D HACL^IBEPTC3" D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) G EX
18 ;
19 S IBOPT=Y W !!,"All clinics will be set as ",$S(IBOPT="I":"NON-",1:""),"auto billable Clinics."
20 ;
21 S DIR(0)="YO",DIR("A")="Do you want to continue" D ^DIR K DIR I 'Y!($D(DIRUT))!($D(DUOUT)) G EX
22 I IBOPT="I" D NBCLIN G EX
23 I IBOPT="B" D ABCLIN G EX
24EX K IBOPT,DIR,Y
25 Q
26 ;
27NBCLIN ; set all clinics as non-auto billed:
28 ; - if the most recent entry sets the clinic to non-billable or non-auto billed then no change
29 ; - if the most recent entry sets the clinic to auto billed this entry is reset to not auto bill
30 ; - otherwise adds a new entry for each clinic, set to not auto bill
31 N IBX,IBY,IBDT,IBCNT,IBCL,IBCLN,IBNABCL,X,Y,DIC,DIE,DA,DR
32 S (IBCNT,IBCL)=0 F S IBCL=$O(^SC(IBCL)) Q:'IBCL D
33 . S IBCLN=$G(^SC(IBCL,0)) I $P(IBCLN,U,3)'="C" Q
34 . S IBNABCL=$$FN(IBCL,"") I $P(IBNABCL,U,2)!($P(IBNABCL,U,3)) Q
35 . I 'IBNABCL K DO,DA S DLAYGO=352.4,DIC="^IBE(352.4,",DIC(0)="L",X=+IBCL,DIC("DR")=".02////"_DT_";.04////2" D FILE^DICN K DLAYGO S IBNABCL=Y
36 . I +IBNABCL S DIE="^IBE(352.4,",DA=+IBNABCL,DR=".06////1" D ^DIE K DIC,X,DIE,DA,DR
37 . S IBCNT=IBCNT+1 I '(IBCNT#5) W "."
38 W !," done."
39 Q
40 ;
41ABCLIN ; set all billable clinics to auto billed:
42 ; - deletes all entries flagging a clinic for the auto biller
43 ; - except those changing a clinic from non-billable to billable, these all are set to billable and auto billed
44 N IBX,IBY,IBCNT,IBCL,IBDT,IBNEXT,X,Y,DIC,DIE,DA,DR
45 S (IBCNT,IBCL)=0 F S IBCL=$O(^IBE(352.4,"AIVDTT2",IBCL)) Q:'IBCL D
46 . S IBDT="" F S IBDT=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT)) Q:IBDT="" D
47 .. S IBX=0 F S IBX=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT,IBX)) Q:'IBX D
48 ... S IBY=$G(^IBE(352.4,IBX,0)) Q:+$P(IBY,U,5)
49 ... S IBNEXT=$$FN(IBCL,IBDT) I $P(IBNEXT,U,2) D Q
50 .... I $P(IBY,U,6) S DIE="^IBE(352.4,",DA=+IBX,DR=".06////0" D ^DIE K DIC,X,DIE,DA,DR
51 ... S DIK="^IBE(352.4,",DA=+IBX D ^DIK K DIK
52 ... S IBCNT=IBCNT+1 I '(IBCNT#5) W "."
53 W !," done."
54 Q
55FN(IBCL,IBDT) ; find next oldest entry for clinic
56 N IBX,IBY S (IBY,IBX)=0,IBCL=+$G(IBCL),IBDT=$G(IBDT)
57 S IBDT=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT))
58 I IBDT'="" S IBX=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT,0))
59 I +IBX S IBY=$G(^IBE(352.4,IBX,0)),IBY=IBX_U_$P(IBY,U,5)_U_$P(IBY,U,6)
60 Q IBY
61 ;
62HACL ; help fo All Clinics
63 W !,"Enter Ignored - if you want to turn on the Auto Biller one clinic at a time."
64 W !," - if the Third Party Auto biller should create bills for"
65 W !," outpatient visits in only a few clinics and the bills"
66 W !," for the remaining clinics continue to be manually created."
67 ;
68 W !!,"Enter Billed - to set all clinics to be billed by the auto biller."
69 Q
Note: See TracBrowser for help on using the repository browser.