DVBAUDOAD ;ALB/CP - Delete DVBA Audit Code from Option ; 10/15/18 1:35pm
;;2.7;AMIE;**256**;;Build 19
; Per VHA Directive 6402 this routine should not be modified
; YN^DICN ; IA #10000
; $$GET1^DIQ ; IA # 2056
Q
;
ENTER ; Delete 'D AUDIT^DVBAUDOA' from the ENTRY ACTION of the select
;
N DVBEDIT,DVBNAMSPC,DVBOPTION,DVBOPTYPE,DVBQUIT,DVBTARGET
;
PROMPT ; Prompt user
; ZEXCEPT: DUZ,IOF
;
S DVBOPTION="Delete Audit Code from Option"
W @IOF,!?1,"*** ",DVBOPTION," ***" S DVBQUIT=0
S DVBNAMSPC="*" ; Set in case deleting out of order options
;
D PGMACCSS^DVBAUDU1($T(+0),.DUZ) G:DVBQUIT EXIT ; Check DUZ(0) for '@'
D SELEDIT^DVBAUDDIR($T(+0)) G:DVBQUIT EXIT ;.. Get DVBEDIT
D MSGIGNOR^DVBAUDU1($T(+0))
D SELTYPE^DVBAUDDIR($T(+0)) G:DVBQUIT PROMPT ; Option TYPEs audited
;
; Build DVBTARGET(OPTION,IEN)=TYPE for selected Options (DVBEDIT=1)
I DVBEDIT=1 D OPTSIN^DVBAUDDIC($T(+0),DVBEDIT,DVBOPTYPE)
G:DVBQUIT PROMPT ; Start over, user may not want to Exit quite yet
;
; If editing with Option NAMESPACE using WILDCARE * (DVBEDIT=2)
I DVBEDIT=2 D SELWILD^DVBAUDU1(DVBEDIT) G:DVBQUIT PROMPT ; OPTION prefix
G:DVBQUIT PROMPT ; Start over, user may not want to Exit quite yet
START ;
; Build DVBTARGET array from OPTION file (#19) to stuff for DVBNAMSPC
I DVBEDIT=2 D ;
. N DVBACTION
. S DVBACTION="DELETE" ; Needed in OPTBUILD^DVBAUDU2 for messages
. D OPTBUILD^DVBAUDU2($T(+0),DVBEDIT,DVBOPTYPE,DVBNAMSPC)
;
; DVBEDIT=3 Build DVBTARGET(OPTION,IEN)=TYPE from file (#19.2)
I DVBEDIT=3 D ;
. D BUILDOS^DVBAUDU2($T(+0),DVBEDIT,DVBOPTYPE)
;
; Build DVBTARGET by Options OUT OF ORDER
I DVBEDIT=4 D BUILDOOO^DVBAUDU1($T(+0),DVBEDIT,DVBOPTYPE)
G:DVBQUIT PROMPT ; Start over, user may not want to Exit quite yet
;
D DELAUDIT ; Delete processing for selected Option(s)
;
G PROMPT
;
EXIT ; Exit/Quit the deleting of 'D AUDIT^DVBAUDOA' from DVBTARGET options.
;
Q ; Routine DVBAUDOAD
;
ASKEDIT(DVBIEN19,DVBENACTAFT,DVBEXACTAFT) ; Prompt for ' OK to delete the DVB audit?"
;
N @($$DICN^DVBAUDNEW1())
; ZEXCEPT: %,DVBCNT,DVBEDITOK,DVBQUIT
;
; Prompt for YES/NO or '^' DVBRESPONSE
;
W !," OK to delete the AMIE audit functionality"
S %=2 D YN^DICN ; Default to 'NO' DVBRESPONSE
;
I %=-1 D ; If USER enters '^'
. W " <Editing aborted>",! ; User entered '^'
. S DVBQUIT=1 ; Output variable to terminate processing
Q:DVBQUIT ; User entered an '^'
;
I %=2 D ; If USER enters NO
. S DVBEDITOK="NO" ; Output variable
;
I %=1 D ; If user entered 'YES'
. N DVBENACTION,DVBEXACTION
. S DVBENACTION("AFT")=DVBENACTAFT
. S DVBEXACTION("AFT")=DVBEXACTAFT
. D ENTRYACT^DVBAUDDIE(DVBIEN19,.DVBENACTION,.DVBEXACTION) Q:DVBQUIT
. W " [Edit completed]"
. S DVBCNT("DEL")=DVBCNT("DEL")+1 ; Number opts where an audit was deleted.
. S DVBEDITOK="YES" ; Output variable
S DVBQUIT=0
;Q:DVBQUIT ; Database server error was detected.
;
Q ; Quit ASKEDIT
;
ASKCLEAN(DVBRTN) ; Prompt for ' OK to edit the ENTRY ACTION?"
;
N DVBCHOICE
; ZEXCEPT: DVBASK,DVBQUIT
;
S DVBQUIT=0 ; Default to continue to process Option selections.
;
S DVBCHOICE=" Can I clean-up the Option statistical summary information"
S DVBASK=$$ASKYESNO^DVBAUDASK1(DVBCHOICE,"NO")
I DVBASK="^" S DVBQUIT=1 Q ; User wants to exit
Q:DVBASK="N"
;
;
Q ; Quit ASKCLEAN
;
DELAUDIT ; Present user with option/original ENTRY ACTION/new ENTRY ACTION
;
N DVBCNT,DVBDASHES,DVBENACTION,DVBLENGTH,DVBMSG
N DVBOPTNAME,DVBRESPONSE,DVBQUIT,DVBSPACES,DVBSUB
; ZEXCEPT: DVBIEN19,IOM,DVBEDIT,DVBNAMSPC,DVBQUIT,DVBTARGET
;
;
F DVBSUB="PRE","DEL","CLEANUP" S DVBCNT(DVBSUB)=0
S $P(DVBDASHES,".",IOM+1)="" ; Line of DVBDASHES ('-')
S $P(DVBSPACES," ",IOM+1)="" ; Line of DVBSPACES (' ')
;
;
S (DVBOPTNAME,DVBQUIT)=0
F S DVBOPTNAME=$O(DVBTARGET(DVBOPTNAME)) Q:(DVBOPTNAME="")!DVBQUIT D ;
. N DVBIEN19
. S DVBIEN19=0
. F S DVBIEN19=$O(DVBTARGET(DVBOPTNAME,DVBIEN19)) Q:'DVBIEN19!DVBQUIT D ;
. . N DIERR,DVBENACTION,DVBEXACTION,DVBMSG,DVBOPT,DVBERRMSG
. . D OPTION^DVBAUDDIQ(DVBIEN19)
. . S DVBENACTION("BEF")=DVBOPT("ENTRYACTION") ; Capture ENTRY ACTION
. . S DVBENACTION("AFT")=$$STRIPAUD^DVBAUDU2(DVBENACTION("BEF"))
. . S DVBEXACTION("BEF")=DVBOPT("EXITACTION") ;. Capture EXIT ACTION
. . ;
. . S DVBCNT("PRE")=DVBCNT("PRE")+1 ; Number of eligible options presented
. . W !!,$E(DVBDASHES,1,68)
. . ;
. . S DVBMSG=" Editing option "_DVBCNT("PRE")_": ",DVBLENGTH=$L(DVBMSG)
. . W !!,$J(DVBMSG,DVBLENGTH),$$GET1^DIQ(19,DVBIEN19,1,"E",,"DVBERRMSG") ; DVBOPT. MENU TEXT
. . D DIERR^DVBAUDDILG1(60,5,"DVBERRMSG","DELAUDIT^"_$T(+0)) Q:DVBQUIT
. . ;
. . S DVBMSG="["_DVBOPT("NAME")_"]"
. . W !,$E(DVBSPACES,1,DVBLENGTH),DVBMSG
. . W !,$E(DVBSPACES,1,DVBLENGTH),"TYPE: ",$$GET1^DIQ(19,DVBIEN19,4,"E",,"DVBERRMSG")
. . D DIERR^DVBAUDDILG1(60,5,"DVBERRMSG","DELAUDIT^"_$T(+0)) Q:DVBQUIT
. . ;
. . I DVBOPT("OOOMSG")]"" D ;
. . . ;
. . . S DVBMSG="OUT OF ORDER MESSAGE: "
. . . W !,$J(DVBMSG,DVBLENGTH),$E(DVBOPT("OOOMSG"),1,IOM-$X)
. . ;
. . N DVBAUDBY
. . S DVBAUDBY=$$GET1^DIQ(3996.9991,DVBIEN19,7,"I") ; Internal format
. . S:DVBAUDBY DVBAUDBY=$$NAME^XUSER(DVBAUDBY) ;... User's given name
. . D CENTER^DVBAUDPRT1("Audit turned on by: "_DVBAUDBY,2,IOM,1)
. . D CENTER^DVBAUDPRT1("Proposed ENTRY ACTION Modification",2,IOM,1)
. . S DVBMSG="Change from: "
. . W !!,$J(DVBMSG,DVBLENGTH),DVBENACTION("BEF")
. . ;
. . S DVBMSG="to: "
. . W !,$J(DVBMSG,DVBLENGTH),DVBENACTION("AFT"),!
. . ;
. . ; **2** Begin 10/15/2018
. . S DVBEXACTION("AFT")=DVBEXACTION("BEF") ; Initialized to prevent error
. . ; **2** End 10/15/2018
. . I DVBEXACTION("BEF")]"",DVBEXACTION("BEF")["D PTIME^DVBAUDOA" D ;
. . . D CENTER^DVBAUDPRT1("& Proposed EXIT ACTION Modification",1,IOM,1)
. . . S DVBEXACTION("AFT")=$$STRIPAUD^DVBAUDU2(DVBEXACTION("BEF"))
. . . S DVBMSG="Change from: "
. . . W !!,$J(DVBMSG,DVBLENGTH),DVBEXACTION("BEF")
. . . ;
. . . S DVBMSG="to: "
. . . W !,$J(DVBMSG,DVBLENGTH),DVBEXACTION("AFT"),!
. . ;
. . I DVBENACTION("BEF")=DVBENACTION("AFT") D Q ;
. . . W !
. . . D REVVIDEO^DVBAUDPRT1("ON")
. . . W !,"Note: The ENTRY ACTION is not compatible with this Delete Audit Cod"
. . . W !," utility, but is displayed in case you want to make note of th"
. . . W !," for cleaning it up manually later."
. . . D REVVIDEO^DVBAUDPRT1("OFF")
. . . D CONTINUE^DVBAUDPRT1(2,"R")
. . ;
. . N DVBIENEVENT,DVBASK,DVBEDITOK
. . D ASKEDIT(DVBIEN19,DVBENACTION("AFT"),DVBEXACTION("AFT")) Q:DVBQUIT!($G(DVBEDITOK)="N")
. . D ASKCLEAN($T(+0)) Q:DVBQUIT
. . Q:DVBASK'="Y" ; DVBRESPONSE must be YES to cleanup statistical summary
. . D USEROPT^DVBAUDDIK(DVBIEN19) ; Delete the OPTION subentry from #369.9992
. . D OPTSUM^DVBAUDDIK(DVBIEN19) ;. Delete the SUMMARY record from #396.9991
. . S DVBIENEVENT=0
. . F S DVBIENEVENT=$O(^DVB(396.999,"OPTION",DVBIEN19,DVBIENEVENT)) Q:'DVBIENEVENT D ;
. . . D DELEVENT^DVBAUDDIK(DVBIENEVENT)
. . S DVBCNT("CLEANUP")=DVBCNT("CLEANUP")+1
;
W ! ; If more than 1 option was presented, display statistics
I DVBCNT("PRE")>1 D ;
. W !,"Number of options presented for audit deletion.....: "
. W DVBCNT("PRE")
. W !,"Number of options where the AMIE audits were deleted.: "
. W DVBCNT("DEL")
. I DVBCNT("DEL")>0 D ;
. . W !,"For the options where AMIE audits were deleted, the number"
. . W !,"of Options where statistical cleansing took place..: "
. . W DVBCNT("CLEANUP")
. W !
;
W !,"Editing process completed."
;
D CONTINUE^DVBAUDPRT1(2,"R")
;
Q ; Quit DELAUDIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAUDOAD 7723 printed Sep 17, 2026@20:27:25 Page 2
DVBAUDOAD ;ALB/CP - Delete DVBA Audit Code from Option ; 10/15/18 1:35pm
+1 ;;2.7;AMIE;**256**;;Build 19
+2 ; Per VHA Directive 6402 this routine should not be modified
+3 ; YN^DICN ; IA #10000
+4 ; $$GET1^DIQ ; IA # 2056
+5 QUIT
+6 ;
ENTER ; Delete 'D AUDIT^DVBAUDOA' from the ENTRY ACTION of the select
+1 ;
+2 NEW DVBEDIT,DVBNAMSPC,DVBOPTION,DVBOPTYPE,DVBQUIT,DVBTARGET
+3 ;
PROMPT ; Prompt user
+1 ; ZEXCEPT: DUZ,IOF
+2 ;
+3 SET DVBOPTION="Delete Audit Code from Option"
+4 WRITE @IOF,!?1,"*** ",DVBOPTION," ***"
SET DVBQUIT=0
+5 ; Set in case deleting out of order options
SET DVBNAMSPC="*"
+6 ;
+7 ; Check DUZ(0) for '@'
DO PGMACCSS^DVBAUDU1($TEXT(+0),.DUZ)
if DVBQUIT
GOTO EXIT
+8 ;.. Get DVBEDIT
DO SELEDIT^DVBAUDDIR($TEXT(+0))
if DVBQUIT
GOTO EXIT
+9 DO MSGIGNOR^DVBAUDU1($TEXT(+0))
+10 ; Option TYPEs audited
DO SELTYPE^DVBAUDDIR($TEXT(+0))
if DVBQUIT
GOTO PROMPT
+11 ;
+12 ; Build DVBTARGET(OPTION,IEN)=TYPE for selected Options (DVBEDIT=1)
+13 IF DVBEDIT=1
DO OPTSIN^DVBAUDDIC($TEXT(+0),DVBEDIT,DVBOPTYPE)
+14 ; Start over, user may not want to Exit quite yet
if DVBQUIT
GOTO PROMPT
+15 ;
+16 ; If editing with Option NAMESPACE using WILDCARE * (DVBEDIT=2)
+17 ; OPTION prefix
IF DVBEDIT=2
DO SELWILD^DVBAUDU1(DVBEDIT)
if DVBQUIT
GOTO PROMPT
+18 ; Start over, user may not want to Exit quite yet
if DVBQUIT
GOTO PROMPT
START ;
+1 ; Build DVBTARGET array from OPTION file (#19) to stuff for DVBNAMSPC
+2 ;
IF DVBEDIT=2
Begin DoDot:1
+3 NEW DVBACTION
+4 ; Needed in OPTBUILD^DVBAUDU2 for messages
SET DVBACTION="DELETE"
+5 DO OPTBUILD^DVBAUDU2($TEXT(+0),DVBEDIT,DVBOPTYPE,DVBNAMSPC)
End DoDot:1
+6 ;
+7 ; DVBEDIT=3 Build DVBTARGET(OPTION,IEN)=TYPE from file (#19.2)
+8 ;
IF DVBEDIT=3
Begin DoDot:1
+9 DO BUILDOS^DVBAUDU2($TEXT(+0),DVBEDIT,DVBOPTYPE)
End DoDot:1
+10 ;
+11 ; Build DVBTARGET by Options OUT OF ORDER
+12 IF DVBEDIT=4
DO BUILDOOO^DVBAUDU1($TEXT(+0),DVBEDIT,DVBOPTYPE)
+13 ; Start over, user may not want to Exit quite yet
if DVBQUIT
GOTO PROMPT
+14 ;
+15 ; Delete processing for selected Option(s)
DO DELAUDIT
+16 ;
+17 GOTO PROMPT
+18 ;
EXIT ; Exit/Quit the deleting of 'D AUDIT^DVBAUDOA' from DVBTARGET options.
+1 ;
+2 ; Routine DVBAUDOAD
QUIT
+3 ;
ASKEDIT(DVBIEN19,DVBENACTAFT,DVBEXACTAFT) ; Prompt for ' OK to delete the DVB audit?"
+1 ;
+2 NEW @($$DICN^DVBAUDNEW1())
+3 ; ZEXCEPT: %,DVBCNT,DVBEDITOK,DVBQUIT
+4 ;
+5 ; Prompt for YES/NO or '^' DVBRESPONSE
+6 ;
+7 WRITE !," OK to delete the AMIE audit functionality"
+8 ; Default to 'NO' DVBRESPONSE
SET %=2
DO YN^DICN
+9 ;
+10 ; If USER enters '^'
IF %=-1
Begin DoDot:1
+11 ; User entered '^'
WRITE " <Editing aborted>",!
+12 ; Output variable to terminate processing
SET DVBQUIT=1
End DoDot:1
+13 ; User entered an '^'
if DVBQUIT
QUIT
+14 ;
+15 ; If USER enters NO
IF %=2
Begin DoDot:1
+16 ; Output variable
SET DVBEDITOK="NO"
End DoDot:1
+17 ;
+18 ; If user entered 'YES'
IF %=1
Begin DoDot:1
+19 NEW DVBENACTION,DVBEXACTION
+20 SET DVBENACTION("AFT")=DVBENACTAFT
+21 SET DVBEXACTION("AFT")=DVBEXACTAFT
+22 DO ENTRYACT^DVBAUDDIE(DVBIEN19,.DVBENACTION,.DVBEXACTION)
if DVBQUIT
QUIT
+23 WRITE " [Edit completed]"
+24 ; Number opts where an audit was deleted.
SET DVBCNT("DEL")=DVBCNT("DEL")+1
+25 ; Output variable
SET DVBEDITOK="YES"
End DoDot:1
+26 SET DVBQUIT=0
+27 ;Q:DVBQUIT ; Database server error was detected.
+28 ;
+29 ; Quit ASKEDIT
QUIT
+30 ;
ASKCLEAN(DVBRTN) ; Prompt for ' OK to edit the ENTRY ACTION?"
+1 ;
+2 NEW DVBCHOICE
+3 ; ZEXCEPT: DVBASK,DVBQUIT
+4 ;
+5 ; Default to continue to process Option selections.
SET DVBQUIT=0
+6 ;
+7 SET DVBCHOICE=" Can I clean-up the Option statistical summary information"
+8 SET DVBASK=$$ASKYESNO^DVBAUDASK1(DVBCHOICE,"NO")
+9 ; User wants to exit
IF DVBASK="^"
SET DVBQUIT=1
QUIT
+10 if DVBASK="N"
QUIT
+11 ;
+12 ;
+13 ; Quit ASKCLEAN
QUIT
+14 ;
DELAUDIT ; Present user with option/original ENTRY ACTION/new ENTRY ACTION
+1 ;
+2 NEW DVBCNT,DVBDASHES,DVBENACTION,DVBLENGTH,DVBMSG
+3 NEW DVBOPTNAME,DVBRESPONSE,DVBQUIT,DVBSPACES,DVBSUB
+4 ; ZEXCEPT: DVBIEN19,IOM,DVBEDIT,DVBNAMSPC,DVBQUIT,DVBTARGET
+5 ;
+6 ;
+7 FOR DVBSUB="PRE","DEL","CLEANUP"
SET DVBCNT(DVBSUB)=0
+8 ; Line of DVBDASHES ('-')
SET $PIECE(DVBDASHES,".",IOM+1)=""
+9 ; Line of DVBSPACES (' ')
SET $PIECE(DVBSPACES," ",IOM+1)=""
+10 ;
+11 ;
+12 SET (DVBOPTNAME,DVBQUIT)=0
+13 ;
FOR
SET DVBOPTNAME=$ORDER(DVBTARGET(DVBOPTNAME))
if (DVBOPTNAME="")!DVBQUIT
QUIT
Begin DoDot:1
+14 NEW DVBIEN19
+15 SET DVBIEN19=0
+16 ;
FOR
SET DVBIEN19=$ORDER(DVBTARGET(DVBOPTNAME,DVBIEN19))
if 'DVBIEN19!DVBQUIT
QUIT
Begin DoDot:2
+17 NEW DIERR,DVBENACTION,DVBEXACTION,DVBMSG,DVBOPT,DVBERRMSG
+18 DO OPTION^DVBAUDDIQ(DVBIEN19)
+19 ; Capture ENTRY ACTION
SET DVBENACTION("BEF")=DVBOPT("ENTRYACTION")
+20 SET DVBENACTION("AFT")=$$STRIPAUD^DVBAUDU2(DVBENACTION("BEF"))
+21 ;. Capture EXIT ACTION
SET DVBEXACTION("BEF")=DVBOPT("EXITACTION")
+22 ;
+23 ; Number of eligible options presented
SET DVBCNT("PRE")=DVBCNT("PRE")+1
+24 WRITE !!,$EXTRACT(DVBDASHES,1,68)
+25 ;
+26 SET DVBMSG=" Editing option "_DVBCNT("PRE")_": "
SET DVBLENGTH=$LENGTH(DVBMSG)
+27 ; DVBOPT. MENU TEXT
WRITE !!,$JUSTIFY(DVBMSG,DVBLENGTH),$$GET1^DIQ(19,DVBIEN19,1,"E",,"DVBERRMSG")
+28 DO DIERR^DVBAUDDILG1(60,5,"DVBERRMSG","DELAUDIT^"_$TEXT(+0))
if DVBQUIT
QUIT
+29 ;
+30 SET DVBMSG="["_DVBOPT("NAME")_"]"
+31 WRITE !,$EXTRACT(DVBSPACES,1,DVBLENGTH),DVBMSG
+32 WRITE !,$EXTRACT(DVBSPACES,1,DVBLENGTH),"TYPE: ",$$GET1^DIQ(19,DVBIEN19,4,"E",,"DVBERRMSG")
+33 DO DIERR^DVBAUDDILG1(60,5,"DVBERRMSG","DELAUDIT^"_$TEXT(+0))
if DVBQUIT
QUIT
+34 ;
+35 ;
IF DVBOPT("OOOMSG")]""
Begin DoDot:3
+36 ;
+37 SET DVBMSG="OUT OF ORDER MESSAGE: "
+38 WRITE !,$JUSTIFY(DVBMSG,DVBLENGTH),$EXTRACT(DVBOPT("OOOMSG"),1,IOM-$X)
End DoDot:3
+39 ;
+40 NEW DVBAUDBY
+41 ; Internal format
SET DVBAUDBY=$$GET1^DIQ(3996.9991,DVBIEN19,7,"I")
+42 ;... User's given name
if DVBAUDBY
SET DVBAUDBY=$$NAME^XUSER(DVBAUDBY)
+43 DO CENTER^DVBAUDPRT1("Audit turned on by: "_DVBAUDBY,2,IOM,1)
+44 DO CENTER^DVBAUDPRT1("Proposed ENTRY ACTION Modification",2,IOM,1)
+45 SET DVBMSG="Change from: "
+46 WRITE !!,$JUSTIFY(DVBMSG,DVBLENGTH),DVBENACTION("BEF")
+47 ;
+48 SET DVBMSG="to: "
+49 WRITE !,$JUSTIFY(DVBMSG,DVBLENGTH),DVBENACTION("AFT"),!
+50 ;
+51 ; **2** Begin 10/15/2018
+52 ; Initialized to prevent error
SET DVBEXACTION("AFT")=DVBEXACTION("BEF")
+53 ; **2** End 10/15/2018
+54 ;
IF DVBEXACTION("BEF")]""
IF DVBEXACTION("BEF")["D PTIME^DVBAUDOA"
Begin DoDot:3
+55 DO CENTER^DVBAUDPRT1("& Proposed EXIT ACTION Modification",1,IOM,1)
+56 SET DVBEXACTION("AFT")=$$STRIPAUD^DVBAUDU2(DVBEXACTION("BEF"))
+57 SET DVBMSG="Change from: "
+58 WRITE !!,$JUSTIFY(DVBMSG,DVBLENGTH),DVBEXACTION("BEF")
+59 ;
+60 SET DVBMSG="to: "
+61 WRITE !,$JUSTIFY(DVBMSG,DVBLENGTH),DVBEXACTION("AFT"),!
End DoDot:3
+62 ;
+63 ;
IF DVBENACTION("BEF")=DVBENACTION("AFT")
Begin DoDot:3
+64 WRITE !
+65 DO REVVIDEO^DVBAUDPRT1("ON")
+66 WRITE !,"Note: The ENTRY ACTION is not compatible with this Delete Audit Cod"
+67 WRITE !," utility, but is displayed in case you want to make note of th"
+68 WRITE !," for cleaning it up manually later."
+69 DO REVVIDEO^DVBAUDPRT1("OFF")
+70 DO CONTINUE^DVBAUDPRT1(2,"R")
End DoDot:3
QUIT
+71 ;
+72 NEW DVBIENEVENT,DVBASK,DVBEDITOK
+73 DO ASKEDIT(DVBIEN19,DVBENACTION("AFT"),DVBEXACTION("AFT"))
if DVBQUIT!($GET(DVBEDITOK)="N")
QUIT
+74 DO ASKCLEAN($TEXT(+0))
if DVBQUIT
QUIT
+75 ; DVBRESPONSE must be YES to cleanup statistical summary
if DVBASK'="Y"
QUIT
+76 ; Delete the OPTION subentry from #369.9992
DO USEROPT^DVBAUDDIK(DVBIEN19)
+77 ;. Delete the SUMMARY record from #396.9991
DO OPTSUM^DVBAUDDIK(DVBIEN19)
+78 SET DVBIENEVENT=0
+79 ;
FOR
SET DVBIENEVENT=$ORDER(^DVB(396.999,"OPTION",DVBIEN19,DVBIENEVENT))
if 'DVBIENEVENT
QUIT
Begin DoDot:3
+80 DO DELEVENT^DVBAUDDIK(DVBIENEVENT)
End DoDot:3
+81 SET DVBCNT("CLEANUP")=DVBCNT("CLEANUP")+1
End DoDot:2
End DoDot:1
+82 ;
+83 ; If more than 1 option was presented, display statistics
WRITE !
+84 ;
IF DVBCNT("PRE")>1
Begin DoDot:1
+85 WRITE !,"Number of options presented for audit deletion.....: "
+86 WRITE DVBCNT("PRE")
+87 WRITE !,"Number of options where the AMIE audits were deleted.: "
+88 WRITE DVBCNT("DEL")
+89 ;
IF DVBCNT("DEL")>0
Begin DoDot:2
+90 WRITE !,"For the options where AMIE audits were deleted, the number"
+91 WRITE !,"of Options where statistical cleansing took place..: "
+92 WRITE DVBCNT("CLEANUP")
End DoDot:2
+93 WRITE !
End DoDot:1
+94 ;
+95 WRITE !,"Editing process completed."
+96 ;
+97 DO CONTINUE^DVBAUDPRT1(2,"R")
+98 ;
+99 ; Quit DELAUDIT
QUIT