ABMDRSL1 ; IHS/ASDST/DMJ - Selective Report Parameters-PART 2 ;
;;2.6;IHS Third Party Billing;**1,4,6,11,21**;NOV 12, 2009;Build 379
;Original;TMD;07/14/95 12:27 PM
;
;IHS/SD/SDR - V2.5 P8 - Added code for Cancelling official
;IHS/SD/SDR - v2.5 p8 - Added code for pending status (12)
;IHS/SD/SDR - v2.5 p13 - NO IM
;
;IHS/SD/SDR - 2.6*1 - HEAT4482 - Added claim status prompt
;IHS/SD/SDR - 2.6*4 - NOHEAT - fixed report headers for closed/exported dates
;IHS/SD/SDR - 2.6*21 - HEAT241429 - Added code to do Visit Dates only for Denied Bills Report
;IHS/SD/SDR - 2.6*21 - VMBP - Updated p11 changes to include Serena ref#s
;IHS/SD/SDR - 2.6*21 - VMBP - Updated to include all new insurer types
;
LOC ;EP
W ! K DIC,ABMY("LOC")
S DIC="^BAR(90052.05,DUZ(2),"
S DIC(0)="AEMQ"
S DIC("A")="Select LOCATION: "
D ^DIC K DIC
Q:+Y<1
S ABMY("LOC")=+Y
Q
INS ;EP
K ABMY("TYP"),ABMY("INS")
W !
S DIC="^AUTNINS("
S DIC(0)="QEAM"
D ^DIC
Q:+Y<0
S ABMY("INS")=+Y
Q
;
PAT ;
K ABMY("TYP"),ABMY("PAT")
W !
S DIC="^AUPNPAT("
S DIC(0)="QEAM"
D ^DIC
K AUPNLK("ALL")
Q:+Y<0
S ABMY("PAT")=+Y
Q
;
TYP ;EP
K DIR,ABMY("TYP"),ABMY("INS"),ABMY("PAT")
;S DIR(0)="SO^1:MEDICARE;2:MEDICAID;3:PRIVATE INSURANCE;4:NON-BENEFICIARY PATIENTS;5:BENEFICIARY PATIENTS;6:SPECIFIC INSURER;7:SPECIFIC PATIENT;8:WORKMEN'S COMP;9:PRIVATE + WORKMEN'S COMP;10:CHIP" ;abm*2.6*11 VMBP#3
;start new abm*2.6*21 IHS/SD/SDR VMBP#3 RQMT_96
S DIR(0)="SO^1:MEDICARE;2:MEDICAID;3:PRIVATE INSURANCE;4:NON-BENEFICIARY PATIENTS;5:BENEFICIARY PATIENTS;6:SPECIFIC INSURER;7:SPECIFIC PATIENT;8:WORKMEN'S COMP;9:PRIVATE + WORKMEN'S COMP;10:CHIP;11:VETERANS MEDICAL BENEFIT"
S DIR(0)=DIR(0)_";12:3P LIABILITY;13:FPL 133 PERCENT;14:GUARANTOR;15:MEDICARE HMO;16:STATE EXCHANGE PLAN;17:TRIBAL SELF INSURED"
;end new abm*2.6*21 IHS/SD/SDR RQMT_96
S DIR("A")="Select TYPE of BILLING ENTITY to Display"
D ^DIR
K DIR
Q:$D(DIRUT)!$D(DIROUT)
;S ABMY("TYP")=$S(Y=1:"R",Y=2:"D",Y=3:"PHFM",Y=4:"N",Y=5:"I",Y=8:"W",Y=9:"PHFMW",Y=10:"K",1:Y) ;abm*2.6*11 VMBP#3
;S ABMY("TYP")=$S(Y=1:"R",Y=2:"D",Y=3:"PHFM",Y=4:"N",Y=5:"I",Y=8:"W",Y=9:"PHFMW",Y=10:"K",Y=11:"V",1:Y) ;abm*2.6*11 VMBP#3 RQMT_96 ;abm*2.6*21 IHS/SD/SDR VMBP RQMT_96
;start new abm*2.6*21 IHS/SD/SDR VMBP RQMT_96
I Y=1 S ABMY("TYP")="^R^MMC^MC^MD^"
I Y=2 S ABMY("TYP")="^D^"
I Y=3 S ABMY("TYP")="^P^H^F^C^M^"
I Y=4 S ABMY("TYP")="^N^"
I Y=5 S ABMY("TYP")="^I^"
I Y=8 S ABMY("TYP")="^W^"
I Y=9 S ABMY("TYP")="^P^H^F^M^W^"
I Y=10 S ABMY("TYP")="^K^"
I Y=11 S ABMY("TYP")="^V^"
I Y=12 S ABMY("TYP")="^T^"
I Y=13 S ABMY("TYP")="^FPL^"
I Y=14 S ABMY("TYP")="^G^"
I Y=15 S ABMY("TYP")="^MH^"
I Y=16 S ABMY("TYP")="^SEP^"
I Y=17 S ABMY("TYP")="^TSI^"
S:$G(ABMY("TYP"))="" ABMY("TYP")=Y
;end new abm*2.6*21 IHS/SD/SDR VMBP RQMT_96
S ABMY("TYP","NM")=Y(0)
;
I Y'=6,Y'=7 Q ;Only want specific insurer or patient
D CK ; Check for date range
Q:$D(DIRUT)!$D(DIROUT)
G INS:ABMY("TYP","NM")["INS",PAT:ABMY("TYP","NM")["PAT" ;Y has changed
Q
;
CK I $D(ABMY("DT",2)) Q ;Already has dates set
D DT ; Go get date range
I '$D(ABMY("DT",2)) S DIROUT=1 ; Set quit if date not set
Q
;
STATUS ;EP
K DIR
;S DIR(0)="SO^1:FLAGGED AS BILLABLE;2:IN EDIT MODE;3:BILLED AND UNEDITABLE;4:COMPLETED ALL BILLING;5:ROLLED FROM A/R AND IN EDIT MODE" ;abm*2.6*1 HEAT4482
;I $G(ABM("STA"))="I" S DIR(0)=DIR(0)_";6:INCOMPLETE STATUS;7:ALL",DIR("B")="INCOMPLETE STATUS" ;abm*2.6*1 HEAT4482
;E S DIR(0)=DIR(0)_";6:ALL" ;abm*2.6*1 HEAT4482
;S DIR(0)="SO^1:FLAGGED AS BILLABLE (includes IN EDIT MODE);1:IN EDIT MODE;3:BILLED AND UNEDITABLE;4:COMPLETED ALL BILLING;5:ROLLED FROM A/R AND IN EDIT MODE;6:ALL" ;abm*2.6*1 HEAT4482 ;abm*2.6*6 HEAT16168
S DIR(0)="SO^1:FLAGGED AS BILLABLE (includes IN EDIT MODE);2:IN EDIT MODE;3:BILLED AND UNEDITABLE;4:COMPLETED ALL BILLING;5:ROLLED FROM A/R AND IN EDIT MODE;6:ALL" ;abm*2.6*1 HEAT4482 ;abm*2.6*6 HEAT16168
S DIR("A")="Select TYPE of CLAIM STATUS to Display"
D ^DIR
K DIR
Q:$D(DIRUT)!$D(DIROUT)
S ABM("STA")=$S(Y=1:"F",Y=2:"E",Y=3:"U",Y=4:"C",Y=5:"O",1:"")
S ABM("STA","NM")=Y(0)
Q
;
DT ;EP
K DIR,ABMY("DT")
I $G(ABM("DT"))="C" S Y=4 G DTYP
;I $D(ABM("STA")),($G(ABM("STA"))'="X") S Y=2 G DTYP ;abm*2.6*4 NOHEAT
I $D(ABM("STA")),($G(ABM("STA"))'="M") S Y=2 G DTYP ;abm*2.6*4 NOHEAT
I $D(ABM("DNYDT")) S Y=2 G DTYP ;abm*2.6*21 IHS/SD/SDR HEAT241429
S DIR(0)="SO^1:Approval Date;2:Visit Date"
G DDIR:$G(ABMP("TYP"))=2
I $D(ABM("PAY")) S DIR(0)=DIR(0)_";3:Payment Date"
E S DIR(0)=DIR(0)_";3:Export Date"
;I $G(ABM("STA"))="X" G DTYP2 ;Closed ;abm*2.6*4 NOHEAT
I $G(ABM("STA"))="M" G DTYP2 ;Closed ;abm*2.6*4 NOHEAT
;
DDIR ;
S DIR("A")="Select TYPE of DATE Desired"
D ^DIR
Q:$D(DIROUT)!$D(DIRUT)
I Y=3 S Y=$S(DIR(0)["Pay":5,1:3)
;
DTYP ;
Q:$D(DIRUT)
S ABMY("DT")=$S(Y=1:"A",Y=2:"V",Y=3:"X",Y=4:"C",1:"P")
S Y=$S(Y=1:"APPROVAL",Y=2:"VISIT",Y=3:"EXPORT",Y=4:"CANCELLATION",1:"PAYMENT")_" DATE"
W !!," ============ Entry of ",Y," Range =============",!
S DIR("A")="Enter STARTING "_Y_" for the Report"
S DIR(0)="DO^::EP"
D ^DIR
G DT:$D(DIRUT)
S ABMY("DT",1)=Y
W !
S DIR("A")="Enter ENDING DATE for the Report"
D ^DIR
K DIR
G DT:$D(DIRUT)
S ABMY("DT",2)=Y
I ABMY("DT",1)>ABMY("DT",2) W !!,*7,"INPUT ERROR: Start Date is Greater than than the End Date, TRY AGAIN!",!! G DT
Q
DTYP2 ;
S DIR(0)="SO^1:Closed Date;2:Visit Date"
S DIR("A")="Select TYPE of DATE Desired"
D ^DIR
Q:$D(DIROUT)!$D(DIRUT)
;S ABMY("DT")=$S(Y=1:"X",1:"V") ;abm*2.6*4 NOHEAT
S ABMY("DT")=$S(Y=1:"M",1:"V") ;abm*2.6*4 NOHEAT
S Y=$S(Y=1:"CLOSED",1:"VISIT")_" DATE"
W !!," ============ Entry of ",Y," Range =============",!
S DIR("A")="Enter STARTING "_Y_" for the Report"
S DIR(0)="DO^::EP"
D ^DIR
G DT:$D(DIRUT)
S ABMY("DT",1)=Y
W !
S DIR("A")="Enter ENDING DATE for the Report"
D ^DIR
K DIR
G DT:$D(DIRUT)
S ABMY("DT",2)=Y
I ABMY("DT",1)>ABMY("DT",2) W !!,*7,"INPUT ERROR: Start Date is Greater than than the End Date, TRY AGAIN!",!! G DT
Q
;
APPR ;EP
K ABMY("APPR")
W !
S DIC="^VA(200,"
S DIC(0)="QEAM"
D ^DIC
S:+Y>0 ABMY("APPR")=+Y
Q
;
CANC ;EP
K ABMY("CANC")
W !
S DIC="^VA(200,"
S DIC(0)="QEAM"
D ^DIC
S:+Y>0 ABMY("CANC")=+Y
Q
CLOS ;EP
K ABMY("CLOS")
W !
S DIC="^VA(200,"
S DIC(0)="QEAM"
D ^DIC
S:+Y>0 ABMY("CLOS")=+Y
Q
;
PRV ;EP
K ABMY("PRV")
W !
S DIC="^VA(200,"
S DIC(0)="QEAM"
D ^DIC
S:+Y>0 ABMY("PRV")=+Y
Q
INC ;EP - choose status updater
K DIR,DIC,DIE,DR
S DIC(0)="AEMQ"
S DIC="^VA(200,"
D ^DIC
I +Y<0 S ABMY("STATUS UPDATER")=""
E S ABMY("STATUS UPDATER")=+Y
Q
ABMDRSL1 ; IHS/ASDST/DMJ - Selective Report Parameters-PART 2 ;
+1 ;;2.6;IHS Third Party Billing;**1,4,6,11,21**;NOV 12, 2009;Build 379
+2 ;Original;TMD;07/14/95 12:27 PM
+3 ;
+4 ;IHS/SD/SDR - V2.5 P8 - Added code for Cancelling official
+5 ;IHS/SD/SDR - v2.5 p8 - Added code for pending status (12)
+6 ;IHS/SD/SDR - v2.5 p13 - NO IM
+7 ;
+8 ;IHS/SD/SDR - 2.6*1 - HEAT4482 - Added claim status prompt
+9 ;IHS/SD/SDR - 2.6*4 - NOHEAT - fixed report headers for closed/exported dates
+10 ;IHS/SD/SDR - 2.6*21 - HEAT241429 - Added code to do Visit Dates only for Denied Bills Report
+11 ;IHS/SD/SDR - 2.6*21 - VMBP - Updated p11 changes to include Serena ref#s
+12 ;IHS/SD/SDR - 2.6*21 - VMBP - Updated to include all new insurer types
+13 ;
LOC ;EP
+1 WRITE !
KILL DIC,ABMY("LOC")
+2 SET DIC="^BAR(90052.05,DUZ(2),"
+3 SET DIC(0)="AEMQ"
+4 SET DIC("A")="Select LOCATION: "
+5 DO ^DIC
KILL DIC
+6 IF +Y<1
QUIT
+7 SET ABMY("LOC")=+Y
+8 QUIT
INS ;EP
+1 KILL ABMY("TYP"),ABMY("INS")
+2 WRITE !
+3 SET DIC="^AUTNINS("
+4 SET DIC(0)="QEAM"
+5 DO ^DIC
+6 IF +Y<0
QUIT
+7 SET ABMY("INS")=+Y
+8 QUIT
+9 ;
PAT ;
+1 KILL ABMY("TYP"),ABMY("PAT")
+2 WRITE !
+3 SET DIC="^AUPNPAT("
+4 SET DIC(0)="QEAM"
+5 DO ^DIC
+6 KILL AUPNLK("ALL")
+7 IF +Y<0
QUIT
+8 SET ABMY("PAT")=+Y
+9 QUIT
+10 ;
TYP ;EP
+1 KILL DIR,ABMY("TYP"),ABMY("INS"),ABMY("PAT")
+2 ;S DIR(0)="SO^1:MEDICARE;2:MEDICAID;3:PRIVATE INSURANCE;4:NON-BENEFICIARY PATIENTS;5:BENEFICIARY PATIENTS;6:SPECIFIC INSURER;7:SPECIFIC PATIENT;8:WORKMEN'S COMP;9:PRIVATE + WORKMEN'S COMP;10:CHIP" ;abm*2.6*11 VMBP#3
+3 ;start new abm*2.6*21 IHS/SD/SDR VMBP#3 RQMT_96
+4 SET DIR(0)="SO^1:MEDICARE;2:MEDICAID;3:PRIVATE INSURANCE;4:NON-BENEFICIARY PATIENTS;5:BENEFICIARY PATIENTS;6:SPECIFIC INSURER;7:SPECIFIC PATIENT;8:WORKMEN'S COMP;9:PRIVATE + WORKMEN'S COMP;10:CHIP;11:VETERANS MEDICAL BENEFIT"
+5 SET DIR(0)=DIR(0)_";12:3P LIABILITY;13:FPL 133 PERCENT;14:GUARANTOR;15:MEDICARE HMO;16:STATE EXCHANGE PLAN;17:TRIBAL SELF INSURED"
+6 ;end new abm*2.6*21 IHS/SD/SDR RQMT_96
+7 SET DIR("A")="Select TYPE of BILLING ENTITY to Display"
+8 DO ^DIR
+9 KILL DIR
+10 IF $DATA(DIRUT)!$DATA(DIROUT)
QUIT
+11 ;S ABMY("TYP")=$S(Y=1:"R",Y=2:"D",Y=3:"PHFM",Y=4:"N",Y=5:"I",Y=8:"W",Y=9:"PHFMW",Y=10:"K",1:Y) ;abm*2.6*11 VMBP#3
+12 ;S ABMY("TYP")=$S(Y=1:"R",Y=2:"D",Y=3:"PHFM",Y=4:"N",Y=5:"I",Y=8:"W",Y=9:"PHFMW",Y=10:"K",Y=11:"V",1:Y) ;abm*2.6*11 VMBP#3 RQMT_96 ;abm*2.6*21 IHS/SD/SDR VMBP RQMT_96
+13 ;start new abm*2.6*21 IHS/SD/SDR VMBP RQMT_96
+14 IF Y=1
SET ABMY("TYP")="^R^MMC^MC^MD^"
+15 IF Y=2
SET ABMY("TYP")="^D^"
+16 IF Y=3
SET ABMY("TYP")="^P^H^F^C^M^"
+17 IF Y=4
SET ABMY("TYP")="^N^"
+18 IF Y=5
SET ABMY("TYP")="^I^"
+19 IF Y=8
SET ABMY("TYP")="^W^"
+20 IF Y=9
SET ABMY("TYP")="^P^H^F^M^W^"
+21 IF Y=10
SET ABMY("TYP")="^K^"
+22 IF Y=11
SET ABMY("TYP")="^V^"
+23 IF Y=12
SET ABMY("TYP")="^T^"
+24 IF Y=13
SET ABMY("TYP")="^FPL^"
+25 IF Y=14
SET ABMY("TYP")="^G^"
+26 IF Y=15
SET ABMY("TYP")="^MH^"
+27 IF Y=16
SET ABMY("TYP")="^SEP^"
+28 IF Y=17
SET ABMY("TYP")="^TSI^"
+29 IF $GET(ABMY("TYP"))=""
SET ABMY("TYP")=Y
+30 ;end new abm*2.6*21 IHS/SD/SDR VMBP RQMT_96
+31 SET ABMY("TYP","NM")=Y(0)
+32 ;
+33 ;Only want specific insurer or patient
IF Y'=6
IF Y'=7
QUIT
+34 ; Check for date range
DO CK
+35 IF $DATA(DIRUT)!$DATA(DIROUT)
QUIT
+36 ;Y has changed
IF ABMY("TYP","NM")["INS"
GOTO INS
IF ABMY("TYP","NM")["PAT"
GOTO PAT
+37 QUIT
+38 ;
CK ;Already has dates set
IF $DATA(ABMY("DT",2))
QUIT
+1 ; Go get date range
DO DT
+2 ; Set quit if date not set
IF '$DATA(ABMY("DT",2))
SET DIROUT=1
+3 QUIT
+4 ;
STATUS ;EP
+1 KILL DIR
+2 ;S DIR(0)="SO^1:FLAGGED AS BILLABLE;2:IN EDIT MODE;3:BILLED AND UNEDITABLE;4:COMPLETED ALL BILLING;5:ROLLED FROM A/R AND IN EDIT MODE" ;abm*2.6*1 HEAT4482
+3 ;I $G(ABM("STA"))="I" S DIR(0)=DIR(0)_";6:INCOMPLETE STATUS;7:ALL",DIR("B")="INCOMPLETE STATUS" ;abm*2.6*1 HEAT4482
+4 ;E S DIR(0)=DIR(0)_";6:ALL" ;abm*2.6*1 HEAT4482
+5 ;S DIR(0)="SO^1:FLAGGED AS BILLABLE (includes IN EDIT MODE);1:IN EDIT MODE;3:BILLED AND UNEDITABLE;4:COMPLETED ALL BILLING;5:ROLLED FROM A/R AND IN EDIT MODE;6:ALL" ;abm*2.6*1 HEAT4482 ;abm*2.6*6 HEAT16168
+6 ;abm*2.6*1 HEAT4482 ;abm*2.6*6 HEAT16168
SET DIR(0)="SO^1:FLAGGED AS BILLABLE (includes IN EDIT MODE);2:IN EDIT MODE;3:BILLED AND UNEDITABLE;4:COMPLETED ALL BILLING;5:ROLLED FROM A/R AND IN EDIT MODE;6:ALL"
+7 SET DIR("A")="Select TYPE of CLAIM STATUS to Display"
+8 DO ^DIR
+9 KILL DIR
+10 IF $DATA(DIRUT)!$DATA(DIROUT)
QUIT
+11 SET ABM("STA")=$SELECT(Y=1:"F",Y=2:"E",Y=3:"U",Y=4:"C",Y=5:"O",1:"")
+12 SET ABM("STA","NM")=Y(0)
+13 QUIT
+14 ;
DT ;EP
+1 KILL DIR,ABMY("DT")
+2 IF $GET(ABM("DT"))="C"
SET Y=4
GOTO DTYP
+3 ;I $D(ABM("STA")),($G(ABM("STA"))'="X") S Y=2 G DTYP ;abm*2.6*4 NOHEAT
+4 ;abm*2.6*4 NOHEAT
IF $DATA(ABM("STA"))
IF ($GET(ABM("STA"))'="M")
SET Y=2
GOTO DTYP
+5 ;abm*2.6*21 IHS/SD/SDR HEAT241429
IF $DATA(ABM("DNYDT"))
SET Y=2
GOTO DTYP
+6 SET DIR(0)="SO^1:Approval Date;2:Visit Date"
+7 IF $GET(ABMP("TYP"))=2
GOTO DDIR
+8 IF $DATA(ABM("PAY"))
SET DIR(0)=DIR(0)_";3:Payment Date"
+9 IF '$TEST
SET DIR(0)=DIR(0)_";3:Export Date"
+10 ;I $G(ABM("STA"))="X" G DTYP2 ;Closed ;abm*2.6*4 NOHEAT
+11 ;Closed ;abm*2.6*4 NOHEAT
IF $GET(ABM("STA"))="M"
GOTO DTYP2
+12 ;
DDIR ;
+1 SET DIR("A")="Select TYPE of DATE Desired"
+2 DO ^DIR
+3 IF $DATA(DIROUT)!$DATA(DIRUT)
QUIT
+4 IF Y=3
SET Y=$SELECT(DIR(0)["Pay":5,1:3)
+5 ;
DTYP ;
+1 IF $DATA(DIRUT)
QUIT
+2 SET ABMY("DT")=$SELECT(Y=1:"A",Y=2:"V",Y=3:"X",Y=4:"C",1:"P")
+3 SET Y=$SELECT(Y=1:"APPROVAL",Y=2:"VISIT",Y=3:"EXPORT",Y=4:"CANCELLATION",1:"PAYMENT")_" DATE"
+4 WRITE !!," ============ Entry of ",Y," Range =============",!
+5 SET DIR("A")="Enter STARTING "_Y_" for the Report"
+6 SET DIR(0)="DO^::EP"
+7 DO ^DIR
+8 IF $DATA(DIRUT)
GOTO DT
+9 SET ABMY("DT",1)=Y
+10 WRITE !
+11 SET DIR("A")="Enter ENDING DATE for the Report"
+12 DO ^DIR
+13 KILL DIR
+14 IF $DATA(DIRUT)
GOTO DT
+15 SET ABMY("DT",2)=Y
+16 IF ABMY("DT",1)>ABMY("DT",2)
WRITE !!,*7,"INPUT ERROR: Start Date is Greater than than the End Date, TRY AGAIN!",!!
GOTO DT
+17 QUIT
DTYP2 ;
+1 SET DIR(0)="SO^1:Closed Date;2:Visit Date"
+2 SET DIR("A")="Select TYPE of DATE Desired"
+3 DO ^DIR
+4 IF $DATA(DIROUT)!$DATA(DIRUT)
QUIT
+5 ;S ABMY("DT")=$S(Y=1:"X",1:"V") ;abm*2.6*4 NOHEAT
+6 ;abm*2.6*4 NOHEAT
SET ABMY("DT")=$SELECT(Y=1:"M",1:"V")
+7 SET Y=$SELECT(Y=1:"CLOSED",1:"VISIT")_" DATE"
+8 WRITE !!," ============ Entry of ",Y," Range =============",!
+9 SET DIR("A")="Enter STARTING "_Y_" for the Report"
+10 SET DIR(0)="DO^::EP"
+11 DO ^DIR
+12 IF $DATA(DIRUT)
GOTO DT
+13 SET ABMY("DT",1)=Y
+14 WRITE !
+15 SET DIR("A")="Enter ENDING DATE for the Report"
+16 DO ^DIR
+17 KILL DIR
+18 IF $DATA(DIRUT)
GOTO DT
+19 SET ABMY("DT",2)=Y
+20 IF ABMY("DT",1)>ABMY("DT",2)
WRITE !!,*7,"INPUT ERROR: Start Date is Greater than than the End Date, TRY AGAIN!",!!
GOTO DT
+21 QUIT
+22 ;
APPR ;EP
+1 KILL ABMY("APPR")
+2 WRITE !
+3 SET DIC="^VA(200,"
+4 SET DIC(0)="QEAM"
+5 DO ^DIC
+6 IF +Y>0
SET ABMY("APPR")=+Y
+7 QUIT
+8 ;
CANC ;EP
+1 KILL ABMY("CANC")
+2 WRITE !
+3 SET DIC="^VA(200,"
+4 SET DIC(0)="QEAM"
+5 DO ^DIC
+6 IF +Y>0
SET ABMY("CANC")=+Y
+7 QUIT
CLOS ;EP
+1 KILL ABMY("CLOS")
+2 WRITE !
+3 SET DIC="^VA(200,"
+4 SET DIC(0)="QEAM"
+5 DO ^DIC
+6 IF +Y>0
SET ABMY("CLOS")=+Y
+7 QUIT
+8 ;
PRV ;EP
+1 KILL ABMY("PRV")
+2 WRITE !
+3 SET DIC="^VA(200,"
+4 SET DIC(0)="QEAM"
+5 DO ^DIC
+6 IF +Y>0
SET ABMY("PRV")=+Y
+7 QUIT
INC ;EP - choose status updater
+1 KILL DIR,DIC,DIE,DR
+2 SET DIC(0)="AEMQ"
+3 SET DIC="^VA(200,"
+4 DO ^DIC
+5 IF +Y<0
SET ABMY("STATUS UPDATER")=""
+6 IF '$TEST
SET ABMY("STATUS UPDATER")=+Y
+7 QUIT