IBEPTC3 ;ALB/ARH - TP FLAG ALL CLINICS ; 3/26/96
;;Version 2.0 ; INTEGRATED BILLING ;**55**; 21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
W @IOF,!,"FLAG ALL CLINICS FOR THE THIRD PARTY AUTO BILLER:"
W !!,"I - IGNORED"
W !," Stops the auto biller from creating bills for all Clinics."
W !," This should only be used if the outpatient auto biller is turned on."
W !," After using this option, individual or a group of clinics can be set"
W !," to be auto billed resulting in a small number of clinics being auto billed."
W !!,"B - BILLED"
W !," Resets all clinics to be billed by the auto biller."
W !!,"This option does not change a clinics billable status, only whether or not"
W !,"all billable clinics are processed by the auto biller."
;
S DIR("A")="Set ALL Clinics to be ignored or billed by the Third Party auto biller"
S DIR(0)="SO^I:IGNORED;B:BILLED",DIR("?")="^D HACL^IBEPTC3" D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) G EX
;
S IBOPT=Y W !!,"All clinics will be set as ",$S(IBOPT="I":"NON-",1:""),"auto billable Clinics."
;
S DIR(0)="YO",DIR("A")="Do you want to continue" D ^DIR K DIR I 'Y!($D(DIRUT))!($D(DUOUT)) G EX
I IBOPT="I" D NBCLIN G EX
I IBOPT="B" D ABCLIN G EX
EX K IBOPT,DIR,Y
Q
;
NBCLIN ; set all clinics as non-auto billed:
; - if the most recent entry sets the clinic to non-billable or non-auto billed then no change
; - if the most recent entry sets the clinic to auto billed this entry is reset to not auto bill
; - otherwise adds a new entry for each clinic, set to not auto bill
N IBX,IBY,IBDT,IBCNT,IBCL,IBCLN,IBNABCL,X,Y,DIC,DIE,DA,DR
S (IBCNT,IBCL)=0 F S IBCL=$O(^SC(IBCL)) Q:'IBCL D
. S IBCLN=$G(^SC(IBCL,0)) I $P(IBCLN,U,3)'="C" Q
. S IBNABCL=$$FN(IBCL,"") I $P(IBNABCL,U,2)!($P(IBNABCL,U,3)) Q
. 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
. I +IBNABCL S DIE="^IBE(352.4,",DA=+IBNABCL,DR=".06////1" D ^DIE K DIC,X,DIE,DA,DR
. S IBCNT=IBCNT+1 I '(IBCNT#5) W "."
W !," done."
Q
;
ABCLIN ; set all billable clinics to auto billed:
; - deletes all entries flagging a clinic for the auto biller
; - except those changing a clinic from non-billable to billable, these all are set to billable and auto billed
N IBX,IBY,IBCNT,IBCL,IBDT,IBNEXT,X,Y,DIC,DIE,DA,DR
S (IBCNT,IBCL)=0 F S IBCL=$O(^IBE(352.4,"AIVDTT2",IBCL)) Q:'IBCL D
. S IBDT="" F S IBDT=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT)) Q:IBDT="" D
.. S IBX=0 F S IBX=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT,IBX)) Q:'IBX D
... S IBY=$G(^IBE(352.4,IBX,0)) Q:+$P(IBY,U,5)
... S IBNEXT=$$FN(IBCL,IBDT) I $P(IBNEXT,U,2) D Q
.... I $P(IBY,U,6) S DIE="^IBE(352.4,",DA=+IBX,DR=".06////0" D ^DIE K DIC,X,DIE,DA,DR
... S DIK="^IBE(352.4,",DA=+IBX D ^DIK K DIK
... S IBCNT=IBCNT+1 I '(IBCNT#5) W "."
W !," done."
Q
FN(IBCL,IBDT) ; find next oldest entry for clinic
N IBX,IBY S (IBY,IBX)=0,IBCL=+$G(IBCL),IBDT=$G(IBDT)
S IBDT=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT))
I IBDT'="" S IBX=$O(^IBE(352.4,"AIVDTT2",IBCL,IBDT,0))
I +IBX S IBY=$G(^IBE(352.4,IBX,0)),IBY=IBX_U_$P(IBY,U,5)_U_$P(IBY,U,6)
Q IBY
;
HACL ; help fo All Clinics
W !,"Enter Ignored - if you want to turn on the Auto Biller one clinic at a time."
W !," - if the Third Party Auto biller should create bills for"
W !," outpatient visits in only a few clinics and the bills"
W !," for the remaining clinics continue to be manually created."
;
W !!,"Enter Billed - to set all clinics to be billed by the auto biller."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBEPTC3 3664 printed Dec 13, 2024@02:22:18 Page 2
IBEPTC3 ;ALB/ARH - TP FLAG ALL CLINICS ; 3/26/96
+1 ;;Version 2.0 ; INTEGRATED BILLING ;**55**; 21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 WRITE @IOF,!,"FLAG ALL CLINICS FOR THE THIRD PARTY AUTO BILLER:"
+5 WRITE !!,"I - IGNORED"
+6 WRITE !," Stops the auto biller from creating bills for all Clinics."
+7 WRITE !," This should only be used if the outpatient auto biller is turned on."
+8 WRITE !," After using this option, individual or a group of clinics can be set"
+9 WRITE !," to be auto billed resulting in a small number of clinics being auto billed."
+10 WRITE !!,"B - BILLED"
+11 WRITE !," Resets all clinics to be billed by the auto biller."
+12 WRITE !!,"This option does not change a clinics billable status, only whether or not"
+13 WRITE !,"all billable clinics are processed by the auto biller."
+14 ;
+15 SET DIR("A")="Set ALL Clinics to be ignored or billed by the Third Party auto biller"
+16 SET DIR(0)="SO^I:IGNORED;B:BILLED"
SET DIR("?")="^D HACL^IBEPTC3"
DO ^DIR
KILL DIR
IF $DATA(DIRUT)!($DATA(DUOUT))
GOTO EX
+17 ;
+18 SET IBOPT=Y
WRITE !!,"All clinics will be set as ",$SELECT(IBOPT="I":"NON-",1:""),"auto billable Clinics."
+19 ;
+20 SET DIR(0)="YO"
SET DIR("A")="Do you want to continue"
DO ^DIR
KILL DIR
IF 'Y!($DATA(DIRUT))!($DATA(DUOUT))
GOTO EX
+21 IF IBOPT="I"
DO NBCLIN
GOTO EX
+22 IF IBOPT="B"
DO ABCLIN
GOTO EX
EX KILL IBOPT,DIR,Y
+1 QUIT
+2 ;
NBCLIN ; set all clinics as non-auto billed:
+1 ; - if the most recent entry sets the clinic to non-billable or non-auto billed then no change
+2 ; - if the most recent entry sets the clinic to auto billed this entry is reset to not auto bill
+3 ; - otherwise adds a new entry for each clinic, set to not auto bill
+4 NEW IBX,IBY,IBDT,IBCNT,IBCL,IBCLN,IBNABCL,X,Y,DIC,DIE,DA,DR
+5 SET (IBCNT,IBCL)=0
FOR
SET IBCL=$ORDER(^SC(IBCL))
if 'IBCL
QUIT
Begin DoDot:1
+6 SET IBCLN=$GET(^SC(IBCL,0))
IF $PIECE(IBCLN,U,3)'="C"
QUIT
+7 SET IBNABCL=$$FN(IBCL,"")
IF $PIECE(IBNABCL,U,2)!($PIECE(IBNABCL,U,3))
QUIT
+8 IF 'IBNABCL
KILL DO,DA
SET DLAYGO=352.4
SET DIC="^IBE(352.4,"
SET DIC(0)="L"
SET X=+IBCL
SET DIC("DR")=".02////"_DT_";.04////2"
DO FILE^DICN
KILL DLAYGO
SET IBNABCL=Y
+9 IF +IBNABCL
SET DIE="^IBE(352.4,"
SET DA=+IBNABCL
SET DR=".06////1"
DO ^DIE
KILL DIC,X,DIE,DA,DR
+10 SET IBCNT=IBCNT+1
IF '(IBCNT#5)
WRITE "."
End DoDot:1
+11 WRITE !," done."
+12 QUIT
+13 ;
ABCLIN ; set all billable clinics to auto billed:
+1 ; - deletes all entries flagging a clinic for the auto biller
+2 ; - except those changing a clinic from non-billable to billable, these all are set to billable and auto billed
+3 NEW IBX,IBY,IBCNT,IBCL,IBDT,IBNEXT,X,Y,DIC,DIE,DA,DR
+4 SET (IBCNT,IBCL)=0
FOR
SET IBCL=$ORDER(^IBE(352.4,"AIVDTT2",IBCL))
if 'IBCL
QUIT
Begin DoDot:1
+5 SET IBDT=""
FOR
SET IBDT=$ORDER(^IBE(352.4,"AIVDTT2",IBCL,IBDT))
if IBDT=""
QUIT
Begin DoDot:2
+6 SET IBX=0
FOR
SET IBX=$ORDER(^IBE(352.4,"AIVDTT2",IBCL,IBDT,IBX))
if 'IBX
QUIT
Begin DoDot:3
+7 SET IBY=$GET(^IBE(352.4,IBX,0))
if +$PIECE(IBY,U,5)
QUIT
+8 SET IBNEXT=$$FN(IBCL,IBDT)
IF $PIECE(IBNEXT,U,2)
Begin DoDot:4
+9 IF $PIECE(IBY,U,6)
SET DIE="^IBE(352.4,"
SET DA=+IBX
SET DR=".06////0"
DO ^DIE
KILL DIC,X,DIE,DA,DR
End DoDot:4
QUIT
+10 SET DIK="^IBE(352.4,"
SET DA=+IBX
DO ^DIK
KILL DIK
+11 SET IBCNT=IBCNT+1
IF '(IBCNT#5)
WRITE "."
End DoDot:3
End DoDot:2
End DoDot:1
+12 WRITE !," done."
+13 QUIT
FN(IBCL,IBDT) ; find next oldest entry for clinic
+1 NEW IBX,IBY
SET (IBY,IBX)=0
SET IBCL=+$GET(IBCL)
SET IBDT=$GET(IBDT)
+2 SET IBDT=$ORDER(^IBE(352.4,"AIVDTT2",IBCL,IBDT))
+3 IF IBDT'=""
SET IBX=$ORDER(^IBE(352.4,"AIVDTT2",IBCL,IBDT,0))
+4 IF +IBX
SET IBY=$GET(^IBE(352.4,IBX,0))
SET IBY=IBX_U_$PIECE(IBY,U,5)_U_$PIECE(IBY,U,6)
+5 QUIT IBY
+6 ;
HACL ; help fo All Clinics
+1 WRITE !,"Enter Ignored - if you want to turn on the Auto Biller one clinic at a time."
+2 WRITE !," - if the Third Party Auto biller should create bills for"
+3 WRITE !," outpatient visits in only a few clinics and the bills"
+4 WRITE !," for the remaining clinics continue to be manually created."
+5 ;
+6 WRITE !!,"Enter Billed - to set all clinics to be billed by the auto biller."
+7 QUIT