BUDHUPVL ;IHS/CMI/LAB - UPDATE VISIT LOCATIONS;
;;13.0;IHS/RPMS UNIFORM DATA SYSTEM;;OCT 12, 2018;Build 90
;
;
START ;update visit locations
K BUDVL,BUDX,BUDY
W:$D(IOF) @IOF W !!,"*** Update/Review UDS 2018 Site Parameters ***",!!
W !!,"This option is used to set up your site's parameters for UDS reporting,"
W !,"including entering your BPHC UDS id no. and defining visit locations"
W !,"to be ","""","counted",""""," toward the report. ",""""
W "A visit must take place in health "
W !,"center sites or other locations that do not meet HRSA's site criteria, "
W !,"such as hospitals, schools, nursing homes, homeless shelters, "
W !,"or extended care facilities. Visits at these sites count when they "
W !,"occur on a regularly scheduled basis at an approved site within"
W !,"the health center's scope of project."""
W !!,"Visits will not be counted toward the report if the visit location does not"
W !,"match the locations on the UDS Visit Locations list."
W !!,"Multiple site names can be designated with associated locations. Each site name",!,"must have locations designated."
W !!
I $G(BUDDNT)=2 S DIR(0)="Y",DIR("A")="Do you want to add/edit another site",DIR("B")="N" KILL DA D ^DIR KILL DIR I Y'=1 D EOJ Q
S DIC(0)="AEMLQ",DIC="^BUDHSITE(" D ^DIC
I Y=-1 W !!,"No site selected" D EOJ Q
S BUDSITE=+Y
S DIE="^BUDHSITE(",DR=".02",DA=BUDSITE D ^DIE
D ^XBFMK
D EN
S DIR(0)="Y",DIR("A")="Would you like to review/edit the insurance company overrides",DIR("B")="N" KILL DA D ^DIR KILL DIR
I $D(DIRUT) G PCOV
I 'Y G PCOV
I '$O(^BUDHSITE(BUDSITE,12,0)) W !,"There are currently no insurance overrides entered.",!
I $O(^BUDHSITE(BUDSITE,12,0)) W !,"The following insurance overrides are currently entered:",!
S X=0 F S X=$O(^BUDHSITE(BUDSITE,12,X)) Q:X'=+X D
.W !?5,$P(^AUTNINS($P(^BUDHSITE(BUDSITE,12,X,0),U,1),0),U,1)
.S Y=$P(^BUDHSITE(BUDSITE,12,X,0),U,2) W ?40,$S(Y="P":"PRIVATE INSURANCE",Y="MCR":"MEDICARE",Y="MCD":"MEDICAID",Y="NI":"NONE/UNINSURED",1:"")
W ! S DA=BUDSITE,DR=1201,DIE="^BUDHSITE(" D ^DIE K DA,DR,DIE
PCOV ;PROVIDER CLASS OVERRIDE, ADDED V12 T3 FOR HUNTER HEALTH, THESE PROVIDER CLASSES DO NOT COUNT AS A "PROVIDER" FOR UDS VISITS
W !!!,"Provider Class Exclusions from UDS visit definition."
W !,"UDS definition of a Provider:"
W !,"A provider is someone who assumes primary responsibility for assessing the"
W !,"patient and documenting services in the patient's record. Providers include"
W !,"only those who exercise independent judgment as to the services rendered to"
W !,"the patient during a visit."
W !!,"If there are provider class/disciplines that do not meet the above criteria"
W !,"you may add them to the list below and any visit on which the primary provider"
W !,"is of one of those disciplines/classes the visit will NOT be counted as a"
W !,"UDS visit."
W !!,"Note: Only exclude provider types who in your facility DO NOT exercise"
W !,"independent judgment as to the services rendered to the patient during a visit."
W !!
S DIR(0)="Y",DIR("A")="Would you like to review/edit the provider class exclusions",DIR("B")="N" KILL DA D ^DIR KILL DIR
I $D(DIRUT) G N
I 'Y G N
I '$O(^BUDHSITE(BUDSITE,13,0)) W !,"There are currently no provider class exclusions entered.",!
I $O(^BUDHSITE(BUDSITE,13,0)) W !,"The following provider class exclusions are currently entered:",!
S X=0 F S X=$O(^BUDHSITE(BUDSITE,13,X)) Q:X'=+X D
.W !?5,$P(^DIC(7,$P(^BUDHSITE(BUDSITE,13,X,0),U,1),0),U,1)," ("_$P($G(^DIC(7,$P(^BUDHSITE(BUDSITE,13,X,0),U,1),9999999)),U,1),")"
W ! S DA=BUDSITE,DR=1301,DIE="^BUDHSITE(" D ^DIE K DA,DR,DIE
N ;
S BUDDNT=2
G START
EN ; -- main entry point for BUD UPDATE VISIT LOCATIONS
D EN^VALM("BUD 18 UPDATE VISIT LOCATIONS")
K BUDVL,BUDX,BUDD,BUDRCNT,BUDLINE,BUDDN
Q
;
HDR ; -- header code
S VALMHDR(1)=$TR($J(" ",80)," ","-")
S VALMHDR(2)="Site Name: "_$P(^DIC(4,BUDSITE,0),U)
S VALMHDR(3)="Enter all locations to be included in the UDS report."
S VALMHDR(4)=$TR($J(" ",80)," ","-")
Q
;
GETPAT ;
S DFN=""
W:$D(IOF) @IOF
S DFN=""
S DIC="^BUDPAT(",DIC(0)="AEMQ" D ^DIC K DIC
I Y<0 Q
S DFN=+Y
Q
INIT ; -- init variables and list array
S VALMSG="?? for more actions + next screen - prev screen"
D GATHER ;gather up all records for display
Q
;
GATHER ;
K BUDDISP,BUDSEL,BUDHIGH,BUDVL
K BUDLIST
S X=0 F S X=$O(^BUDHSITE(BUDSITE,11,X)) Q:X'=+X S BUDLIST($P(^DIC(4,$P(^BUDHSITE(BUDSITE,11,X,0),U),0),U),X)=X
S BUDHIGH=0,X="" F S X=$O(BUDLIST(X)) Q:X="" S Y=0 F S Y=$O(BUDLIST(X,Y)) Q:Y'=+Y S BUDHIGH=BUDHIGH+1,BUDSEL(BUDHIGH)=BUDLIST(X,Y)
S BUDCUT=((BUDHIGH/2)+1)\1
S (C,I)=0,J=1,K=1 F S I=$O(BUDSEL(I)) Q:I'=+I D
.S C=C+1,BUDVL(C,0)=I_") "_$P(^DIC(4,$P(^BUDHSITE(BUDSITE,11,BUDSEL(I),0),U),0),U) S BUDDISP(I)="",BUDVL("IDX",C,C)=BUDSEL(I)
K BUDDISP
S VALMCNT=C
Q
ADD ;EP called from protocol to open a new case
D FULL^VALM1
;W:$D(IOF) @IOF
W !!
K DIC S DIC(0)="AEMQ",DIC=9999999.06,DIC("A")="Enter Location Name: " D ^DIC
I Y=-1 Q
S BUDLOC=+Y
I $D(^BUDHSITE(BUDSITE,11,BUDLOC)) W !!,$P(^DIC(4,BUDLOC,0),U)," is already on the list." D RETURN,EXIT Q
W !,"Adding UDS Visit Location..."
D ^XBFMK
S X="`"_BUDLOC,DIC="^BUDHSITE("_BUDSITE_",11,",DIC(0)="L",DIC("P")=$P(^DD(90669.901,1101,0),U,2),DA(1)=BUDSITE D ^DIC
I Y=-1 W !!,"adding new location failed"
D EXIT
Q
ADDALL ;EP
;add all locations for this su
D FULL^VALM1
W !!,"Hold on while I gather up all of ",$$VAL^XBDIQ1(9999999.06,BUDSITE,.05),"'s locations and add them...."
NEW SU
S SU=$P(^AUTTLOC(BUDSITE,0),U,5)
S BUDX=0 F S BUDX=$O(^AUTTLOC(BUDX)) Q:BUDX'=+BUDX I $P(^AUTTLOC(BUDX,0),U,5)=SU D
.I $D(^BUDHSITE(BUDSITE,11,BUDX)) W !,$P(^DIC(4,BUDX,0),U)," --already on list" Q
.D ^XBFMK
.S X="`"_BUDX,DIC="^BUDHSITE("_BUDSITE_",11,",DIC(0)="L",DIC("P")=$P(^DD(90669.901,1101,0),U,2),DA(1)=BUDSITE D ^DIC K DIC,DA,DR,DIADD,DLAYGO,DD,D0,DO,X
.W !,$P(^DIC(4,BUDX,0),U)
.I Y=-1 W !!," --failed to be added" Q
.W " added"
.Q
D PAUSE
D EXIT
Q
EDIT ;
W ! S DIR(0)="LO^1:"_BUDHIGH,DIR("A")="Which item(s)" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
I Y="" W !,"No items selected." D EXIT Q
I $D(DIRUT) W !,"No items selected." D EXIT Q
D FULL^VALM1
S BUDANS=Y,BUDD="" F BUDI=1:1 S BUDD=$P(BUDANS,",",BUDI) Q:BUDD="" S X=BUDVL("IDX",BUDD,BUDD) K ^BUDHSITE(BUDSITE,11,X,0),^BUDHSITE(BUDSITE,11,"B",X,X) W !,$P(^DIC(4,X,0),U)," removed from list"
S DA=BUDSITE,DIK="^BUDHSITE(" D EN^DIK
D ^XBFMK
D PAUSE
D EXIT
Q
RETURN ;EP; -- ask user to press ENTER
Q:IOST'["C-"
NEW Y S Y=$$READ("E","Press ENTER to continue") D ^XBCLS Q
READ(TYPE,PROMPT,DEFAULT,HELP,SCREEN,DIRA) ;EP; calls reader, returns response
NEW DIR,X,Y
S DIR(0)=TYPE
I $D(SCREEN) S DIR("S")=SCREEN
I $G(PROMPT)]"" S DIR("A")=PROMPT
I $G(DEFAULT)]"" S DIR("B")=DEFAULT
I $D(HELP) S DIR("?")=HELP
I $D(DIRA(1)) S Y=0 F S Y=$O(DIRA(Y)) Q:Y="" S DIR("A",Y)=DIRA(Y)
D ^DIR
Q Y
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ; -- exit code
K BUDX,BUDVL,BUDPC,BUDR1,BUDY
D TERM^VALM0
S VALMBCK="R"
D GATHER
D HDR
K X,Y,Z,I
Q
PAUSE ;EP
S DIR(0)="EO",DIR("A")="Press enter to continue...." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
Q
EOJ ;
K DDSFILE,DIPGM,Y
K X,Y,%,DR,DDS,DA,DIC
D EN^XBVK("BUD")
D:$D(VALMWD) CLEAR^VALM1
K VALM,VALMHDR,VALMKEY,VALMMENU,VALMSGR,VALMUP,VALMWD,VALMLST,VALMVAR,VALMLFT,VALMBCK,VALMCC,VALMAR,VALMBG,VALMCAP,VALMCOFF,VALMCNT,VALMCON,VALMON,VALMEVL,VALMIOXY
Q
;
EXPND ; -- expand code
Q
;
BUDHUPVL ;IHS/CMI/LAB - UPDATE VISIT LOCATIONS;
+1 ;;13.0;IHS/RPMS UNIFORM DATA SYSTEM;;OCT 12, 2018;Build 90
+2 ;
+3 ;
START ;update visit locations
+1 KILL BUDVL,BUDX,BUDY
+2 IF $DATA(IOF)
WRITE @IOF
WRITE !!,"*** Update/Review UDS 2018 Site Parameters ***",!!
+3 WRITE !!,"This option is used to set up your site's parameters for UDS reporting,"
+4 WRITE !,"including entering your BPHC UDS id no. and defining visit locations"
+5 WRITE !,"to be ","""","counted",""""," toward the report. ",""""
+6 WRITE "A visit must take place in health "
+7 WRITE !,"center sites or other locations that do not meet HRSA's site criteria, "
+8 WRITE !,"such as hospitals, schools, nursing homes, homeless shelters, "
+9 WRITE !,"or extended care facilities. Visits at these sites count when they "
+10 WRITE !,"occur on a regularly scheduled basis at an approved site within"
+11 WRITE !,"the health center's scope of project."""
+12 WRITE !!,"Visits will not be counted toward the report if the visit location does not"
+13 WRITE !,"match the locations on the UDS Visit Locations list."
+14 WRITE !!,"Multiple site names can be designated with associated locations. Each site name",!,"must have locations designated."
+15 WRITE !!
+16 IF $GET(BUDDNT)=2
SET DIR(0)="Y"
SET DIR("A")="Do you want to add/edit another site"
SET DIR("B")="N"
KILL DA
DO ^DIR
KILL DIR
IF Y'=1
DO EOJ
QUIT
+17 SET DIC(0)="AEMLQ"
SET DIC="^BUDHSITE("
DO ^DIC
+18 IF Y=-1
WRITE !!,"No site selected"
DO EOJ
QUIT
+19 SET BUDSITE=+Y
+20 SET DIE="^BUDHSITE("
SET DR=".02"
SET DA=BUDSITE
DO ^DIE
+21 DO ^XBFMK
+22 DO EN
+23 SET DIR(0)="Y"
SET DIR("A")="Would you like to review/edit the insurance company overrides"
SET DIR("B")="N"
KILL DA
DO ^DIR
KILL DIR
+24 IF $DATA(DIRUT)
GOTO PCOV
+25 IF 'Y
GOTO PCOV
+26 IF '$ORDER(^BUDHSITE(BUDSITE,12,0))
WRITE !,"There are currently no insurance overrides entered.",!
+27 IF $ORDER(^BUDHSITE(BUDSITE,12,0))
WRITE !,"The following insurance overrides are currently entered:",!
+28 SET X=0
FOR
SET X=$ORDER(^BUDHSITE(BUDSITE,12,X))
IF X'=+X
QUIT
Begin DoDot:1
+29 WRITE !?5,$PIECE(^AUTNINS($PIECE(^BUDHSITE(BUDSITE,12,X,0),U,1),0),U,1)
+30 SET Y=$PIECE(^BUDHSITE(BUDSITE,12,X,0),U,2)
WRITE ?40,$SELECT(Y="P":"PRIVATE INSURANCE",Y="MCR":"MEDICARE",Y="MCD":"MEDICAID",Y="NI":"NONE/UNINSURED",1:"")
End DoDot:1
+31 WRITE !
SET DA=BUDSITE
SET DR=1201
SET DIE="^BUDHSITE("
DO ^DIE
KILL DA,DR,DIE
PCOV ;PROVIDER CLASS OVERRIDE, ADDED V12 T3 FOR HUNTER HEALTH, THESE PROVIDER CLASSES DO NOT COUNT AS A "PROVIDER" FOR UDS VISITS
+1 WRITE !!!,"Provider Class Exclusions from UDS visit definition."
+2 WRITE !,"UDS definition of a Provider:"
+3 WRITE !,"A provider is someone who assumes primary responsibility for assessing the"
+4 WRITE !,"patient and documenting services in the patient's record. Providers include"
+5 WRITE !,"only those who exercise independent judgment as to the services rendered to"
+6 WRITE !,"the patient during a visit."
+7 WRITE !!,"If there are provider class/disciplines that do not meet the above criteria"
+8 WRITE !,"you may add them to the list below and any visit on which the primary provider"
+9 WRITE !,"is of one of those disciplines/classes the visit will NOT be counted as a"
+10 WRITE !,"UDS visit."
+11 WRITE !!,"Note: Only exclude provider types who in your facility DO NOT exercise"
+12 WRITE !,"independent judgment as to the services rendered to the patient during a visit."
+13 WRITE !!
+14 SET DIR(0)="Y"
SET DIR("A")="Would you like to review/edit the provider class exclusions"
SET DIR("B")="N"
KILL DA
DO ^DIR
KILL DIR
+15 IF $DATA(DIRUT)
GOTO N
+16 IF 'Y
GOTO N
+17 IF '$ORDER(^BUDHSITE(BUDSITE,13,0))
WRITE !,"There are currently no provider class exclusions entered.",!
+18 IF $ORDER(^BUDHSITE(BUDSITE,13,0))
WRITE !,"The following provider class exclusions are currently entered:",!
+19 SET X=0
FOR
SET X=$ORDER(^BUDHSITE(BUDSITE,13,X))
IF X'=+X
QUIT
Begin DoDot:1
+20 WRITE !?5,$PIECE(^DIC(7,$PIECE(^BUDHSITE(BUDSITE,13,X,0),U,1),0),U,1)," ("_$PIECE($GET(^DIC(7,$PIECE(^BUDHSITE(BUDSITE,13,X,0),U,1),9999999)),U,1),")"
End DoDot:1
+21 WRITE !
SET DA=BUDSITE
SET DR=1301
SET DIE="^BUDHSITE("
DO ^DIE
KILL DA,DR,DIE
N ;
+1 SET BUDDNT=2
+2 GOTO START
EN ; -- main entry point for BUD UPDATE VISIT LOCATIONS
+1 DO EN^VALM("BUD 18 UPDATE VISIT LOCATIONS")
+2 KILL BUDVL,BUDX,BUDD,BUDRCNT,BUDLINE,BUDDN
+3 QUIT
+4 ;
HDR ; -- header code
+1 SET VALMHDR(1)=$TRANSLATE($JUSTIFY(" ",80)," ","-")
+2 SET VALMHDR(2)="Site Name: "_$PIECE(^DIC(4,BUDSITE,0),U)
+3 SET VALMHDR(3)="Enter all locations to be included in the UDS report."
+4 SET VALMHDR(4)=$TRANSLATE($JUSTIFY(" ",80)," ","-")
+5 QUIT
+6 ;
GETPAT ;
+1 SET DFN=""
+2 IF $DATA(IOF)
WRITE @IOF
+3 SET DFN=""
+4 SET DIC="^BUDPAT("
SET DIC(0)="AEMQ"
DO ^DIC
KILL DIC
+5 IF Y<0
QUIT
+6 SET DFN=+Y
+7 QUIT
INIT ; -- init variables and list array
+1 SET VALMSG="?? for more actions + next screen - prev screen"
+2 ;gather up all records for display
DO GATHER
+3 QUIT
+4 ;
GATHER ;
+1 KILL BUDDISP,BUDSEL,BUDHIGH,BUDVL
+2 KILL BUDLIST
+3 SET X=0
FOR
SET X=$ORDER(^BUDHSITE(BUDSITE,11,X))
IF X'=+X
QUIT
SET BUDLIST($PIECE(^DIC(4,$PIECE(^BUDHSITE(BUDSITE,11,X,0),U),0),U),X)=X
+4 SET BUDHIGH=0
SET X=""
FOR
SET X=$ORDER(BUDLIST(X))
IF X=""
QUIT
SET Y=0
FOR
SET Y=$ORDER(BUDLIST(X,Y))
IF Y'=+Y
QUIT
SET BUDHIGH=BUDHIGH+1
SET BUDSEL(BUDHIGH)=BUDLIST(X,Y)
+5 SET BUDCUT=((BUDHIGH/2)+1)\1
+6 SET (C,I)=0
SET J=1
SET K=1
FOR
SET I=$ORDER(BUDSEL(I))
IF I'=+I
QUIT
Begin DoDot:1
+7 SET C=C+1
SET BUDVL(C,0)=I_") "_$PIECE(^DIC(4,$PIECE(^BUDHSITE(BUDSITE,11,BUDSEL(I),0),U),0),U)
SET BUDDISP(I)=""
SET BUDVL("IDX",C,C)=BUDSEL(I)
End DoDot:1
+8 KILL BUDDISP
+9 SET VALMCNT=C
+10 QUIT
ADD ;EP called from protocol to open a new case
+1 DO FULL^VALM1
+2 ;W:$D(IOF) @IOF
+3 WRITE !!
+4 KILL DIC
SET DIC(0)="AEMQ"
SET DIC=9999999.06
SET DIC("A")="Enter Location Name: "
DO ^DIC
+5 IF Y=-1
QUIT
+6 SET BUDLOC=+Y
+7 IF $DATA(^BUDHSITE(BUDSITE,11,BUDLOC))
WRITE !!,$PIECE(^DIC(4,BUDLOC,0),U)," is already on the list."
DO RETURN
DO EXIT
QUIT
+8 WRITE !,"Adding UDS Visit Location..."
+9 DO ^XBFMK
+10 SET X="`"_BUDLOC
SET DIC="^BUDHSITE("_BUDSITE_",11,"
SET DIC(0)="L"
SET DIC("P")=$PIECE(^DD(90669.901,1101,0),U,2)
SET DA(1)=BUDSITE
DO ^DIC
+11 IF Y=-1
WRITE !!,"adding new location failed"
+12 DO EXIT
+13 QUIT
ADDALL ;EP
+1 ;add all locations for this su
+2 DO FULL^VALM1
+3 WRITE !!,"Hold on while I gather up all of ",$$VAL^XBDIQ1(9999999.06,BUDSITE,.05),"'s locations and add them...."
+4 NEW SU
+5 SET SU=$PIECE(^AUTTLOC(BUDSITE,0),U,5)
+6 SET BUDX=0
FOR
SET BUDX=$ORDER(^AUTTLOC(BUDX))
IF BUDX'=+BUDX
QUIT
IF $PIECE(^AUTTLOC(BUDX,0),U,5)=SU
Begin DoDot:1
+7 IF $DATA(^BUDHSITE(BUDSITE,11,BUDX))
WRITE !,$PIECE(^DIC(4,BUDX,0),U)," --already on list"
QUIT
+8 DO ^XBFMK
+9 SET X="`"_BUDX
SET DIC="^BUDHSITE("_BUDSITE_",11,"
SET DIC(0)="L"
SET DIC("P")=$PIECE(^DD(90669.901,1101,0),U,2)
SET DA(1)=BUDSITE
DO ^DIC
KILL DIC,DA,DR,DIADD,DLAYGO,DD,D0,DO,X
+10 WRITE !,$PIECE(^DIC(4,BUDX,0),U)
+11 IF Y=-1
WRITE !!," --failed to be added"
QUIT
+12 WRITE " added"
+13 QUIT
End DoDot:1
+14 DO PAUSE
+15 DO EXIT
+16 QUIT
EDIT ;
+1 WRITE !
SET DIR(0)="LO^1:"_BUDHIGH
SET DIR("A")="Which item(s)"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 IF Y=""
WRITE !,"No items selected."
DO EXIT
QUIT
+3 IF $DATA(DIRUT)
WRITE !,"No items selected."
DO EXIT
QUIT
+4 DO FULL^VALM1
+5 SET BUDANS=Y
SET BUDD=""
FOR BUDI=1:1
SET BUDD=$PIECE(BUDANS,",",BUDI)
IF BUDD=""
QUIT
SET X=BUDVL("IDX",BUDD,BUDD)
KILL ^BUDHSITE(BUDSITE,11,X,0),^BUDHSITE(BUDSITE,11,"B",X,X)
WRITE !,$PIECE(^DIC(4,X,0),U)," removed from list"
+6 SET DA=BUDSITE
SET DIK="^BUDHSITE("
DO EN^DIK
+7 DO ^XBFMK
+8 DO PAUSE
+9 DO EXIT
+10 QUIT
RETURN ;EP; -- ask user to press ENTER
+1 IF IOST'["C-"
QUIT
+2 NEW Y
SET Y=$$READ("E","Press ENTER to continue")
DO ^XBCLS
QUIT
READ(TYPE,PROMPT,DEFAULT,HELP,SCREEN,DIRA) ;EP; calls reader, returns response
+1 NEW DIR,X,Y
+2 SET DIR(0)=TYPE
+3 IF $DATA(SCREEN)
SET DIR("S")=SCREEN
+4 IF $GET(PROMPT)]""
SET DIR("A")=PROMPT
+5 IF $GET(DEFAULT)]""
SET DIR("B")=DEFAULT
+6 IF $DATA(HELP)
SET DIR("?")=HELP
+7 IF $DATA(DIRA(1))
SET Y=0
FOR
SET Y=$ORDER(DIRA(Y))
IF Y=""
QUIT
SET DIR("A",Y)=DIRA(Y)
+8 DO ^DIR
+9 QUIT Y
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 KILL BUDX,BUDVL,BUDPC,BUDR1,BUDY
+2 DO TERM^VALM0
+3 SET VALMBCK="R"
+4 DO GATHER
+5 DO HDR
+6 KILL X,Y,Z,I
+7 QUIT
PAUSE ;EP
+1 SET DIR(0)="EO"
SET DIR("A")="Press enter to continue...."
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 QUIT
EOJ ;
+1 KILL DDSFILE,DIPGM,Y
+2 KILL X,Y,%,DR,DDS,DA,DIC
+3 DO EN^XBVK("BUD")
+4 IF $DATA(VALMWD)
DO CLEAR^VALM1
+5 KILL VALM,VALMHDR,VALMKEY,VALMMENU,VALMSGR,VALMUP,VALMWD,VALMLST,VALMVAR,VALMLFT,VALMBCK,VALMCC,VALMAR,VALMBG,VALMCAP,VALMCOFF,VALMCNT,VALMCON,VALMON,VALMEVL,VALMIOXY
+6 QUIT
+7 ;
EXPND ; -- expand code
+1 QUIT
+2 ;