Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PXICLN9

PXICLN9.m

Go to the documentation of this file.
  1. PXICLN9 ;ISL/dee - Cleanup routine for PX*1.0*9 ;11/8/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**9**;Aug 12, 1996
  1. ;
  1. N PXIRA
  1. I '$$PATCH^XPDUTL("SD*5.3*63") D
  1. . W !,"Must install patch SD*5.3*63 before installing this patch."
  1. . S XPDABORT=2
  1. I '$$PATCH^XPDUTL("SD*5.3*75") D
  1. . W !,"Must install patch SD*5.3*75 before installing this patch."
  1. . S XPDABORT=2
  1. I '$$PATCH^XPDUTL("LR*5.2*138") D
  1. . W !,"Must install patch LR*5.2*138 before installing this patch."
  1. . S XPDABORT=2
  1. S PXIRA=$$VERSION^XPDUTL("RA")
  1. I PXIRA]"",PXIRA'=4.5 D
  1. . W !,"RAD/NUC must be at version 4.5 before installing this patch."
  1. . S XPDABORT=2
  1. I PXIRA=4.5,'$$PATCH^XPDUTL("RA*4.5*8") D
  1. . W !,"Must install patch RA*4.5*8 before installing this patch."
  1. . S XPDABORT=2
  1. I '$$PATCH^XPDUTL("VSIT*2.0*1") D
  1. . W !,"Must install patch VSIT*2.0*1 before installing this patch."
  1. . S XPDABORT=2
  1. I '$$PATCH^XPDUTL("PX*1.0*1") D
  1. . W !,"Must install patch PX*1.0*1 before installing this patch."
  1. . S XPDABORT=2
  1. I '$$PATCH^XPDUTL("PX*1.0*5") D
  1. . W !,"Must install patch PX*1.0*5 before installing this patch."
  1. . S XPDABORT=2
  1. Q
  1. ;
  1. LOCK ;Pre-install, locks lab from passing data.
  1. L +^LRO(69,"AA")
  1. K ^TMP("PXICLN9")
  1. Q
  1. ;
  1. QUE ; Queue job to cleanup Lab and Rad Encounters.
  1. ;unlock lab
  1. L -^LRO(69,"AA")
  1. N ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK,ZTSAVE,ZTCPU,ZTUCI
  1. D BMES^XPDUTL("Job to cleanup Lab and Rad Encounters.")
  1. S ZTRTN="TASKED^PXICLN9"
  1. S ZTIO=""
  1. S ZTDESC="PX*1.0*9 tasked cleanup job"
  1. S ZTDTH=$H
  1. S ZTSAVE("DUZ")=DUZ,ZTSAVE("DUZ(")=""
  1. D ^%ZTLOAD
  1. I $D(ZTSK) D MES^XPDUTL("The job is task # "_ZTSK)
  1. 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.")
  1. Q
  1. ;
  1. TASKED ;
  1. D CLEANUP^PXICLN9B
  1. D EN1^PXICLN9A
  1. D MAIL
  1. Q
  1. ;
  1. MAIL ;Send mail messge that job is done.
  1. N XMY,XMSUB,PXTEXT,XMTEXT
  1. S XMY(DUZ)=""
  1. S XMY("G.PCEINSTAL@ISC-SLC.DOMAIN.EXT")=""
  1. S XMSUB="PX*1.0*9 Cleanup is finished"
  1. S PXTEXT(1)="PX*1.0*9 job to cleanup Lab and Rad encounters is done."
  1. S:$D(ZTQUEUED) PXTEXT(2)="The task job number "_ZTQUEUED_" is finished."
  1. S PXTEXT(3)=" "
  1. S PXTEXT(4)="Visit ID for this site is: "_$P($G(^VSIT(150.2,+$P($G(^DIC(150.9,1,4)),"^",2),0)),"^",2)
  1. I $G(PXIIMM) D
  1. . S PXTEXT(5)=" "
  1. . S PXTEXT(6)="The Immunization (AUTTIMM) GLOBAL was repaired. "
  1. . S PXTEXT(7)="The number of entries converted = "_$G(PXBCNT)
  1. S XMTEXT="PXTEXT("
  1. D ^XMD
  1. K PXIIMM
  1. Q
  1. ;