PXICLN9 ;ISL/dee - Cleanup routine for PX*1.0*9 ;11/8/96
;;1.0;PCE PATIENT CARE ENCOUNTER;**9**;Aug 12, 1996
;
N PXIRA
I '$$PATCH^XPDUTL("SD*5.3*63") D
. W !,"Must install patch SD*5.3*63 before installing this patch."
. S XPDABORT=2
I '$$PATCH^XPDUTL("SD*5.3*75") D
. W !,"Must install patch SD*5.3*75 before installing this patch."
. S XPDABORT=2
I '$$PATCH^XPDUTL("LR*5.2*138") D
. W !,"Must install patch LR*5.2*138 before installing this patch."
. S XPDABORT=2
S PXIRA=$$VERSION^XPDUTL("RA")
I PXIRA]"",PXIRA'=4.5 D
. W !,"RAD/NUC must be at version 4.5 before installing this patch."
. S XPDABORT=2
I PXIRA=4.5,'$$PATCH^XPDUTL("RA*4.5*8") D
. W !,"Must install patch RA*4.5*8 before installing this patch."
. S XPDABORT=2
I '$$PATCH^XPDUTL("VSIT*2.0*1") D
. W !,"Must install patch VSIT*2.0*1 before installing this patch."
. S XPDABORT=2
I '$$PATCH^XPDUTL("PX*1.0*1") D
. W !,"Must install patch PX*1.0*1 before installing this patch."
. S XPDABORT=2
I '$$PATCH^XPDUTL("PX*1.0*5") D
. W !,"Must install patch PX*1.0*5 before installing this patch."
. S XPDABORT=2
Q
;
LOCK ;Pre-install, locks lab from passing data.
L +^LRO(69,"AA")
K ^TMP("PXICLN9")
Q
;
QUE ; Queue job to cleanup Lab and Rad Encounters.
;unlock lab
L -^LRO(69,"AA")
N ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK,ZTSAVE,ZTCPU,ZTUCI
D BMES^XPDUTL("Job to cleanup Lab and Rad Encounters.")
S ZTRTN="TASKED^PXICLN9"
S ZTIO=""
S ZTDESC="PX*1.0*9 tasked cleanup job"
S ZTDTH=$H
S ZTSAVE("DUZ")=DUZ,ZTSAVE("DUZ(")=""
D ^%ZTLOAD
I $D(ZTSK) D MES^XPDUTL("The job is task # "_ZTSK)
I '$D(ZTSK) D MES^XPDUTL("Could not start the task job.") D BMES^XPDUTL("You should start it by doing: D QUE^PXICLN9 at the programmers prompt.")
Q
;
TASKED ;
D CLEANUP^PXICLN9B
D EN1^PXICLN9A
D MAIL
Q
;
MAIL ;Send mail messge that job is done.
N XMY,XMSUB,PXTEXT,XMTEXT
S XMY(DUZ)=""
S XMY("G.PCEINSTAL@ISC-SLC.DOMAIN.EXT")=""
S XMSUB="PX*1.0*9 Cleanup is finished"
S PXTEXT(1)="PX*1.0*9 job to cleanup Lab and Rad encounters is done."
S:$D(ZTQUEUED) PXTEXT(2)="The task job number "_ZTQUEUED_" is finished."
S PXTEXT(3)=" "
S PXTEXT(4)="Visit ID for this site is: "_$P($G(^VSIT(150.2,+$P($G(^DIC(150.9,1,4)),"^",2),0)),"^",2)
I $G(PXIIMM) D
. S PXTEXT(5)=" "
. S PXTEXT(6)="The Immunization (AUTTIMM) GLOBAL was repaired. "
. S PXTEXT(7)="The number of entries converted = "_$G(PXBCNT)
S XMTEXT="PXTEXT("
D ^XMD
K PXIIMM
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXICLN9 2516 printed Dec 13, 2024@02:29 Page 2
PXICLN9 ;ISL/dee - Cleanup routine for PX*1.0*9 ;11/8/96
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**9**;Aug 12, 1996
+2 ;
+3 NEW PXIRA
+4 IF '$$PATCH^XPDUTL("SD*5.3*63")
Begin DoDot:1
+5 WRITE !,"Must install patch SD*5.3*63 before installing this patch."
+6 SET XPDABORT=2
End DoDot:1
+7 IF '$$PATCH^XPDUTL("SD*5.3*75")
Begin DoDot:1
+8 WRITE !,"Must install patch SD*5.3*75 before installing this patch."
+9 SET XPDABORT=2
End DoDot:1
+10 IF '$$PATCH^XPDUTL("LR*5.2*138")
Begin DoDot:1
+11 WRITE !,"Must install patch LR*5.2*138 before installing this patch."
+12 SET XPDABORT=2
End DoDot:1
+13 SET PXIRA=$$VERSION^XPDUTL("RA")
+14 IF PXIRA]""
IF PXIRA'=4.5
Begin DoDot:1
+15 WRITE !,"RAD/NUC must be at version 4.5 before installing this patch."
+16 SET XPDABORT=2
End DoDot:1
+17 IF PXIRA=4.5
IF '$$PATCH^XPDUTL("RA*4.5*8")
Begin DoDot:1
+18 WRITE !,"Must install patch RA*4.5*8 before installing this patch."
+19 SET XPDABORT=2
End DoDot:1
+20 IF '$$PATCH^XPDUTL("VSIT*2.0*1")
Begin DoDot:1
+21 WRITE !,"Must install patch VSIT*2.0*1 before installing this patch."
+22 SET XPDABORT=2
End DoDot:1
+23 IF '$$PATCH^XPDUTL("PX*1.0*1")
Begin DoDot:1
+24 WRITE !,"Must install patch PX*1.0*1 before installing this patch."
+25 SET XPDABORT=2
End DoDot:1
+26 IF '$$PATCH^XPDUTL("PX*1.0*5")
Begin DoDot:1
+27 WRITE !,"Must install patch PX*1.0*5 before installing this patch."
+28 SET XPDABORT=2
End DoDot:1
+29 QUIT
+30 ;
LOCK ;Pre-install, locks lab from passing data.
+1 LOCK +^LRO(69,"AA")
+2 KILL ^TMP("PXICLN9")
+3 QUIT
+4 ;
QUE ; Queue job to cleanup Lab and Rad Encounters.
+1 ;unlock lab
+2 LOCK -^LRO(69,"AA")
+3 NEW ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK,ZTSAVE,ZTCPU,ZTUCI
+4 DO BMES^XPDUTL("Job to cleanup Lab and Rad Encounters.")
+5 SET ZTRTN="TASKED^PXICLN9"
+6 SET ZTIO=""
+7 SET ZTDESC="PX*1.0*9 tasked cleanup job"
+8 SET ZTDTH=$HOROLOG
+9 SET ZTSAVE("DUZ")=DUZ
SET ZTSAVE("DUZ(")=""
+10 DO ^%ZTLOAD
+11 IF $DATA(ZTSK)
DO MES^XPDUTL("The job is task # "_ZTSK)
+12 IF '$DATA(ZTSK)
DO MES^XPDUTL("Could not start the task job.")
DO BMES^XPDUTL("You should start it by doing: D QUE^PXICLN9 at the programmers prompt.")
+13 QUIT
+14 ;
TASKED ;
+1 DO CLEANUP^PXICLN9B
+2 DO EN1^PXICLN9A
+3 DO MAIL
+4 QUIT
+5 ;
MAIL ;Send mail messge that job is done.
+1 NEW XMY,XMSUB,PXTEXT,XMTEXT
+2 SET XMY(DUZ)=""
+3 SET XMY("G.PCEINSTAL@ISC-SLC.DOMAIN.EXT")=""
+4 SET XMSUB="PX*1.0*9 Cleanup is finished"
+5 SET PXTEXT(1)="PX*1.0*9 job to cleanup Lab and Rad encounters is done."
+6 if $DATA(ZTQUEUED)
SET PXTEXT(2)="The task job number "_ZTQUEUED_" is finished."
+7 SET PXTEXT(3)=" "
+8 SET PXTEXT(4)="Visit ID for this site is: "_$PIECE($GET(^VSIT(150.2,+$PIECE($GET(^DIC(150.9,1,4)),"^",2),0)),"^",2)
+9 IF $GET(PXIIMM)
Begin DoDot:1
+10 SET PXTEXT(5)=" "
+11 SET PXTEXT(6)="The Immunization (AUTTIMM) GLOBAL was repaired. "
+12 SET PXTEXT(7)="The number of entries converted = "_$GET(PXBCNT)
End DoDot:1
+13 SET XMTEXT="PXTEXT("
+14 DO ^XMD
+15 KILL PXIIMM
+16 QUIT
+17 ;