ESP122P3 ;ALB/JAP; POST-INSTALL FOR ES*1*22 cont.;3/98
;;1.0;POLICE & SECURITY;**22**;Mar 31, 1994
;
COMPLETE ;complete the conversion process
N ESPC,ESPU,ESPUSER,DIR,DIRUT,DTOUT,DUOUT,DIROUT,X,Y,POP,ZTRTN,ZTDESC,ZTSK,ZTREQ
;warn user
W @IOF
W !!?20,"Patch ES*1*22 Conversion Completion",!
W !?5,"Continuing with this process will 'COMPLETE' the conversion process"
W !?5,"for patch ES*1*22."
W !
W !?5,"This means that --"
W !
W !?5,"(1) The records in the ESP OFFENSE REPORT file (#912)"
W !?5," will no longer be available for conversion."
W !?5,"(2) The menu option Conversion Management for ESP*1*22"
W !?5," [ESP CONVERISON FOR ES*1*22] will be placed out-of-order."
W !?5,"(3) The Conversion Completion Report will be printed with your"
W !?5," name as Completer."
W !?5,"(4) A mail message will be sent to Police management (i.e.,"
W !?5," through the ESP VACO 48 HR CRITERIA Mail Group) regarding"
W !?5," this conversion completion."
W !?5,"(5) A mail message will be sent to IRM staff (i.e., through"
W !?5," the IRM and/or PATCHES Mail Group) which instructs IRM to"
W !?5," delete the conversion routines from the system."
W !
;ask if ready to complete
S DIR(0)="YA",DIR("A")="Do you wish to proceed with Completion?: "
D ^DIR K DIR W !!
Q:($D(DIRUT))!($D(DIROUT))
Q:(X="")!(Y="")!(Y=0)
;if user responded with 'yes', then complete
S (ESPC,ESPU)=1,ESPUSER=DUZ
S IOP="Q" D ^%ZIS
I POP D
.W !,"No device selected...exiting.",!
Q:POP
W !,"Proceeding with Completion...",!
I $D(IO("Q")) D
.S ZTRTN="FINISH^ESP122P3",ZTDESC="Patch ES*1*22 Conversion Completion",ZTREQ="@"
.S ZTSAVE("ESPC")="",ZTSAVE("ESPU")="",ZTSAVE("ESPUSER")=""
.D ^%ZTLOAD
.I $G(ZTSK)>0 D Q
..W !,"Request queued as Task #",ZTSK,".",!
..W !,"Patch ES*1*22 Conversion queued for Completion.",!
..K X,Y,DIR
..S DIR(0)="E" D ^DIR K DIR
.I '$G(ZTSK) D
..W !,"Request to queue cancelled...exiting.",!
..W !,"Patch ES*1*22 Conversion will NOT be completed.",!
..S POP=1
..K X,Y,DIR
..S DIR(0)="E" D ^DIR K DIR
D HOME^%ZIS
Q
;
FINISH ;print report and finalize process
N LN,OOO,X,Y,DIC,DIE,DA,DR,XMDUX,XMSUB,XMY,XMTEXT,XMDT,ESPDATE,ESPMSG
U IO
S $P(LN,"=",80)="",PAGE=0
D NOW^%DTC S Y=$E(%,1,12),ESPDATE=$$FMTE^XLFDT(Y,"5")
D HDR
W !
W !,"The Conversion process on the ESP OFFENSE REPORT file (#912)"
W !,"for patch ES*1*22 has been completed."
W !
W !,"Completed by: "_$P($G(^VA(200,ESPUSER,0)),U,1)
W !,"Completed on: "_ESPDATE
W !
W !,"The List of Converted Entries in File #912 and"
W !,"the List of Unconverted Entries in File #912 reports follow.",!
S RUNDT=ESPDATE D CONV^ESP122P1
S RUNDT=ESPDATE D USER^ESP122P1
I IO'=IO(0) D ^%ZISC
;put conversion option out-of-order
S OOO="Completed by user# "_DUZ_" on "_X
S DIC="^DIC(19,",X="ESP CONVERSION FOR ES*1*22" D ^DIC
Q:Y=-1
S DA=+Y
S DIE="^DIC(19,",DR="2///^S X=OOO" D ^DIE
;send message to police staff
S XMDUZ=ESPUSER,XMSUB="Conversion Completion for ES*1*22"
S XMY(XMDUZ)="",XMY("G.ESP VACO 48 HR CRITERIA@"_^XMB("NETNAME"))="",XMTEXT="ESPMSG("
S ESPMSG(1)="The Conversion process on the ESP OFFENSE REPORT file (#912)"
S ESPMSG(2)="for patch ES*1*22 has been completed."
S ESPMSG(3)=" "
S ESPMSG(4)="Completed by: "_$P($G(^VA(200,XMDUZ,0)),U,1)
S ESPMSG(5)="Completed on: "_ESPDATE
S ESPMSG(6)=" "
S ESPMSG(7)="No further conversion will be allowed on file #912"
S ESPMSG(8)="using ES*1*22 routines."
S ESPMSG(9)=" "
S ESPMSG(10)="**IMPORTANT**"
S ESPMSG(11)=" "
S ESPMSG(12)="The Crime Statistics report for each month since October 1, 1997,"
S ESPMSG(13)="**must** be regenerated. Use the Generate Crime Statistics"
S ESPMSG(14)="[ESP GENERATE CRIME STATISTICS] option to accomplish this."
D ^XMD
K ESPMSG,XMY
;send message to irm staff
S XMDUZ=ESPUSER,XMSUB="Delete Routines for ES*1*22"
S DIC="^XMB(3.8,",DIC(0)="",X="PATCHES" D ^DIC I +Y>0 S XMY("G.PATCHES@"_^XMB("NETNAME"))=""
S DIC="^XMB(3.8,",DIC(0)="",X="IRM" D ^DIC I +Y>0 S XMY("G.IRM@"_^XMB("NETNAME"))=""
S XMY(XMDUZ)="",XMTEXT="ESPMSG("
S ESPMSG(1)="The Conversion process on the ESP OFFENSE REPORT file (#912)"
S ESPMSG(2)="for patch ES*1*22 has been completed."
S ESPMSG(3)=" "
S ESPMSG(4)="Completed by: "_$P($G(^VA(200,XMDUZ,0)),U,1)
S ESPMSG(5)="Completed on: "_ESPDATE
S ESPMSG(6)=" "
S ESPMSG(7)="The following routines may be deleted from your system:"
S ESPMSG(8)=" ESP122PT"
S ESPMSG(9)=" ESP122PR"
S ESPMSG(10)=" ESP122PM"
S ESPMSG(11)=" ESP122P1"
S ESPMSG(12)=" ESP122P2"
S ESPMSG(13)=" ESP122P3"
D ^XMD
Q
;
HDR ;report header
W @IOF
S PAGE=PAGE+1
W !,"Patch ES*1*22 Conversion Completion Report ",?55,"Page: ",PAGE
W !?52,"Printed: ",ESPDATE
W !,LN
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESP122P3 4846 printed Nov 22, 2024@17:39:33 Page 2
ESP122P3 ;ALB/JAP; POST-INSTALL FOR ES*1*22 cont.;3/98
+1 ;;1.0;POLICE & SECURITY;**22**;Mar 31, 1994
+2 ;
COMPLETE ;complete the conversion process
+1 NEW ESPC,ESPU,ESPUSER,DIR,DIRUT,DTOUT,DUOUT,DIROUT,X,Y,POP,ZTRTN,ZTDESC,ZTSK,ZTREQ
+2 ;warn user
+3 WRITE @IOF
+4 WRITE !!?20,"Patch ES*1*22 Conversion Completion",!
+5 WRITE !?5,"Continuing with this process will 'COMPLETE' the conversion process"
+6 WRITE !?5,"for patch ES*1*22."
+7 WRITE !
+8 WRITE !?5,"This means that --"
+9 WRITE !
+10 WRITE !?5,"(1) The records in the ESP OFFENSE REPORT file (#912)"
+11 WRITE !?5," will no longer be available for conversion."
+12 WRITE !?5,"(2) The menu option Conversion Management for ESP*1*22"
+13 WRITE !?5," [ESP CONVERISON FOR ES*1*22] will be placed out-of-order."
+14 WRITE !?5,"(3) The Conversion Completion Report will be printed with your"
+15 WRITE !?5," name as Completer."
+16 WRITE !?5,"(4) A mail message will be sent to Police management (i.e.,"
+17 WRITE !?5," through the ESP VACO 48 HR CRITERIA Mail Group) regarding"
+18 WRITE !?5," this conversion completion."
+19 WRITE !?5,"(5) A mail message will be sent to IRM staff (i.e., through"
+20 WRITE !?5," the IRM and/or PATCHES Mail Group) which instructs IRM to"
+21 WRITE !?5," delete the conversion routines from the system."
+22 WRITE !
+23 ;ask if ready to complete
+24 SET DIR(0)="YA"
SET DIR("A")="Do you wish to proceed with Completion?: "
+25 DO ^DIR
KILL DIR
WRITE !!
+26 if ($DATA(DIRUT))!($DATA(DIROUT))
QUIT
+27 if (X="")!(Y="")!(Y=0)
QUIT
+28 ;if user responded with 'yes', then complete
+29 SET (ESPC,ESPU)=1
SET ESPUSER=DUZ
+30 SET IOP="Q"
DO ^%ZIS
+31 IF POP
Begin DoDot:1
+32 WRITE !,"No device selected...exiting.",!
End DoDot:1
+33 if POP
QUIT
+34 WRITE !,"Proceeding with Completion...",!
+35 IF $DATA(IO("Q"))
Begin DoDot:1
+36 SET ZTRTN="FINISH^ESP122P3"
SET ZTDESC="Patch ES*1*22 Conversion Completion"
SET ZTREQ="@"
+37 SET ZTSAVE("ESPC")=""
SET ZTSAVE("ESPU")=""
SET ZTSAVE("ESPUSER")=""
+38 DO ^%ZTLOAD
+39 IF $GET(ZTSK)>0
Begin DoDot:2
+40 WRITE !,"Request queued as Task #",ZTSK,".",!
+41 WRITE !,"Patch ES*1*22 Conversion queued for Completion.",!
+42 KILL X,Y,DIR
+43 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:2
QUIT
+44 IF '$GET(ZTSK)
Begin DoDot:2
+45 WRITE !,"Request to queue cancelled...exiting.",!
+46 WRITE !,"Patch ES*1*22 Conversion will NOT be completed.",!
+47 SET POP=1
+48 KILL X,Y,DIR
+49 SET DIR(0)="E"
DO ^DIR
KILL DIR
End DoDot:2
End DoDot:1
+50 DO HOME^%ZIS
+51 QUIT
+52 ;
FINISH ;print report and finalize process
+1 NEW LN,OOO,X,Y,DIC,DIE,DA,DR,XMDUX,XMSUB,XMY,XMTEXT,XMDT,ESPDATE,ESPMSG
+2 USE IO
+3 SET $PIECE(LN,"=",80)=""
SET PAGE=0
+4 DO NOW^%DTC
SET Y=$EXTRACT(%,1,12)
SET ESPDATE=$$FMTE^XLFDT(Y,"5")
+5 DO HDR
+6 WRITE !
+7 WRITE !,"The Conversion process on the ESP OFFENSE REPORT file (#912)"
+8 WRITE !,"for patch ES*1*22 has been completed."
+9 WRITE !
+10 WRITE !,"Completed by: "_$PIECE($GET(^VA(200,ESPUSER,0)),U,1)
+11 WRITE !,"Completed on: "_ESPDATE
+12 WRITE !
+13 WRITE !,"The List of Converted Entries in File #912 and"
+14 WRITE !,"the List of Unconverted Entries in File #912 reports follow.",!
+15 SET RUNDT=ESPDATE
DO CONV^ESP122P1
+16 SET RUNDT=ESPDATE
DO USER^ESP122P1
+17 IF IO'=IO(0)
DO ^%ZISC
+18 ;put conversion option out-of-order
+19 SET OOO="Completed by user# "_DUZ_" on "_X
+20 SET DIC="^DIC(19,"
SET X="ESP CONVERSION FOR ES*1*22"
DO ^DIC
+21 if Y=-1
QUIT
+22 SET DA=+Y
+23 SET DIE="^DIC(19,"
SET DR="2///^S X=OOO"
DO ^DIE
+24 ;send message to police staff
+25 SET XMDUZ=ESPUSER
SET XMSUB="Conversion Completion for ES*1*22"
+26 SET XMY(XMDUZ)=""
SET XMY("G.ESP VACO 48 HR CRITERIA@"_^XMB("NETNAME"))=""
SET XMTEXT="ESPMSG("
+27 SET ESPMSG(1)="The Conversion process on the ESP OFFENSE REPORT file (#912)"
+28 SET ESPMSG(2)="for patch ES*1*22 has been completed."
+29 SET ESPMSG(3)=" "
+30 SET ESPMSG(4)="Completed by: "_$PIECE($GET(^VA(200,XMDUZ,0)),U,1)
+31 SET ESPMSG(5)="Completed on: "_ESPDATE
+32 SET ESPMSG(6)=" "
+33 SET ESPMSG(7)="No further conversion will be allowed on file #912"
+34 SET ESPMSG(8)="using ES*1*22 routines."
+35 SET ESPMSG(9)=" "
+36 SET ESPMSG(10)="**IMPORTANT**"
+37 SET ESPMSG(11)=" "
+38 SET ESPMSG(12)="The Crime Statistics report for each month since October 1, 1997,"
+39 SET ESPMSG(13)="**must** be regenerated. Use the Generate Crime Statistics"
+40 SET ESPMSG(14)="[ESP GENERATE CRIME STATISTICS] option to accomplish this."
+41 DO ^XMD
+42 KILL ESPMSG,XMY
+43 ;send message to irm staff
+44 SET XMDUZ=ESPUSER
SET XMSUB="Delete Routines for ES*1*22"
+45 SET DIC="^XMB(3.8,"
SET DIC(0)=""
SET X="PATCHES"
DO ^DIC
IF +Y>0
SET XMY("G.PATCHES@"_^XMB("NETNAME"))=""
+46 SET DIC="^XMB(3.8,"
SET DIC(0)=""
SET X="IRM"
DO ^DIC
IF +Y>0
SET XMY("G.IRM@"_^XMB("NETNAME"))=""
+47 SET XMY(XMDUZ)=""
SET XMTEXT="ESPMSG("
+48 SET ESPMSG(1)="The Conversion process on the ESP OFFENSE REPORT file (#912)"
+49 SET ESPMSG(2)="for patch ES*1*22 has been completed."
+50 SET ESPMSG(3)=" "
+51 SET ESPMSG(4)="Completed by: "_$PIECE($GET(^VA(200,XMDUZ,0)),U,1)
+52 SET ESPMSG(5)="Completed on: "_ESPDATE
+53 SET ESPMSG(6)=" "
+54 SET ESPMSG(7)="The following routines may be deleted from your system:"
+55 SET ESPMSG(8)=" ESP122PT"
+56 SET ESPMSG(9)=" ESP122PR"
+57 SET ESPMSG(10)=" ESP122PM"
+58 SET ESPMSG(11)=" ESP122P1"
+59 SET ESPMSG(12)=" ESP122P2"
+60 SET ESPMSG(13)=" ESP122P3"
+61 DO ^XMD
+62 QUIT
+63 ;
HDR ;report header
+1 WRITE @IOF
+2 SET PAGE=PAGE+1
+3 WRITE !,"Patch ES*1*22 Conversion Completion Report ",?55,"Page: ",PAGE
+4 WRITE !?52,"Printed: ",ESPDATE
+5 WRITE !,LN
+6 QUIT