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