DG53P893 ;ALB/LLS - Rebuild AEAR index ; 7/18/14 8:24am
;;5.3;REGISTRATION;**893**;08/13/93;Build 8
;
;
Q
; This process will find all entries in the PATIENT file (#2) that
; have field APPOINTMENT REQUEST ON 1010EZ (#1010.159) set to Y
; and do not have an AEAR index for that field. The process will
; set the index.
;
; This clean up process will be completed in the steps listed below.
; 1) Searching and updating the PATIENT file (#2)
; 2) Printing the log
;
; A MailMan message will be sent to the user after the job completes.
; The purge date for the log in the ^XTMP global is set for 90 days
; after the report is processed.
;
GBLDOC ;-----------------------------------------------------------------
; The report uses the ^XTMP("DG53P893") global to store the results.
; The format of the ^XTMP global is described below.
;
; DGIEN = IEN from the PATIENT file (#2)
;
; ^XTMP("DG53P893",0)=P1^P2^...
; P1 = Rebuild Date
; P2 = Date Processed
; P3 = Description
;
; ^XTMP("DG53P893",0,0)=P1^P2^...
; P1 = Status (0=Unprocessed,1=Compiling,2=Process Complete)
; P2 = TaskMan Task #
; P3 = Process Start Date/Time (FM format)
; P4 = Process Finish Date/Time (FM format)
; P5 = Number of patients examined
; P6 = Number of AEAR indices rebuilt
;
; ^XTMP("DG53P893",DGIEN)="" <-- DFNs OF PATIENTS WHO HAD
; AEAR INDEX REBUILT
;-----------------------------------------------------------------
EP N DIFROM,DGSTAT,DGNODE,DGDESC,ZTREQ ;This section can be called to run the index
; rebuild process independently of the patch or to
; view the report of a previously run rebuild procesS
S DGDESC="AEAR INDEX REBUILD"
S DGNODE=$G(^XTMP("DG53P893",0,0))
S DGSTAT=+$P(DGNODE,U)
;
W @IOF ; clear the screen
W !!," ",DGDESC
W !,$$REPEAT^XLFSTR("*",65)
;
I 'DGSTAT D USERDESC D TASK ;Task the job if it has not been started
;
I DGSTAT D ASKPRINT Q ;Job has completed
Q
;
EP2 N DIFROM,DGSTAT,DGNODE,DGDESC,ZTREQ ;This section is run as post install
; routine by patch DG*5.3*893
S DGDESC="AEAR INDEX REBUILD"
S DGNODE=$G(^XTMP("DG53P893",0,0))
S DGSTAT=+$P(DGNODE,U)
;
W @IOF ; clear the screen
W !!," ",DGDESC
W !,$$REPEAT^XLFSTR("*",65)
;
I 'DGSTAT D USERDESC D TASK ;Task the job if it has not been started
;
I DGSTAT D D SNDMSG Q ;Process was run previously
. W !,"AEAR index was previously rebuilt on ",$$FMTE^XLFDT($P(DGNODE,U,3))
. W !,"You can run D EP^DG53P893 from a programmer prompt to see the report.",!!
Q
;
PROCESS ; Look at all entries in the PATIENT file (#2).
N DGCTR,DGCTR2,DGIEN,DGPFAC
;
K ^XTMP("DG53P893") ;Clean up old process
S $P(DGNODE,U)=1 ;Status=compiling
S $P(DGNODE,U,2)=$G(ZTSK) ;TaskMan Task #
S $P(DGNODE,U,3)=$$NOW^XLFDT() ;Process Start Date/Time
S $P(DGNODE,U,4)=+$H
S ^XTMP("DG53P893",0,0)=DGNODE
;
; set up 0 node of ^XTMP to allow the system to purge after 90 days
S ^XTMP("DG53P893",0)=$$FMADD^XLFDT(DT,90)_U_DT_U_ZTDESC
;
S (DGIEN,DGCTR,DGCTR2)=0
F S DGIEN=$O(^DPT(DGIEN)) Q:DGIEN<1 D
. S DGCTR=DGCTR+1
. Q:$P($G(^DPT(DGIEN,1010.15)),U,9)'=1 ;APPOINTMENT REQUEST ON 1010EZ is not Y
. Q:$D(^DPT("AEAR",1,DGIEN)) ;index already exists
. D REIND(DGIEN) S DGCTR2=DGCTR2+1
. S ^XTMP("DG53P893",DGIEN)=""
;
S $P(^XTMP("DG53P893",0,0),U,5,6)=DGCTR_U_DGCTR2
S $P(^XTMP("DG53P893",0,0),U,4)=$$NOW^XLFDT() ;Process Stop Date/Time
S $P(^XTMP("DG53P893",0,0),U)=2 ;Set status = processed
;
D SNDMSG
;
Q
;
REIND(DG) ;re-index "AEAR" cross-reference.
N DIK,DA
S DIK="^DPT(",DIK(1)="1010.159^AEAR",DA=DG
D EN1^DIK ;Re-create "AEAR" cross-reference
Q
;
ASKPRINT ; Prompt user to print detail report.
N DIR,DTOUT,DUOUT,DIRUT,DIROUT,DGH,DGTSK,ZTSK,DGII,POP,Y
W !!,"Process Start Date/Time: ",$$FMTE^XLFDT($P(DGNODE,U,3))
I DGSTAT=1 D Q
. S DGH=$P(DGNODE,U,4)
. S DGTSK=$P(DGNODE,U,2)
. S DGII="" F S DGII=$O(^%ZTER(1,DGH,1,DGII)) Q:DGII="" I $G(^%ZTER(1,DGH,1,DGII,"J"))[("Task "_DGTSK) D S DGH=1 Q
. . W !!,"Task ",DGTSK," has stopped and logged error #",DGII
. . W " on ",$$FMTE^XLFDT($$HTFM^XLFDT(DGH))
. Q:DGH=1
. W !!,"The process [task #",DGTSK,"] is currently running!"
. W !,"A MailMan message will be sent when the process is complete."
. W !
W !," Process Stop Date/Time: ",$$FMTE^XLFDT($P(DGNODE,U,4))
W !
W !,"Number of patient records processed: ",$P(DGNODE,U,5)
W !,"Number of AEAR indexes rebuilt: "
W $S($P(DGNODE,U,6)'="":$P(DGNODE,U,6),1:"None")
W !
;
W !,"Please choose a device for the printing of"
W !,"the detailed report or enter '^' to quit:"
;
; Prompt user for device and to task job to TaskMan if 'Q' is chosen.
K IOP,%ZIS
S %ZIS="Q" D ^%ZIS G:POP EXIT
I $D(IO("Q")) D Q
. N ZTRTN,ZTDESC,ZTDTH
. S ZTDESC="AEAR INDEX REBULD REPORT",ZTRTN="PRINT^DG53P893(ZTDESC)",ZTDTH=$H
. D ^%ZTLOAD
. D ^%ZISC,HOME^%ZIS
. W !,$S($D(ZTSK):"REQUEST QUEUED TASK: "_$G(ZTSK),1:"REQUEST CANCELLED!")
U IO D PRINT("AEAR INDEX REBULD REPORT") G EXIT
Q
;
EXIT ;
D ^%ZISC,HOME^%ZIS
Q
;
PRINT(DGDESC) ; Print detail report.
N DGPFAC,DGIEN,DGNODE,DGLNCNT,DGPGNUM
S DGPGNUM=0
D PRNHEAD
;
S DGIEN=0 F S DGIEN=$O(^XTMP("DG53P893",DGIEN)) Q:DGIEN="" D
. S DGNODE=$G(^DPT(DGIEN,0))
. W !,DGIEN
. W ?15,$E($P(DGNODE,U),1,30)
. S DGLNCNT=DGLNCNT+1 D:DGLNCNT=62 PRNHEAD
D:DGLNCNT>55 PRNHEAD
S DGNODE=$G(^XTMP("DG53P893",0,0))
I DGNODE]"" D
. W !!,"Process was run from ",$$FMTE^XLFDT($P(DGNODE,U,3))," to ",$$FMTE^XLFDT($P(DGNODE,U,4))
. W !,"Number of patient records processed: ",$P(DGNODE,U,5)
. W !,"Number of AEAR indexes rebuilt: "
. W $S($P(DGNODE,U,6)'="":$P(DGNODE,U,6),1:"None")
W !!,"*** END OF REPORT ***"
Q
;
SNDMSG ; send MailMan message
N DGLN,XMDUZ,XMSUB,XMTEXT,XMY,DGTXT
;
S XMTEXT="^TMP(""DG53P893"",$J,"
S XMSUB="Patch DG*5.3*893 (AEAR INDEX REBULD)"
S XMDUZ=.5 ;indicate PostMaster is the sender
S XMY(DUZ)="" ;Send message to user starting job
;
K ^TMP("DG53P893",$J)
D MSGADD(XMSUB)
D MSGADD("")
D MSGADD("Started @ "_$$FMTE^XLFDT($P($G(^XTMP("DG53P893",0,0)),U,3)))
D MSGADD("Finished @ "_$$FMTE^XLFDT($P($G(^XTMP("DG53P893",0,0)),U,4)))
D MSGADD("")
D MSGADD("The search/update process has completed. The detailed ")
D MSGADD("report can be viewed by running D EP^DG53P893 from the ")
D MSGADD("programmer prompt. On "_$$FMTE^XLFDT(+$G(^XTMP("DG53P893",0)))_" the data will be purged. ")
D MSGADD("")
D MSGADD("Number of patient records processed: ")
D MSGADD("")
D MSGADD(" "_$P($G(^XTMP("DG53P893",0,0)),U,5))
D MSGADD("Number of AEAR indexes rebuilt:")
D MSGADD("")
I $P($G(^XTMP("DG53P893",0,0)),U,6)="" D MSGADD(" None") Q
D MSGADD(" "_$P(^XTMP("DG53P893",0,0),U,6))
D MSGADD("")
D MSGADD("*** End ***")
D ^XMD ;send Mailman message
K ^TMP("DG53P893",$J)
Q
;
MSGADD(DGLINE) N MSGLINE
S MSGLINE=$O(^TMP("DG53P893",$J,""),-1)+1
S ^TMP("DG53P893",$J,MSGLINE)=$G(DGLINE)
Q
;
TASK ;Task the job using TaskMan
N ZTDESC,ZTIO,ZTRTN
S ZTIO="",ZTRTN="PROCESS^DG53P893",ZTDESC=DGDESC
S ZTDTH=$$NOW^XLFDT()
W ! D ^%ZTLOAD
W:$G(ZTSK) "TaskMan Task: ",$G(ZTSK)
Q
;
PRNHEAD ; Print report heading
S DGLNCNT=8,DGPGNUM=DGPGNUM+1
W @IOF,!!!,?(80-$L(DGDESC)/2),DGDESC
W !!,"Run Date: ",$$HTE^XLFDT($H),?68,"Page: ",DGPGNUM
W !!,"Patient IEN",?15,"Patient Name"
W !,"===========",?15,"============"
Q
;
USERDESC ;Write description to the screen for the user
W !!,"This process will find all entries in the PATIENT file (#2) that"
W !,"have field APPOINTMENT REQUEST ON 1010EZ (#1010.159) set to Y"
W !,"and do not have an AEAR index for that field. The process will"
W !,"set the index."
W !!,"The clean up process will perform the following steps in order:"
W !," 1) Search/update the patient data. (This step looks at "
W !," every patient in the PATIENT (#2) file.) A summary"
W !," MailMan message will be sent to the user when the"
W !," search/update is complete."
W !," 2) The user will need run D EP^DG53P893 from the programmer"
W !," prompt to view the detailed report within 90 days."
W !," NOTE: The system will purge the process log after 90"
W !," days!"
W !!,"Log data will be stored in the ^XTMP(""DG53P893"") global.",!
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG53P893 8776 printed Dec 13, 2024@02:40:17 Page 2
DG53P893 ;ALB/LLS - Rebuild AEAR index ; 7/18/14 8:24am
+1 ;;5.3;REGISTRATION;**893**;08/13/93;Build 8
+2 ;
+3 ;
+4 QUIT
+5 ; This process will find all entries in the PATIENT file (#2) that
+6 ; have field APPOINTMENT REQUEST ON 1010EZ (#1010.159) set to Y
+7 ; and do not have an AEAR index for that field. The process will
+8 ; set the index.
+9 ;
+10 ; This clean up process will be completed in the steps listed below.
+11 ; 1) Searching and updating the PATIENT file (#2)
+12 ; 2) Printing the log
+13 ;
+14 ; A MailMan message will be sent to the user after the job completes.
+15 ; The purge date for the log in the ^XTMP global is set for 90 days
+16 ; after the report is processed.
+17 ;
GBLDOC ;-----------------------------------------------------------------
+1 ; The report uses the ^XTMP("DG53P893") global to store the results.
+2 ; The format of the ^XTMP global is described below.
+3 ;
+4 ; DGIEN = IEN from the PATIENT file (#2)
+5 ;
+6 ; ^XTMP("DG53P893",0)=P1^P2^...
+7 ; P1 = Rebuild Date
+8 ; P2 = Date Processed
+9 ; P3 = Description
+10 ;
+11 ; ^XTMP("DG53P893",0,0)=P1^P2^...
+12 ; P1 = Status (0=Unprocessed,1=Compiling,2=Process Complete)
+13 ; P2 = TaskMan Task #
+14 ; P3 = Process Start Date/Time (FM format)
+15 ; P4 = Process Finish Date/Time (FM format)
+16 ; P5 = Number of patients examined
+17 ; P6 = Number of AEAR indices rebuilt
+18 ;
+19 ; ^XTMP("DG53P893",DGIEN)="" <-- DFNs OF PATIENTS WHO HAD
+20 ; AEAR INDEX REBUILT
+21 ;-----------------------------------------------------------------
EP ;This section can be called to run the index
NEW DIFROM,DGSTAT,DGNODE,DGDESC,ZTREQ
+1 ; rebuild process independently of the patch or to
+2 ; view the report of a previously run rebuild procesS
+3 SET DGDESC="AEAR INDEX REBUILD"
+4 SET DGNODE=$GET(^XTMP("DG53P893",0,0))
+5 SET DGSTAT=+$PIECE(DGNODE,U)
+6 ;
+7 ; clear the screen
WRITE @IOF
+8 WRITE !!," ",DGDESC
+9 WRITE !,$$REPEAT^XLFSTR("*",65)
+10 ;
+11 ;Task the job if it has not been started
IF 'DGSTAT
DO USERDESC
DO TASK
+12 ;
+13 ;Job has completed
IF DGSTAT
DO ASKPRINT
QUIT
+14 QUIT
+15 ;
EP2 ;This section is run as post install
NEW DIFROM,DGSTAT,DGNODE,DGDESC,ZTREQ
+1 ; routine by patch DG*5.3*893
+2 SET DGDESC="AEAR INDEX REBUILD"
+3 SET DGNODE=$GET(^XTMP("DG53P893",0,0))
+4 SET DGSTAT=+$PIECE(DGNODE,U)
+5 ;
+6 ; clear the screen
WRITE @IOF
+7 WRITE !!," ",DGDESC
+8 WRITE !,$$REPEAT^XLFSTR("*",65)
+9 ;
+10 ;Task the job if it has not been started
IF 'DGSTAT
DO USERDESC
DO TASK
+11 ;
+12 ;Process was run previously
IF DGSTAT
Begin DoDot:1
+13 WRITE !,"AEAR index was previously rebuilt on ",$$FMTE^XLFDT($PIECE(DGNODE,U,3))
+14 WRITE !,"You can run D EP^DG53P893 from a programmer prompt to see the report.",!!
End DoDot:1
DO SNDMSG
QUIT
+15 QUIT
+16 ;
PROCESS ; Look at all entries in the PATIENT file (#2).
+1 NEW DGCTR,DGCTR2,DGIEN,DGPFAC
+2 ;
+3 ;Clean up old process
KILL ^XTMP("DG53P893")
+4 ;Status=compiling
SET $PIECE(DGNODE,U)=1
+5 ;TaskMan Task #
SET $PIECE(DGNODE,U,2)=$GET(ZTSK)
+6 ;Process Start Date/Time
SET $PIECE(DGNODE,U,3)=$$NOW^XLFDT()
+7 SET $PIECE(DGNODE,U,4)=+$HOROLOG
+8 SET ^XTMP("DG53P893",0,0)=DGNODE
+9 ;
+10 ; set up 0 node of ^XTMP to allow the system to purge after 90 days
+11 SET ^XTMP("DG53P893",0)=$$FMADD^XLFDT(DT,90)_U_DT_U_ZTDESC
+12 ;
+13 SET (DGIEN,DGCTR,DGCTR2)=0
+14 FOR
SET DGIEN=$ORDER(^DPT(DGIEN))
if DGIEN<1
QUIT
Begin DoDot:1
+15 SET DGCTR=DGCTR+1
+16 ;APPOINTMENT REQUEST ON 1010EZ is not Y
if $PIECE($GET(^DPT(DGIEN,1010.15)),U,9)'=1
QUIT
+17 ;index already exists
if $DATA(^DPT("AEAR",1,DGIEN))
QUIT
+18 DO REIND(DGIEN)
SET DGCTR2=DGCTR2+1
+19 SET ^XTMP("DG53P893",DGIEN)=""
End DoDot:1
+20 ;
+21 SET $PIECE(^XTMP("DG53P893",0,0),U,5,6)=DGCTR_U_DGCTR2
+22 ;Process Stop Date/Time
SET $PIECE(^XTMP("DG53P893",0,0),U,4)=$$NOW^XLFDT()
+23 ;Set status = processed
SET $PIECE(^XTMP("DG53P893",0,0),U)=2
+24 ;
+25 DO SNDMSG
+26 ;
+27 QUIT
+28 ;
REIND(DG) ;re-index "AEAR" cross-reference.
+1 NEW DIK,DA
+2 SET DIK="^DPT("
SET DIK(1)="1010.159^AEAR"
SET DA=DG
+3 ;Re-create "AEAR" cross-reference
DO EN1^DIK
+4 QUIT
+5 ;
ASKPRINT ; Prompt user to print detail report.
+1 NEW DIR,DTOUT,DUOUT,DIRUT,DIROUT,DGH,DGTSK,ZTSK,DGII,POP,Y
+2 WRITE !!,"Process Start Date/Time: ",$$FMTE^XLFDT($PIECE(DGNODE,U,3))
+3 IF DGSTAT=1
Begin DoDot:1
+4 SET DGH=$PIECE(DGNODE,U,4)
+5 SET DGTSK=$PIECE(DGNODE,U,2)
+6 SET DGII=""
FOR
SET DGII=$ORDER(^%ZTER(1,DGH,1,DGII))
if DGII=""
QUIT
IF $GET(^%ZTER(1,DGH,1,DGII,"J"))[("Task "_DGTSK)
Begin DoDot:2
+7 WRITE !!,"Task ",DGTSK," has stopped and logged error #",DGII
+8 WRITE " on ",$$FMTE^XLFDT($$HTFM^XLFDT(DGH))
End DoDot:2
SET DGH=1
QUIT
+9 if DGH=1
QUIT
+10 WRITE !!,"The process [task #",DGTSK,"] is currently running!"
+11 WRITE !,"A MailMan message will be sent when the process is complete."
+12 WRITE !
End DoDot:1
QUIT
+13 WRITE !," Process Stop Date/Time: ",$$FMTE^XLFDT($PIECE(DGNODE,U,4))
+14 WRITE !
+15 WRITE !,"Number of patient records processed: ",$PIECE(DGNODE,U,5)
+16 WRITE !,"Number of AEAR indexes rebuilt: "
+17 WRITE $SELECT($PIECE(DGNODE,U,6)'="":$PIECE(DGNODE,U,6),1:"None")
+18 WRITE !
+19 ;
+20 WRITE !,"Please choose a device for the printing of"
+21 WRITE !,"the detailed report or enter '^' to quit:"
+22 ;
+23 ; Prompt user for device and to task job to TaskMan if 'Q' is chosen.
+24 KILL IOP,%ZIS
+25 SET %ZIS="Q"
DO ^%ZIS
if POP
GOTO EXIT
+26 IF $DATA(IO("Q"))
Begin DoDot:1
+27 NEW ZTRTN,ZTDESC,ZTDTH
+28 SET ZTDESC="AEAR INDEX REBULD REPORT"
SET ZTRTN="PRINT^DG53P893(ZTDESC)"
SET ZTDTH=$HOROLOG
+29 DO ^%ZTLOAD
+30 DO ^%ZISC
DO HOME^%ZIS
+31 WRITE !,$SELECT($DATA(ZTSK):"REQUEST QUEUED TASK: "_$GET(ZTSK),1:"REQUEST CANCELLED!")
End DoDot:1
QUIT
+32 USE IO
DO PRINT("AEAR INDEX REBULD REPORT")
GOTO EXIT
+33 QUIT
+34 ;
EXIT ;
+1 DO ^%ZISC
DO HOME^%ZIS
+2 QUIT
+3 ;
PRINT(DGDESC) ; Print detail report.
+1 NEW DGPFAC,DGIEN,DGNODE,DGLNCNT,DGPGNUM
+2 SET DGPGNUM=0
+3 DO PRNHEAD
+4 ;
+5 SET DGIEN=0
FOR
SET DGIEN=$ORDER(^XTMP("DG53P893",DGIEN))
if DGIEN=""
QUIT
Begin DoDot:1
+6 SET DGNODE=$GET(^DPT(DGIEN,0))
+7 WRITE !,DGIEN
+8 WRITE ?15,$EXTRACT($PIECE(DGNODE,U),1,30)
+9 SET DGLNCNT=DGLNCNT+1
if DGLNCNT=62
DO PRNHEAD
End DoDot:1
+10 if DGLNCNT>55
DO PRNHEAD
+11 SET DGNODE=$GET(^XTMP("DG53P893",0,0))
+12 IF DGNODE]""
Begin DoDot:1
+13 WRITE !!,"Process was run from ",$$FMTE^XLFDT($PIECE(DGNODE,U,3))," to ",$$FMTE^XLFDT($PIECE(DGNODE,U,4))
+14 WRITE !,"Number of patient records processed: ",$PIECE(DGNODE,U,5)
+15 WRITE !,"Number of AEAR indexes rebuilt: "
+16 WRITE $SELECT($PIECE(DGNODE,U,6)'="":$PIECE(DGNODE,U,6),1:"None")
End DoDot:1
+17 WRITE !!,"*** END OF REPORT ***"
+18 QUIT
+19 ;
SNDMSG ; send MailMan message
+1 NEW DGLN,XMDUZ,XMSUB,XMTEXT,XMY,DGTXT
+2 ;
+3 SET XMTEXT="^TMP(""DG53P893"",$J,"
+4 SET XMSUB="Patch DG*5.3*893 (AEAR INDEX REBULD)"
+5 ;indicate PostMaster is the sender
SET XMDUZ=.5
+6 ;Send message to user starting job
SET XMY(DUZ)=""
+7 ;
+8 KILL ^TMP("DG53P893",$JOB)
+9 DO MSGADD(XMSUB)
+10 DO MSGADD("")
+11 DO MSGADD("Started @ "_$$FMTE^XLFDT($PIECE($GET(^XTMP("DG53P893",0,0)),U,3)))
+12 DO MSGADD("Finished @ "_$$FMTE^XLFDT($PIECE($GET(^XTMP("DG53P893",0,0)),U,4)))
+13 DO MSGADD("")
+14 DO MSGADD("The search/update process has completed. The detailed ")
+15 DO MSGADD("report can be viewed by running D EP^DG53P893 from the ")
+16 DO MSGADD("programmer prompt. On "_$$FMTE^XLFDT(+$GET(^XTMP("DG53P893",0)))_" the data will be purged. ")
+17 DO MSGADD("")
+18 DO MSGADD("Number of patient records processed: ")
+19 DO MSGADD("")
+20 DO MSGADD(" "_$PIECE($GET(^XTMP("DG53P893",0,0)),U,5))
+21 DO MSGADD("Number of AEAR indexes rebuilt:")
+22 DO MSGADD("")
+23 IF $PIECE($GET(^XTMP("DG53P893",0,0)),U,6)=""
DO MSGADD(" None")
QUIT
+24 DO MSGADD(" "_$PIECE(^XTMP("DG53P893",0,0),U,6))
+25 DO MSGADD("")
+26 DO MSGADD("*** End ***")
+27 ;send Mailman message
DO ^XMD
+28 KILL ^TMP("DG53P893",$JOB)
+29 QUIT
+30 ;
MSGADD(DGLINE) NEW MSGLINE
+1 SET MSGLINE=$ORDER(^TMP("DG53P893",$JOB,""),-1)+1
+2 SET ^TMP("DG53P893",$JOB,MSGLINE)=$GET(DGLINE)
+3 QUIT
+4 ;
TASK ;Task the job using TaskMan
+1 NEW ZTDESC,ZTIO,ZTRTN
+2 SET ZTIO=""
SET ZTRTN="PROCESS^DG53P893"
SET ZTDESC=DGDESC
+3 SET ZTDTH=$$NOW^XLFDT()
+4 WRITE !
DO ^%ZTLOAD
+5 if $GET(ZTSK)
WRITE "TaskMan Task: ",$GET(ZTSK)
+6 QUIT
+7 ;
PRNHEAD ; Print report heading
+1 SET DGLNCNT=8
SET DGPGNUM=DGPGNUM+1
+2 WRITE @IOF,!!!,?(80-$LENGTH(DGDESC)/2),DGDESC
+3 WRITE !!,"Run Date: ",$$HTE^XLFDT($HOROLOG),?68,"Page: ",DGPGNUM
+4 WRITE !!,"Patient IEN",?15,"Patient Name"
+5 WRITE !,"===========",?15,"============"
+6 QUIT
+7 ;
USERDESC ;Write description to the screen for the user
+1 WRITE !!,"This process will find all entries in the PATIENT file (#2) that"
+2 WRITE !,"have field APPOINTMENT REQUEST ON 1010EZ (#1010.159) set to Y"
+3 WRITE !,"and do not have an AEAR index for that field. The process will"
+4 WRITE !,"set the index."
+5 WRITE !!,"The clean up process will perform the following steps in order:"
+6 WRITE !," 1) Search/update the patient data. (This step looks at "
+7 WRITE !," every patient in the PATIENT (#2) file.) A summary"
+8 WRITE !," MailMan message will be sent to the user when the"
+9 WRITE !," search/update is complete."
+10 WRITE !," 2) The user will need run D EP^DG53P893 from the programmer"
+11 WRITE !," prompt to view the detailed report within 90 days."
+12 WRITE !," NOTE: The system will purge the process log after 90"
+13 WRITE !," days!"
+14 WRITE !!,"Log data will be stored in the ^XTMP(""DG53P893"") global.",!
+15 ;
+16 QUIT