RAIPS160 ;HISC/GJC-postinit 160 ; Aug 18, 2020@09:28:10
;;5.0;Radiology/Nuclear Medicine;**160**;Mar 16, 1998;Build 4
;
;Routine File IA Type
;----------------------------------------------
;%ZTLOAD 10063 (S)
;FIND^DIC 2051 (S)
;FILE^DIE 2053 (S)
;UPDATE^DIE 2053 (S)
;ENALL^DIK 10013 (S)
;$$NOW^XLFDT 10103 (S)
;$$FMADD^XLFDT 10103 (S)
;$$FMTH^XLFDT 10103 (S)
;$$NEWCP^XPDUTL 10141 (S)
;BMES^XPDUTL 10141 (S)
;DUZ^XUP 1429 (C)
;
N RACHX1 S RACHX1=$$NEWCP^XPDUTL("POST1","EN1^RAIPS160")
N RACHX2 S RACHX2=$$NEWCP^XPDUTL("POST2","EN2^RAIPS160")
N RACHX3 S RACHX3=$$NEWCP^XPDUTL("POST3","EN3^RAIPS160")
Q
;
; Note: EN1 has a hour ead start on EN2; EN2
; has an hour head start on EN3
;
EN1 ;Fix the ^RADPT(,"DT",0) if necessary for every
;patient in the RAD/NUC MED PATIENT (#70) file.
N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
S ZTIO="",RATXT(1)="",ZTRTN="TSK1^RAIPS160"
S (ZTDESC,RATXT(2))="RA160: Fix the ^RADPT(,""DT"",0) node if necessary 1 of 3"
S ZTDTH=$$NOW^XLFDT() ;get this task started immediately.
D ^%ZTLOAD S RATXT(3)="Task: "_$S($G(ZTSK)>0:ZTSK,1:"in error")
D BMES^XPDUTL(.RATXT)
Q
;
TSK1 ;Rebuild the REGISTERED EXAM sub-file zero node.
;Example: ^RADPT(7168771.8995,"DT",0)="^70.02DA^7138969.9057^"
;Note: rebuilding the "AR" & "B" xrefs (70.02;.01) will fully
;build out ^RADPT(RADFN,"DT",0) w/4th piece
N RADD,RADFN,RADTI S RADD="70.02DA",RADFN=0
F S RADFN=$O(^RADPT(RADFN)) Q:'RADFN D
.Q:($D(^RADPT(RADFN,"DT",0))#2)>0 ; (1) node exists
.; ^RADPT(RADFN,"DT",0) is missing
.; Get the earliest/only exam date
.; (RADTI) for this patient.
.S RADTI=$O(^RADPT(RADFN,"DT",$C(32)),-1)
.S:RADTI>0 ^RADPT(RADFN,"DT",0)=U_RADD_U_RADTI_U
.Q
Q
;
;-------------------------------------------------------------------------------------
;
EN2 ;reindex the "AR" & "B" xrefs on the EXAM DATE (#70.02) .01 field.
N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
S ZTIO="",RATXT(1)="",ZTRTN="TSK2^RAIPS160"
S (ZTDESC,RATXT(2))="RA160: reindex ""AR"" & ""B"" xrefs on EXAM DATE 2 of 3"
S ZTDTH=$$QDT(0,1) ;queue task one hour into the future
D ^%ZTLOAD S RATXT(3)="Task: "_$S($G(ZTSK)>0:ZTSK,1:"in error")
D BMES^XPDUTL(.RATXT)
Q
;
TSK2 ;reindex the "AR" & "B" cross reference on the EXAM DATE (#70.02)
;.01 field.
N DA,DIC,DIK,RADFN,X
K ^RADPT("AR") ;kill the file wide "AR" index
S RADFN=0
F S RADFN=$O(^RADPT(RADFN)) Q:RADFN'>0 D
.S DIK="^RADPT("_RADFN_",""DT"","
.S DIK(1)=".01^AR^B",DA(1)=RADFN
.K ^RADPT(DA(1),"DT","B") ;kill all patient level "B" indexes.
.D ENALL^DIK K DA,DIC,DIK,X
.Q
Q
;
;-------------------------------------------------------------------------------------
;
EN3 ;mass override to complete from the beginning
;of time to 12/31/2008@23.59 (for live systems post release)
N RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
S ZTIO="",RATXT(1)="",ZTRTN="TSK3^RAIPS160"
S (ZTDESC,RATXT(2))="RA160: complete all studies/orders up to 12/31/2008@23.59 3 of 3"
S ZTDTH=$$QDT(0,2) ;queue two hours into the future
D ^%ZTLOAD S RATXT(3)="Task: "_$S($G(ZTSK)>0:ZTSK,1:"in error")
D BMES^XPDUTL(.RATXT)
Q
;
TSK3 ;mass override to complete from the beginning
;of time to 12/31/2008@23.59
;
S RAARX=$NA(^RADPT("AR")),(RADTE,RASTOP)=0,RAEND=3081231.2359
S RASAVDR="[RA OVERRIDE]" ;RASAVDR iS checked in RAORDU (bypass PCE)
;-------------------------------------------
;set DUZ to the value of POSTMASTER
N RADUZ160 S RADUZ160=DUZ D DUZ^XUP(.5)
;-------------------------------------------
F S RADTE=$O(@RAARX@(RADTE)) Q:RADTE'>0 Q:RADTE>RAEND D Q:RASTOP
.S RADFN=0
.F S RADFN=$O(@RAARX@(RADTE,RADFN)) Q:RADFN'>0 D Q:RASTOP
..S RADTI=0
..F S RADTI=$O(@RAARX@(RADTE,RADFN,RADTI)) Q:RADTI'>0 D Q:RASTOP
...S RAY2=$G(^RADPT(RADFN,"DT",RADTI,0))
...S RAITYP=+$P(RAY2,U,2) ;type of imaging
...S RAITYPE=$P($G(^RA(79.2,RAITYP,0)),U)
...Q:RAITYPE="" ;cannot proceed w/bad data
...S RACMP=$O(^RA(72,"AA",RAITYPE,9,0))
...; quit if RACMP does not exist w/order # 9
...Q:RACMP'>0 S RACNI=0
...F S RACNI=$O(^RADPT(RADFN,"DT",RADTI,"P",RACNI)) Q:RACNI'>0 D Q:RASTOP
....S RAY3=$G(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0))
....Q:$$ACTIVE(+$P(RAY3,U,3))=0
....; // ** check if user asked to stop the task ** //
....I $$S^%ZTLOAD("RA*5.0*160: stopped by user.") S (RASTOP,ZTSTOP)=1
....; // ** check if user asked to stop the task ** //
....S RAIENS=RACNI_","_RADTI_","_RADFN_","
....S RAFDA(70.03,RAIENS,3)=RACMP
....L +^RADPT(RADFN,"DT",RADTI,"P",RACNI):3
....Q:$TEST=0 ;failed don't update xam status, xam logs or order request status
....D FILE^DIE("","RAFDA") ;internal - do not execute input transform
....D RA7005(RAIENS) ; (#75) EXAM STATUS TIMES
....D RA7007(RAIENS) ; (#100) ACTIVITY LOG
....L -^RADPT(RADFN,"DT",RADTI,"P",RACNI) ;release lock
....; update the radiology/CPRS orders if applicable to 'complete'
....D RA751
....Q
...Q
..Q
.Q
;----------------------------------
;set DUZ back to its original value
D DUZ^XUP(RADUZ160)
;----------------------------------
D XIT
Q
;
;-------------------------------------------------------------------------------------
;
ACTIVE(Y) ; is the study canceled or complete?
; input Y: ptr to file 72
; return: 0 if canceled or complete; else 1
N RAX,X S RAX=$G(^RA(72,Y,0))
S X=$P(RAX,U,3)
;X="" returns 0; X=0 or x=9 returns 0
;else returns a number between 1 and 8
Q (X#9)
;
RA7005(RAY) ; (#75) EXAM STATUS TIMES
;input: RAY = RACNI_","_RADTI_","_RADFN_","
N RAFDA,RAR
S RAR=$NA(RAFDA(70.05,"+1,"_RAY)) ;RAFDA root
;.01 - option to be scheduled
S @RAR@(.01)=$E($$NOW^XLFDT(),1,12)
S @RAR@(2)=RACMP ;complete by i-type
S @RAR@(3)=.5 ;postmaster (should be)
D UPDATE^DIE("","RAFDA")
Q
;
RA7007(RAY) ; (#100) ACTIVITY LOG
;input: RAY = RACNI_","_RADTI_","_RADFN_","
N RAFDA,RAR
S RAR=$NA(RAFDA(70.07,"+1,"_RAY)) ;RAFDA root
;.01 - option to be scheduled
S @RAR@(.01)=$E($$NOW^XLFDT(),1,12)
S @RAR@(2)="O" ; COMPLETE STATUS OVERRIDE
S @RAR@(3)=.5 ;postmaster (should be)
S @RAR@(4)="RA*5.0*160: mass override" ;Tech Comment...
S @RAR@(5)=1 ;indicates record overriden by P160
D UPDATE^DIE("","RAFDA")
Q
;
RA751 ;update the radiology and CPRS orders to 'complete'
;required vars: RAY3, RADFN, RADTI & RACNI (all exist
; when tag: RA751 is called.)
;
; RAOSTS, RAOIFN, RAOIFN(0) & DUZ
; (are set within RA751)
;
N RAOIFN S RAOIFN=+$P(RAY3,U,11)
;
Q:($D(^RAO(75.1,RAOIFN,0))#2)=0 ;either null
;or a ptr to a null request record
;
S RAOIFN(0)=$G(^RAO(75.1,RAOIFN,0))
;if the patient pointers match and the request is not
;'COMPLETE' ('2' is the code for 'COMPLETE' for the
;Class I VistA RIS
I $P(RAOIFN(0),U)=RADFN,($P(RAOIFN(0),U,5)'=2) D
.NEW RAOSTS ;DUZ set to .5 (POSTMASTER)
.S RAOSTS=2 ;'2' = COMPLETE
.D ^RAORDU
.Q
Q
;
QDT(DAY,HOUR) ;date/time to queue a task for 160
; DAY - the # of day(s) to queue the task in the future
;HOUR - the # of hour(s) to queue the task in the future
;
N RAQDT ; RAQDT - FM date/time in the future
S RAQDT=$$FMADD^XLFDT($E($$NOW^XLFDT(),1,12),$G(DAY),$G(HOUR),0,0) ;NOW to the minute
S:$P(RAQDT,".",2)=24 RAQDT=$$FMADD^XLFDT(RAQDT,0,0,1,0) ;stay off midnight/add a minute
Q $$FMTH^XLFDT(RAQDT) ;return $H for ZTDTH
;
XIT ;kill vars, task... then quit
S:$D(ZTQUEUED) ZTREQ="@"
K RAARX,RAC,RACMP,RACNI,RADFN,RADIV,RADTE,RADTI,RAEND,RAFDA,RAIENS
K RAITYP,RAITYPE,RAR,RASAVDR,RASTOP,RAX,RAY,RAY2,RAY3,X,Y
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRAIPS160 7931 printed Nov 22, 2024@17:46:03 Page 2
RAIPS160 ;HISC/GJC-postinit 160 ; Aug 18, 2020@09:28:10
+1 ;;5.0;Radiology/Nuclear Medicine;**160**;Mar 16, 1998;Build 4
+2 ;
+3 ;Routine File IA Type
+4 ;----------------------------------------------
+5 ;%ZTLOAD 10063 (S)
+6 ;FIND^DIC 2051 (S)
+7 ;FILE^DIE 2053 (S)
+8 ;UPDATE^DIE 2053 (S)
+9 ;ENALL^DIK 10013 (S)
+10 ;$$NOW^XLFDT 10103 (S)
+11 ;$$FMADD^XLFDT 10103 (S)
+12 ;$$FMTH^XLFDT 10103 (S)
+13 ;$$NEWCP^XPDUTL 10141 (S)
+14 ;BMES^XPDUTL 10141 (S)
+15 ;DUZ^XUP 1429 (C)
+16 ;
+17 NEW RACHX1
SET RACHX1=$$NEWCP^XPDUTL("POST1","EN1^RAIPS160")
+18 NEW RACHX2
SET RACHX2=$$NEWCP^XPDUTL("POST2","EN2^RAIPS160")
+19 NEW RACHX3
SET RACHX3=$$NEWCP^XPDUTL("POST3","EN3^RAIPS160")
+20 QUIT
+21 ;
+22 ; Note: EN1 has a hour ead start on EN2; EN2
+23 ; has an hour head start on EN3
+24 ;
EN1 ;Fix the ^RADPT(,"DT",0) if necessary for every
+1 ;patient in the RAD/NUC MED PATIENT (#70) file.
+2 NEW RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
+3 SET ZTIO=""
SET RATXT(1)=""
SET ZTRTN="TSK1^RAIPS160"
+4 SET (ZTDESC,RATXT(2))="RA160: Fix the ^RADPT(,""DT"",0) node if necessary 1 of 3"
+5 ;get this task started immediately.
SET ZTDTH=$$NOW^XLFDT()
+6 DO ^%ZTLOAD
SET RATXT(3)="Task: "_$SELECT($GET(ZTSK)>0:ZTSK,1:"in error")
+7 DO BMES^XPDUTL(.RATXT)
+8 QUIT
+9 ;
TSK1 ;Rebuild the REGISTERED EXAM sub-file zero node.
+1 ;Example: ^RADPT(7168771.8995,"DT",0)="^70.02DA^7138969.9057^"
+2 ;Note: rebuilding the "AR" & "B" xrefs (70.02;.01) will fully
+3 ;build out ^RADPT(RADFN,"DT",0) w/4th piece
+4 NEW RADD,RADFN,RADTI
SET RADD="70.02DA"
SET RADFN=0
+5 FOR
SET RADFN=$ORDER(^RADPT(RADFN))
if 'RADFN
QUIT
Begin DoDot:1
+6 ; (1) node exists
if ($DATA(^RADPT(RADFN,"DT",0))#2)>0
QUIT
+7 ; ^RADPT(RADFN,"DT",0) is missing
+8 ; Get the earliest/only exam date
+9 ; (RADTI) for this patient.
+10 SET RADTI=$ORDER(^RADPT(RADFN,"DT",$CHAR(32)),-1)
+11 if RADTI>0
SET ^RADPT(RADFN,"DT",0)=U_RADD_U_RADTI_U
+12 QUIT
End DoDot:1
+13 QUIT
+14 ;
+15 ;-------------------------------------------------------------------------------------
+16 ;
EN2 ;reindex the "AR" & "B" xrefs on the EXAM DATE (#70.02) .01 field.
+1 NEW RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
+2 SET ZTIO=""
SET RATXT(1)=""
SET ZTRTN="TSK2^RAIPS160"
+3 SET (ZTDESC,RATXT(2))="RA160: reindex ""AR"" & ""B"" xrefs on EXAM DATE 2 of 3"
+4 ;queue task one hour into the future
SET ZTDTH=$$QDT(0,1)
+5 DO ^%ZTLOAD
SET RATXT(3)="Task: "_$SELECT($GET(ZTSK)>0:ZTSK,1:"in error")
+6 DO BMES^XPDUTL(.RATXT)
+7 QUIT
+8 ;
TSK2 ;reindex the "AR" & "B" cross reference on the EXAM DATE (#70.02)
+1 ;.01 field.
+2 NEW DA,DIC,DIK,RADFN,X
+3 ;kill the file wide "AR" index
KILL ^RADPT("AR")
+4 SET RADFN=0
+5 FOR
SET RADFN=$ORDER(^RADPT(RADFN))
if RADFN'>0
QUIT
Begin DoDot:1
+6 SET DIK="^RADPT("_RADFN_",""DT"","
+7 SET DIK(1)=".01^AR^B"
SET DA(1)=RADFN
+8 ;kill all patient level "B" indexes.
KILL ^RADPT(DA(1),"DT","B")
+9 DO ENALL^DIK
KILL DA,DIC,DIK,X
+10 QUIT
End DoDot:1
+11 QUIT
+12 ;
+13 ;-------------------------------------------------------------------------------------
+14 ;
EN3 ;mass override to complete from the beginning
+1 ;of time to 12/31/2008@23.59 (for live systems post release)
+2 NEW RATXT,ZTDESC,ZTDTH,ZTIO,ZTRTN
+3 SET ZTIO=""
SET RATXT(1)=""
SET ZTRTN="TSK3^RAIPS160"
+4 SET (ZTDESC,RATXT(2))="RA160: complete all studies/orders up to 12/31/2008@23.59 3 of 3"
+5 ;queue two hours into the future
SET ZTDTH=$$QDT(0,2)
+6 DO ^%ZTLOAD
SET RATXT(3)="Task: "_$SELECT($GET(ZTSK)>0:ZTSK,1:"in error")
+7 DO BMES^XPDUTL(.RATXT)
+8 QUIT
+9 ;
TSK3 ;mass override to complete from the beginning
+1 ;of time to 12/31/2008@23.59
+2 ;
+3 SET RAARX=$NAME(^RADPT("AR"))
SET (RADTE,RASTOP)=0
SET RAEND=3081231.2359
+4 ;RASAVDR iS checked in RAORDU (bypass PCE)
SET RASAVDR="[RA OVERRIDE]"
+5 ;-------------------------------------------
+6 ;set DUZ to the value of POSTMASTER
+7 NEW RADUZ160
SET RADUZ160=DUZ
DO DUZ^XUP(.5)
+8 ;-------------------------------------------
+9 FOR
SET RADTE=$ORDER(@RAARX@(RADTE))
if RADTE'>0
QUIT
if RADTE>RAEND
QUIT
Begin DoDot:1
+10 SET RADFN=0
+11 FOR
SET RADFN=$ORDER(@RAARX@(RADTE,RADFN))
if RADFN'>0
QUIT
Begin DoDot:2
+12 SET RADTI=0
+13 FOR
SET RADTI=$ORDER(@RAARX@(RADTE,RADFN,RADTI))
if RADTI'>0
QUIT
Begin DoDot:3
+14 SET RAY2=$GET(^RADPT(RADFN,"DT",RADTI,0))
+15 ;type of imaging
SET RAITYP=+$PIECE(RAY2,U,2)
+16 SET RAITYPE=$PIECE($GET(^RA(79.2,RAITYP,0)),U)
+17 ;cannot proceed w/bad data
if RAITYPE=""
QUIT
+18 SET RACMP=$ORDER(^RA(72,"AA",RAITYPE,9,0))
+19 ; quit if RACMP does not exist w/order # 9
+20 if RACMP'>0
QUIT
SET RACNI=0
+21 FOR
SET RACNI=$ORDER(^RADPT(RADFN,"DT",RADTI,"P",RACNI))
if RACNI'>0
QUIT
Begin DoDot:4
+22 SET RAY3=$GET(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0))
+23 if $$ACTIVE(+$PIECE(RAY3,U,3))=0
QUIT
+24 ; // ** check if user asked to stop the task ** //
+25 IF $$S^%ZTLOAD("RA*5.0*160: stopped by user.")
SET (RASTOP,ZTSTOP)=1
+26 ; // ** check if user asked to stop the task ** //
+27 SET RAIENS=RACNI_","_RADTI_","_RADFN_","
+28 SET RAFDA(70.03,RAIENS,3)=RACMP
+29 LOCK +^RADPT(RADFN,"DT",RADTI,"P",RACNI):3
+30 ;failed don't update xam status, xam logs or order request status
if $TEST=0
QUIT
+31 ;internal - do not execute input transform
DO FILE^DIE("","RAFDA")
+32 ; (#75) EXAM STATUS TIMES
DO RA7005(RAIENS)
+33 ; (#100) ACTIVITY LOG
DO RA7007(RAIENS)
+34 ;release lock
LOCK -^RADPT(RADFN,"DT",RADTI,"P",RACNI)
+35 ; update the radiology/CPRS orders if applicable to 'complete'
+36 DO RA751
+37 QUIT
End DoDot:4
if RASTOP
QUIT
+38 QUIT
End DoDot:3
if RASTOP
QUIT
+39 QUIT
End DoDot:2
if RASTOP
QUIT
+40 QUIT
End DoDot:1
if RASTOP
QUIT
+41 ;----------------------------------
+42 ;set DUZ back to its original value
+43 DO DUZ^XUP(RADUZ160)
+44 ;----------------------------------
+45 DO XIT
+46 QUIT
+47 ;
+48 ;-------------------------------------------------------------------------------------
+49 ;
ACTIVE(Y) ; is the study canceled or complete?
+1 ; input Y: ptr to file 72
+2 ; return: 0 if canceled or complete; else 1
+3 NEW RAX,X
SET RAX=$GET(^RA(72,Y,0))
+4 SET X=$PIECE(RAX,U,3)
+5 ;X="" returns 0; X=0 or x=9 returns 0
+6 ;else returns a number between 1 and 8
+7 QUIT (X#9)
+8 ;
RA7005(RAY) ; (#75) EXAM STATUS TIMES
+1 ;input: RAY = RACNI_","_RADTI_","_RADFN_","
+2 NEW RAFDA,RAR
+3 ;RAFDA root
SET RAR=$NAME(RAFDA(70.05,"+1,"_RAY))
+4 ;.01 - option to be scheduled
+5 SET @RAR@(.01)=$EXTRACT($$NOW^XLFDT(),1,12)
+6 ;complete by i-type
SET @RAR@(2)=RACMP
+7 ;postmaster (should be)
SET @RAR@(3)=.5
+8 DO UPDATE^DIE("","RAFDA")
+9 QUIT
+10 ;
RA7007(RAY) ; (#100) ACTIVITY LOG
+1 ;input: RAY = RACNI_","_RADTI_","_RADFN_","
+2 NEW RAFDA,RAR
+3 ;RAFDA root
SET RAR=$NAME(RAFDA(70.07,"+1,"_RAY))
+4 ;.01 - option to be scheduled
+5 SET @RAR@(.01)=$EXTRACT($$NOW^XLFDT(),1,12)
+6 ; COMPLETE STATUS OVERRIDE
SET @RAR@(2)="O"
+7 ;postmaster (should be)
SET @RAR@(3)=.5
+8 ;Tech Comment...
SET @RAR@(4)="RA*5.0*160: mass override"
+9 ;indicates record overriden by P160
SET @RAR@(5)=1
+10 DO UPDATE^DIE("","RAFDA")
+11 QUIT
+12 ;
RA751 ;update the radiology and CPRS orders to 'complete'
+1 ;required vars: RAY3, RADFN, RADTI & RACNI (all exist
+2 ; when tag: RA751 is called.)
+3 ;
+4 ; RAOSTS, RAOIFN, RAOIFN(0) & DUZ
+5 ; (are set within RA751)
+6 ;
+7 NEW RAOIFN
SET RAOIFN=+$PIECE(RAY3,U,11)
+8 ;
+9 ;either null
if ($DATA(^RAO(75.1,RAOIFN,0))#2)=0
QUIT
+10 ;or a ptr to a null request record
+11 ;
+12 SET RAOIFN(0)=$GET(^RAO(75.1,RAOIFN,0))
+13 ;if the patient pointers match and the request is not
+14 ;'COMPLETE' ('2' is the code for 'COMPLETE' for the
+15 ;Class I VistA RIS
+16 IF $PIECE(RAOIFN(0),U)=RADFN
IF ($PIECE(RAOIFN(0),U,5)'=2)
Begin DoDot:1
+17 ;DUZ set to .5 (POSTMASTER)
NEW RAOSTS
+18 ;'2' = COMPLETE
SET RAOSTS=2
+19 DO ^RAORDU
+20 QUIT
End DoDot:1
+21 QUIT
+22 ;
QDT(DAY,HOUR) ;date/time to queue a task for 160
+1 ; DAY - the # of day(s) to queue the task in the future
+2 ;HOUR - the # of hour(s) to queue the task in the future
+3 ;
+4 ; RAQDT - FM date/time in the future
NEW RAQDT
+5 ;NOW to the minute
SET RAQDT=$$FMADD^XLFDT($EXTRACT($$NOW^XLFDT(),1,12),$GET(DAY),$GET(HOUR),0,0)
+6 ;stay off midnight/add a minute
if $PIECE(RAQDT,".",2)=24
SET RAQDT=$$FMADD^XLFDT(RAQDT,0,0,1,0)
+7 ;return $H for ZTDTH
QUIT $$FMTH^XLFDT(RAQDT)
+8 ;
XIT ;kill vars, task... then quit
+1 if $DATA(ZTQUEUED)
SET ZTREQ="@"
+2 KILL RAARX,RAC,RACMP,RACNI,RADFN,RADIV,RADTE,RADTI,RAEND,RAFDA,RAIENS
+3 KILL RAITYP,RAITYPE,RAR,RASAVDR,RASTOP,RAX,RAY,RAY2,RAY3,X,Y
+4 QUIT
+5 ;