EAS126 ;ALB/PHH - EAS*1*26 POST-INSTALL ;05-27-2003
;;1.0;ENROLLMENT APPLICATION SYSTEM;**26**;MAR 15,2001
Q
EN ; Entry point for post-install
D FIXOPT,START
Q
RESET ; Reset the data for the cleanup process
K ^XTMP($$NAMESPC)
Q
TEST ; Simulate Live Run
N MODE
S MODE=0
START ; Start Processor
N NAMESPC,QTIME
S NAMESPC=$$NAMESPC
Q:$$RUNCHK(NAMESPC) ; Quit if already running or has run to completion
Q:$$QTIME(.QTIME)
S:$D(^XTMP(NAMESPC,"CONFIG","RUN MODE")) MODE=^XTMP(NAMESPC,"CONFIG","RUN MODE")
S:'$D(^XTMP(NAMESPC,"CONFIG","RUN MODE")) ^XTMP(NAMESPC,"CONFIG","RUN MODE")=$S($G(MODE)=0:0,1:1)
S ^XTMP(NAMESPC,"CONFIG","USER")=$S($G(DUZ)'="":DUZ,1:"UNKNOWN")
S:'$$QUEUE(QTIME) ^XTMP(NAMESPC,"CONFIG","RUNNING")=""
Q
NAMESPC() ; API returns the name space for this patch
Q "EAS26"
RUNCHK(NAMESPC) ; Check to see if clean up is already running
Q:NAMESPC="" 1 ; Name Space must be defined
Q:$D(^XTMP(NAMESPC,"CONFIG","RUNNING")) 1
Q:$D(^XTMP(NAMESPC,"CONFIG","COMPLETE")) 1
Q 0
QTIME(WHEN) ; Get the run time for queuing
N %,%H,%I,X
D NOW^%DTC
S WHEN=$P(%,".")_"."_$E($P(%,".",2),1,4)
Q 0
QUEUE(ZTDTH) ; Queue the process
N NAMESPC,QUEERR,ZTDESC,ZTRTN,ZTSK
S NAMESPC=$$NAMESPC
S QUEERR=0
S ZTRTN="CLEAN^EAS1"_$P(NAMESPC,"EAS",2)
S ZTDESC=NAMESPC_" - Patient Merge Cleanup Process"
S ZTIO=""
D ^%ZTLOAD
K ^XTMP(NAMESPC,"CONFIG","ZTSK")
I '$D(ZTSK) S ^XTMP(NAMESPC,"CONFIG","ZTSK")="Unable to queue post-install process.",QUEERR=1
I $D(ZTSK) S ^XTMP(NAMESPC,"CONFIG","ZTSK")="Post-install queued. Task ID: "_$G(ZTSK)
D HOME^%ZIS
Q QUEERR
CLEAN ; Actual cleanup process
N NAMESPC,MODE,USER,TASKID,%,%H,%I,X,X1,X2,CHKCNT,TMSWT,TOTPR12,DGPR12
S NAMESPC=$$NAMESPC
K ^XTMP(NAMESPC,"CONFIG","ABORT TIME")
S MODE=$G(^XTMP(NAMESPC,"CONFIG","RUN MODE"),0)
S USER=$G(^XTMP(NAMESPC,"CONFIG","USER"),"UNKNOWN")
S TASKID=$G(^XTMP(NAMESPC,"CONFIG","ZTSK"),"UNKNOWN")
;
I '$D(^XTMP(NAMESPC,0)) D
.K ^XTMP(NAMESPC)
.S ^XTMP(NAMESPC,"CONFIG","DGPR12")=0
.S ^XTMP(NAMESPC,"CONFIG","TOTPR")=0
.S ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=0
.S ^XTMP(NAMESPC,"CONFIG","RUN MODE")=MODE
.S ^XTMP(NAMESPC,"CONFIG","USER")=USER
.S ^XTMP(NAMESPC,"CONFIG","ZTSK")=TASKID
.D NOW^%DTC
.S ^XTMP(NAMESPC,"CONFIG","START TIME")=%
.S X1=$$DT^XLFDT,X2=90
.D C^%DTC
.S ^XTMP(NAMESPC,0)=X_U_$$DT^XLFDT_U_NAMESPC_" - PATIENT MERGE CLEANUP"
;
S CHKCNT=250,(ZTSTOP,TMSWT)=0,TOTPR12=+$P($G(^DGPR(408.12,0)),"^",4)
S DGPR12=$G(^XTMP(NAMESPC,"CONFIG","DGPR12"))
F S DGPR12=$O(^DGPR(408.12,DGPR12)) Q:'DGPR12!(TMSWT) D
.D PROC(DGPR12)
.S ^XTMP(NAMESPC,"CONFIG","TOTPR")=$G(^XTMP(NAMESPC,"CONFIG","TOTPR"))+1
.S ^XTMP(NAMESPC,"CONFIG","DGPR12")=DGPR12
.I TOTPR12 D
..S ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=+$G(^XTMP(NAMESPC,"CONFIG","TOTPR"))/TOTPR12
..S ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=+$P((^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")*100),".")
.I +$G(^XTMP(NAMESPC,"CONFIG","TOTPR"))#CHKCNT=0 D
..S TMSWT=$$STOPIT()
..I TMSWT D
...S ZTSTOP=1
...N %,%H,%I,X
...D NOW^%DTC
...S ^XTMP(NAMESPC,"CONFIG","ABORT TIME")=%
...D ABORTMSG
;
I 'DGPR12,'TMSWT D
.N %,%H,%I,X
.D NOW^%DTC
.S ^XTMP(NAMESPC,"CONFIG","COMPLETE")=%
.S ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=100
.D DONEMSG
;
K ^XTMP(NAMESPC,"CONFIG","RUNNING")
Q
PROC(DGPR12) ; Process the DGPR12
N NAMESPC,NODE0,DFN,PERSON,DATA,DIE,DA,DR,X
S NAMESPC=$$NAMESPC()
S NODE0=$G(^DGPR(408.12,DGPR12,0))
Q:NODE0=""
S DFN=$P(NODE0,"^")
Q:DFN=""
S PERSON=$P(NODE0,"^",3)
I PERSON'="",PERSON["DPT",DFN=$P(PERSON,";"),'$D(^DGPR(408.12,"C",PERSON,DGPR12)) D
.S DATA(.03)=$$GET1^DIQ(408.12,DGPR12_",",.01,"I")_";DPT("
.S DIE="^DGPR(408.12,",DA=DGPR12,DR=".03////^S X=DATA(.03)"
.D:MODE ^DIE
.S ^XTMP(NAMESPC,"CONFIG","ANOMALY")=$G(^XTMP(NAMESPC,"CONFIG","ANOMALY"))+1
.S ^XTMP(NAMESPC,"DATA",DGPR12)=""
Q
STOPIT() ; Checks if user requested task to stop
N X,STOPIT
S STOPIT=0
S X=$$S^%ZTLOAD
I X D ;
.S STOPIT=1
.I $G(ZTSK) S ZTSTOP=1
Q STOPIT
ABORTMSG ; Send the user aborted message:
N NAMESPC,NAMESPCN,TMP,XMY,XMDUZ,XMTEXT,XMSUB
S NAMESPC=$$NAMESPC
S NAMESPCN=$P(NAMESPC,"EAS",2)
S XMY(DUZ)="",XMDUZ="DG PACKAGE",XMTEXT="TMP("_NAMESPCN_","
S XMSUB="EAS*1.0*"_NAMESPCN_": PATIENT MERGE CLEANUP - PROCESS STOPPED BY USER"
S TMP(NAMESPCN,1)="CLEANUP PROCESSING"
S TMP(NAMESPCN,2)="------------------"
S TMP(NAMESPCN,3)=""
S TMP(NAMESPCN,4)="The cleanup process was aborted prematurely. Here is the current status:"
S TMP(NAMESPCN,5)=""
S TMP(NAMESPCN,6)=" Start Date/Time: "_$$FMTE^XLFDT(+$G(^XTMP(NAMESPC,"CONFIG","START TIME")),"P")
S TMP(NAMESPCN,7)=" End Date/Time: "_$$FMTE^XLFDT(+$G(^XTMP(NAMESPC,"CONFIG","ABORT TIME")),"P")
S TMP(NAMESPCN,8)=""
S TMP(NAMESPCN,9)="Current Counts: "
S TMP(NAMESPCN,10)=" Total Patient Records Processed: "_+$G(^XTMP(NAMESPC,"CONFIG","TOTPR"))
S TMP(NAMESPCN,11)=" Total Anomalies Corrected: "_+$G(^XTMP(NAMESPC,"CONFIG","ANOMALY"))
S TMP(NAMESPCN,12)=" Percentage Completed: "_+$G(^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE"))_"%"
S TMP(NAMESPCN,13)=""
S TMP(NAMESPCN,14)=""
D ^XMD
Q
DONEMSG ; Send the user done message:
N NAMESPC,NAMESPCN,TMP,XMY,XMDUZ,XMTEXT,XMSUB
S NAMESPC=$$NAMESPC
S NAMESPCN=$P(NAMESPC,"EAS",2)
S XMY(DUZ)="",XMDUZ="DG PACKAGE",XMTEXT="TMP("_NAMESPCN_","
S XMSUB="EAS*1.0*"_NAMESPCN_": PATIENT MERGE CLEANUP - SUMMARY REPORT"
S TMP(NAMESPCN,1)="CLEANUP PROCESSING"
S TMP(NAMESPCN,2)="------------------"
S TMP(NAMESPCN,3)=""
S TMP(NAMESPCN,4)="The cleanup has run to completion. Here are the results:"
S TMP(NAMESPCN,5)=""
S TMP(NAMESPCN,6)=" Start Date/Time: "_$$FMTE^XLFDT(+$G(^XTMP(NAMESPC,"CONFIG","START TIME")),"P")
S TMP(NAMESPCN,7)=" End Date/Time: "_$$FMTE^XLFDT(+$G(^XTMP(NAMESPC,"CONFIG","COMPLETE")),"P")
S TMP(NAMESPCN,8)=""
S TMP(NAMESPCN,9)="Current Counts: "
S TMP(NAMESPCN,10)=" Total Patient Records Processed: "_+$G(^XTMP(NAMESPC,"CONFIG","TOTPR"))
S TMP(NAMESPCN,11)=" Total Anomalies Corrected: "_+$G(^XTMP(NAMESPC,"CONFIG","ANOMALY"))
S TMP(NAMESPCN,12)=" Percentage Completed: 100%"
S TMP(NAMESPCN,13)=""
S TMP(NAMESPCN,14)=""
D ^XMD
Q
FIXOPT ; Fix 'EAS MT 30 DAY LETTER PRINT' option
N OPTNAME,OPTIEN,DIE,DA,DR,X
S OPTNAME="EAS MT 30 DAY LETTER PRINT"
Q:'$D(^DIC(19,"B",OPTNAME))
S OPTIEN=0
F S OPTIEN=$O(^DIC(19,"B",OPTNAME,OPTIEN)) Q:'OPTIEN D
.S DIE="^DIC(19,",DA=OPTIEN,DR="25///^S X=""@"""
.D ^DIE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEAS126 6639 printed Dec 13, 2024@01:53:24 Page 2
EAS126 ;ALB/PHH - EAS*1*26 POST-INSTALL ;05-27-2003
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**26**;MAR 15,2001
+2 QUIT
EN ; Entry point for post-install
+1 DO FIXOPT
DO START
+2 QUIT
RESET ; Reset the data for the cleanup process
+1 KILL ^XTMP($$NAMESPC)
+2 QUIT
TEST ; Simulate Live Run
+1 NEW MODE
+2 SET MODE=0
START ; Start Processor
+1 NEW NAMESPC,QTIME
+2 SET NAMESPC=$$NAMESPC
+3 ; Quit if already running or has run to completion
if $$RUNCHK(NAMESPC)
QUIT
+4 if $$QTIME(.QTIME)
QUIT
+5 if $DATA(^XTMP(NAMESPC,"CONFIG","RUN MODE"))
SET MODE=^XTMP(NAMESPC,"CONFIG","RUN MODE")
+6 if '$DATA(^XTMP(NAMESPC,"CONFIG","RUN MODE"))
SET ^XTMP(NAMESPC,"CONFIG","RUN MODE")=$SELECT($GET(MODE)=0:0,1:1)
+7 SET ^XTMP(NAMESPC,"CONFIG","USER")=$SELECT($GET(DUZ)'="":DUZ,1:"UNKNOWN")
+8 if '$$QUEUE(QTIME)
SET ^XTMP(NAMESPC,"CONFIG","RUNNING")=""
+9 QUIT
NAMESPC() ; API returns the name space for this patch
+1 QUIT "EAS26"
RUNCHK(NAMESPC) ; Check to see if clean up is already running
+1 ; Name Space must be defined
if NAMESPC=""
QUIT 1
+2 if $DATA(^XTMP(NAMESPC,"CONFIG","RUNNING"))
QUIT 1
+3 if $DATA(^XTMP(NAMESPC,"CONFIG","COMPLETE"))
QUIT 1
+4 QUIT 0
QTIME(WHEN) ; Get the run time for queuing
+1 NEW %,%H,%I,X
+2 DO NOW^%DTC
+3 SET WHEN=$PIECE(%,".")_"."_$EXTRACT($PIECE(%,".",2),1,4)
+4 QUIT 0
QUEUE(ZTDTH) ; Queue the process
+1 NEW NAMESPC,QUEERR,ZTDESC,ZTRTN,ZTSK
+2 SET NAMESPC=$$NAMESPC
+3 SET QUEERR=0
+4 SET ZTRTN="CLEAN^EAS1"_$PIECE(NAMESPC,"EAS",2)
+5 SET ZTDESC=NAMESPC_" - Patient Merge Cleanup Process"
+6 SET ZTIO=""
+7 DO ^%ZTLOAD
+8 KILL ^XTMP(NAMESPC,"CONFIG","ZTSK")
+9 IF '$DATA(ZTSK)
SET ^XTMP(NAMESPC,"CONFIG","ZTSK")="Unable to queue post-install process."
SET QUEERR=1
+10 IF $DATA(ZTSK)
SET ^XTMP(NAMESPC,"CONFIG","ZTSK")="Post-install queued. Task ID: "_$GET(ZTSK)
+11 DO HOME^%ZIS
+12 QUIT QUEERR
CLEAN ; Actual cleanup process
+1 NEW NAMESPC,MODE,USER,TASKID,%,%H,%I,X,X1,X2,CHKCNT,TMSWT,TOTPR12,DGPR12
+2 SET NAMESPC=$$NAMESPC
+3 KILL ^XTMP(NAMESPC,"CONFIG","ABORT TIME")
+4 SET MODE=$GET(^XTMP(NAMESPC,"CONFIG","RUN MODE"),0)
+5 SET USER=$GET(^XTMP(NAMESPC,"CONFIG","USER"),"UNKNOWN")
+6 SET TASKID=$GET(^XTMP(NAMESPC,"CONFIG","ZTSK"),"UNKNOWN")
+7 ;
+8 IF '$DATA(^XTMP(NAMESPC,0))
Begin DoDot:1
+9 KILL ^XTMP(NAMESPC)
+10 SET ^XTMP(NAMESPC,"CONFIG","DGPR12")=0
+11 SET ^XTMP(NAMESPC,"CONFIG","TOTPR")=0
+12 SET ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=0
+13 SET ^XTMP(NAMESPC,"CONFIG","RUN MODE")=MODE
+14 SET ^XTMP(NAMESPC,"CONFIG","USER")=USER
+15 SET ^XTMP(NAMESPC,"CONFIG","ZTSK")=TASKID
+16 DO NOW^%DTC
+17 SET ^XTMP(NAMESPC,"CONFIG","START TIME")=%
+18 SET X1=$$DT^XLFDT
SET X2=90
+19 DO C^%DTC
+20 SET ^XTMP(NAMESPC,0)=X_U_$$DT^XLFDT_U_NAMESPC_" - PATIENT MERGE CLEANUP"
End DoDot:1
+21 ;
+22 SET CHKCNT=250
SET (ZTSTOP,TMSWT)=0
SET TOTPR12=+$PIECE($GET(^DGPR(408.12,0)),"^",4)
+23 SET DGPR12=$GET(^XTMP(NAMESPC,"CONFIG","DGPR12"))
+24 FOR
SET DGPR12=$ORDER(^DGPR(408.12,DGPR12))
if 'DGPR12!(TMSWT)
QUIT
Begin DoDot:1
+25 DO PROC(DGPR12)
+26 SET ^XTMP(NAMESPC,"CONFIG","TOTPR")=$GET(^XTMP(NAMESPC,"CONFIG","TOTPR"))+1
+27 SET ^XTMP(NAMESPC,"CONFIG","DGPR12")=DGPR12
+28 IF TOTPR12
Begin DoDot:2
+29 SET ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=+$GET(^XTMP(NAMESPC,"CONFIG","TOTPR"))/TOTPR12
+30 SET ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=+$PIECE((^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")*100),".")
End DoDot:2
+31 IF +$GET(^XTMP(NAMESPC,"CONFIG","TOTPR"))#CHKCNT=0
Begin DoDot:2
+32 SET TMSWT=$$STOPIT()
+33 IF TMSWT
Begin DoDot:3
+34 SET ZTSTOP=1
+35 NEW %,%H,%I,X
+36 DO NOW^%DTC
+37 SET ^XTMP(NAMESPC,"CONFIG","ABORT TIME")=%
+38 DO ABORTMSG
End DoDot:3
End DoDot:2
End DoDot:1
+39 ;
+40 IF 'DGPR12
IF 'TMSWT
Begin DoDot:1
+41 NEW %,%H,%I,X
+42 DO NOW^%DTC
+43 SET ^XTMP(NAMESPC,"CONFIG","COMPLETE")=%
+44 SET ^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE")=100
+45 DO DONEMSG
End DoDot:1
+46 ;
+47 KILL ^XTMP(NAMESPC,"CONFIG","RUNNING")
+48 QUIT
PROC(DGPR12) ; Process the DGPR12
+1 NEW NAMESPC,NODE0,DFN,PERSON,DATA,DIE,DA,DR,X
+2 SET NAMESPC=$$NAMESPC()
+3 SET NODE0=$GET(^DGPR(408.12,DGPR12,0))
+4 if NODE0=""
QUIT
+5 SET DFN=$PIECE(NODE0,"^")
+6 if DFN=""
QUIT
+7 SET PERSON=$PIECE(NODE0,"^",3)
+8 IF PERSON'=""
IF PERSON["DPT"
IF DFN=$PIECE(PERSON,";")
IF '$DATA(^DGPR(408.12,"C",PERSON,DGPR12))
Begin DoDot:1
+9 SET DATA(.03)=$$GET1^DIQ(408.12,DGPR12_",",.01,"I")_";DPT("
+10 SET DIE="^DGPR(408.12,"
SET DA=DGPR12
SET DR=".03////^S X=DATA(.03)"
+11 if MODE
DO ^DIE
+12 SET ^XTMP(NAMESPC,"CONFIG","ANOMALY")=$GET(^XTMP(NAMESPC,"CONFIG","ANOMALY"))+1
+13 SET ^XTMP(NAMESPC,"DATA",DGPR12)=""
End DoDot:1
+14 QUIT
STOPIT() ; Checks if user requested task to stop
+1 NEW X,STOPIT
+2 SET STOPIT=0
+3 SET X=$$S^%ZTLOAD
+4 ;
IF X
Begin DoDot:1
+5 SET STOPIT=1
+6 IF $GET(ZTSK)
SET ZTSTOP=1
End DoDot:1
+7 QUIT STOPIT
ABORTMSG ; Send the user aborted message:
+1 NEW NAMESPC,NAMESPCN,TMP,XMY,XMDUZ,XMTEXT,XMSUB
+2 SET NAMESPC=$$NAMESPC
+3 SET NAMESPCN=$PIECE(NAMESPC,"EAS",2)
+4 SET XMY(DUZ)=""
SET XMDUZ="DG PACKAGE"
SET XMTEXT="TMP("_NAMESPCN_","
+5 SET XMSUB="EAS*1.0*"_NAMESPCN_": PATIENT MERGE CLEANUP - PROCESS STOPPED BY USER"
+6 SET TMP(NAMESPCN,1)="CLEANUP PROCESSING"
+7 SET TMP(NAMESPCN,2)="------------------"
+8 SET TMP(NAMESPCN,3)=""
+9 SET TMP(NAMESPCN,4)="The cleanup process was aborted prematurely. Here is the current status:"
+10 SET TMP(NAMESPCN,5)=""
+11 SET TMP(NAMESPCN,6)=" Start Date/Time: "_$$FMTE^XLFDT(+$GET(^XTMP(NAMESPC,"CONFIG","START TIME")),"P")
+12 SET TMP(NAMESPCN,7)=" End Date/Time: "_$$FMTE^XLFDT(+$GET(^XTMP(NAMESPC,"CONFIG","ABORT TIME")),"P")
+13 SET TMP(NAMESPCN,8)=""
+14 SET TMP(NAMESPCN,9)="Current Counts: "
+15 SET TMP(NAMESPCN,10)=" Total Patient Records Processed: "_+$GET(^XTMP(NAMESPC,"CONFIG","TOTPR"))
+16 SET TMP(NAMESPCN,11)=" Total Anomalies Corrected: "_+$GET(^XTMP(NAMESPC,"CONFIG","ANOMALY"))
+17 SET TMP(NAMESPCN,12)=" Percentage Completed: "_+$GET(^XTMP(NAMESPC,"CONFIG","PERCENT COMPLETE"))_"%"
+18 SET TMP(NAMESPCN,13)=""
+19 SET TMP(NAMESPCN,14)=""
+20 DO ^XMD
+21 QUIT
DONEMSG ; Send the user done message:
+1 NEW NAMESPC,NAMESPCN,TMP,XMY,XMDUZ,XMTEXT,XMSUB
+2 SET NAMESPC=$$NAMESPC
+3 SET NAMESPCN=$PIECE(NAMESPC,"EAS",2)
+4 SET XMY(DUZ)=""
SET XMDUZ="DG PACKAGE"
SET XMTEXT="TMP("_NAMESPCN_","
+5 SET XMSUB="EAS*1.0*"_NAMESPCN_": PATIENT MERGE CLEANUP - SUMMARY REPORT"
+6 SET TMP(NAMESPCN,1)="CLEANUP PROCESSING"
+7 SET TMP(NAMESPCN,2)="------------------"
+8 SET TMP(NAMESPCN,3)=""
+9 SET TMP(NAMESPCN,4)="The cleanup has run to completion. Here are the results:"
+10 SET TMP(NAMESPCN,5)=""
+11 SET TMP(NAMESPCN,6)=" Start Date/Time: "_$$FMTE^XLFDT(+$GET(^XTMP(NAMESPC,"CONFIG","START TIME")),"P")
+12 SET TMP(NAMESPCN,7)=" End Date/Time: "_$$FMTE^XLFDT(+$GET(^XTMP(NAMESPC,"CONFIG","COMPLETE")),"P")
+13 SET TMP(NAMESPCN,8)=""
+14 SET TMP(NAMESPCN,9)="Current Counts: "
+15 SET TMP(NAMESPCN,10)=" Total Patient Records Processed: "_+$GET(^XTMP(NAMESPC,"CONFIG","TOTPR"))
+16 SET TMP(NAMESPCN,11)=" Total Anomalies Corrected: "_+$GET(^XTMP(NAMESPC,"CONFIG","ANOMALY"))
+17 SET TMP(NAMESPCN,12)=" Percentage Completed: 100%"
+18 SET TMP(NAMESPCN,13)=""
+19 SET TMP(NAMESPCN,14)=""
+20 DO ^XMD
+21 QUIT
FIXOPT ; Fix 'EAS MT 30 DAY LETTER PRINT' option
+1 NEW OPTNAME,OPTIEN,DIE,DA,DR,X
+2 SET OPTNAME="EAS MT 30 DAY LETTER PRINT"
+3 if '$DATA(^DIC(19,"B",OPTNAME))
QUIT
+4 SET OPTIEN=0
+5 FOR
SET OPTIEN=$ORDER(^DIC(19,"B",OPTNAME,OPTIEN))
if 'OPTIEN
QUIT
Begin DoDot:1
+6 SET DIE="^DIC(19,"
SET DA=OPTIEN
SET DR="25///^S X=""@"""
+7 DO ^DIE
End DoDot:1
+8 QUIT