ORY352 ;SLC/RFR - PRE/POST INSTALL FOR PATCH OR*3.0*352 ;02/09/2012 13:07
;;3.0;ORDER ENTRY/RESULTS REPORTING;**352**;Dec 17, 1997;Build 18
Q
PRE ;PRE-INSTALL SECTION
;DELETE THE EXISTING DD FOR FILE 100.05 (KIDS WILL INSTALL A NEW DD)
N DIU
D BMES^XPDUTL("Deleting the data dictionary for file ORDER CHECK INSTANCES (#100.05)...")
S DIU="^ORD(100.05,",DIU(0)=""
D EN^DIU2
D BMES^XPDUTL("Successfully deleted the data dictionary.")
Q
QUEUE ;QUEUE THE POST-INSTALL SECTION
N ORMSG,XPDIDTOT
N ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK
S XPDIDTOT=1
D UPDATE^XPDID(0)
D BMES^XPDUTL("Queueing the post-install task...")
S ZTRTN="POST^ORY352",ZTDESC="OR*3.0*352 POST INSTALL"
S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT,0,0,0,10)
S ZTIO=""
D ^%ZTLOAD
I +$G(ZTSK)=0 D
.S ORMSG(1)=" ",ORMSG(2)="Unable to queue the post-install."
.D MES^XPDUTL(.ORMSG)
E D BMES^XPDUTL("Successfully queued post-install; task #"_ZTSK)
D UPDATE^XPDID(1)
Q
POST ;POST-INSTALL SECTION
N ORLIMIT,ORIEN,ORIDX,ORLINE,ORBODY
N XMMG,XMDUZ,XMY,XMSUB,XMTEXT,XMZ,XMERR,XPDIDTOT,DIFROM,XMK
;REMOVE DATA STORED IN NODE ^ORD(100.05,D0,16) WHILE PRESERVING DESCENDANTS
S ORIEN=0 F S ORIEN=$O(^ORD(100.05,ORIEN)) Q:+$G(ORIEN)=0 D
.Q:$D(^ORD(100.05,ORIEN,16))<11
.K ^TMP($J,"ORMONO")
.M ^TMP($J,"ORMONO")=^ORD(100.05,ORIEN,16)
.K ^ORD(100.05,ORIEN,16)
.S ORIDX=0,ORLINE=1 F S ORIDX=$O(^TMP($J,"ORMONO",ORIDX)) Q:+$G(ORIDX)=0 D
..S ^ORD(100.05,ORIEN,16,ORLINE,0)=^TMP($J,"ORMONO",ORIDX,0),ORLINE=ORLINE+1
.S ORLINE=$O(^ORD(100.05,ORIEN,16,"?"),-1)
.S ^ORD(100.05,ORIEN,16,0)=U_U_ORLINE_U_ORLINE_U_$P(^TMP($J,"ORMONO",0),U,5)_U
K ^TMP($J,"ORMONO")
;SEND COMPLETION EMAIL
S ORBODY(1)="Post-installation successfully completed."
S ORBODY(2)=""
S ORBODY(3)="Please delete the post-install routine ORY352 using the"
S ORBODY(4)="Kernel Toolkit option Delete Routines [XTRDEL] as follows:"
S ORBODY(5)="ROUTINE DELETE"
S ORBODY(6)=""
S ORBODY(7)="All Routines? No => No"
S ORBODY(8)=""
S ORBODY(9)="Routine: ORY352"
S ORBODY(10)="Routine: "
S ORBODY(11)="1 routine"
S ORBODY(12)=""
S ORBODY(13)="1 routines to DELETE, OK: NO// YES"
S ORBODY(14)="ORY352"
S ORBODY(15)="Done."
S XMY(DUZ)=""
S XMSUB="PATCH OR*3.0*352 POST-INSTALLATION REPORT"
S XMTEXT="ORBODY("
D ^XMD
I $D(XMMG)=0 D
.S XMK=$$BSKT^XMAD2("IN",+DUZ)
.D:+XMK>0 MAKENEW^XMXUTIL(DUZ,+XMK,XMZ,1)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY352 2415 printed Dec 13, 2024@02:41:29 Page 2
ORY352 ;SLC/RFR - PRE/POST INSTALL FOR PATCH OR*3.0*352 ;02/09/2012 13:07
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**352**;Dec 17, 1997;Build 18
+2 QUIT
PRE ;PRE-INSTALL SECTION
+1 ;DELETE THE EXISTING DD FOR FILE 100.05 (KIDS WILL INSTALL A NEW DD)
+2 NEW DIU
+3 DO BMES^XPDUTL("Deleting the data dictionary for file ORDER CHECK INSTANCES (#100.05)...")
+4 SET DIU="^ORD(100.05,"
SET DIU(0)=""
+5 DO EN^DIU2
+6 DO BMES^XPDUTL("Successfully deleted the data dictionary.")
+7 QUIT
QUEUE ;QUEUE THE POST-INSTALL SECTION
+1 NEW ORMSG,XPDIDTOT
+2 NEW ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK
+3 SET XPDIDTOT=1
+4 DO UPDATE^XPDID(0)
+5 DO BMES^XPDUTL("Queueing the post-install task...")
+6 SET ZTRTN="POST^ORY352"
SET ZTDESC="OR*3.0*352 POST INSTALL"
+7 SET ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT,0,0,0,10)
+8 SET ZTIO=""
+9 DO ^%ZTLOAD
+10 IF +$GET(ZTSK)=0
Begin DoDot:1
+11 SET ORMSG(1)=" "
SET ORMSG(2)="Unable to queue the post-install."
+12 DO MES^XPDUTL(.ORMSG)
End DoDot:1
+13 IF '$TEST
DO BMES^XPDUTL("Successfully queued post-install; task #"_ZTSK)
+14 DO UPDATE^XPDID(1)
+15 QUIT
POST ;POST-INSTALL SECTION
+1 NEW ORLIMIT,ORIEN,ORIDX,ORLINE,ORBODY
+2 NEW XMMG,XMDUZ,XMY,XMSUB,XMTEXT,XMZ,XMERR,XPDIDTOT,DIFROM,XMK
+3 ;REMOVE DATA STORED IN NODE ^ORD(100.05,D0,16) WHILE PRESERVING DESCENDANTS
+4 SET ORIEN=0
FOR
SET ORIEN=$ORDER(^ORD(100.05,ORIEN))
if +$GET(ORIEN)=0
QUIT
Begin DoDot:1
+5 if $DATA(^ORD(100.05,ORIEN,16))<11
QUIT
+6 KILL ^TMP($JOB,"ORMONO")
+7 MERGE ^TMP($JOB,"ORMONO")=^ORD(100.05,ORIEN,16)
+8 KILL ^ORD(100.05,ORIEN,16)
+9 SET ORIDX=0
SET ORLINE=1
FOR
SET ORIDX=$ORDER(^TMP($JOB,"ORMONO",ORIDX))
if +$GET(ORIDX)=0
QUIT
Begin DoDot:2
+10 SET ^ORD(100.05,ORIEN,16,ORLINE,0)=^TMP($JOB,"ORMONO",ORIDX,0)
SET ORLINE=ORLINE+1
End DoDot:2
+11 SET ORLINE=$ORDER(^ORD(100.05,ORIEN,16,"?"),-1)
+12 SET ^ORD(100.05,ORIEN,16,0)=U_U_ORLINE_U_ORLINE_U_$PIECE(^TMP($JOB,"ORMONO",0),U,5)_U
End DoDot:1
+13 KILL ^TMP($JOB,"ORMONO")
+14 ;SEND COMPLETION EMAIL
+15 SET ORBODY(1)="Post-installation successfully completed."
+16 SET ORBODY(2)=""
+17 SET ORBODY(3)="Please delete the post-install routine ORY352 using the"
+18 SET ORBODY(4)="Kernel Toolkit option Delete Routines [XTRDEL] as follows:"
+19 SET ORBODY(5)="ROUTINE DELETE"
+20 SET ORBODY(6)=""
+21 SET ORBODY(7)="All Routines? No => No"
+22 SET ORBODY(8)=""
+23 SET ORBODY(9)="Routine: ORY352"
+24 SET ORBODY(10)="Routine: "
+25 SET ORBODY(11)="1 routine"
+26 SET ORBODY(12)=""
+27 SET ORBODY(13)="1 routines to DELETE, OK: NO// YES"
+28 SET ORBODY(14)="ORY352"
+29 SET ORBODY(15)="Done."
+30 SET XMY(DUZ)=""
+31 SET XMSUB="PATCH OR*3.0*352 POST-INSTALLATION REPORT"
+32 SET XMTEXT="ORBODY("
+33 DO ^XMD
+34 IF $DATA(XMMG)=0
Begin DoDot:1
+35 SET XMK=$$BSKT^XMAD2("IN",+DUZ)
+36 if +XMK>0
DO MAKENEW^XMXUTIL(DUZ,+XMK,XMZ,1)
End DoDot:1
+37 QUIT