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

PSSXRF1.m

Go to the documentation of this file.
  1. PSSXRF1 ;BIR/TTH-Re-Index "AOC" x-ref on DRUG file (#50) ;05 MAY 99
  1. ;;1.0; PHARMACY DATA MANAGEMENT;**25**;9/30/97
  1. ;
  1. Q
  1. ENNV ; Begin
  1. K ZTSAVE,ZTSK S ZTRTN="ENQN^PSSXRF1",ZTDESC="PDM patch #25 re-index of ""AOC"" cross-reference",ZTIO="",ZTDTH=$$CON(XPDQUES("POS ONE")) D ^%ZTLOAD
  1. I $D(ZTSK) D MES^XPDUTL("The re-index of the ""AOC"" cross-reference is queued to run at "_XPDQUES("POS ONE"))
  1. I $D(ZTSK) D MES^XPDUTL("You will receive a mailman message when task #"_ZTSK_" has completed.")
  1. Q
  1. ENQN ; Loop thru VA Drug file (#50).
  1. D NOW^%DTC N DFN S PSSSTART=$E(%,1,12)
  1. S DIK="^PSDRUG(",DIK(1)="2^AOCC" D ENALL^DIK K DIK
  1. D SENDMSG
  1. Q
  1. SENDMSG ;Send mail message when check is complete.
  1. K PSS,XMY S XMDUZ="Pharmacy Data Management",XMSUB="PSS*1*25 Installation Completed",XMTEXT="PSS(",XMY(DUZ)="" D NOW^%DTC S Y=% X ^DD("DD")
  1. S PSS(1,0)=" The re-index of the ""AOC"" cross-reference completed on "_Y_"."
  1. D ^XMD
  1. ;
  1. DONE ;
  1. K DA,DIK,PSSSTART,X,XMDUZ,XMSUB,XMTEXT,XMY,Y,ZTDESC,ZTDTH,ZTIO,ZTREQ,ZTRTN,ZTSAVE,ZTSK S ZTREQ="@"
  1. Q
  1. ;
  1. GETDT ; check date/time for job to run
  1. N %DT,Y S %DT="NRS"
  1. D ^%DT I Y=-1 K X
  1. E S X=Y
  1. Q
  1. CON(X) ;
  1. N %DT S %DT="NRS" D ^%DT
  1. Q Y