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

PSOTPENV.m

Go to the documentation of this file.
  1. PSOTPENV ;BIR/RTR-Patch 146 Environment Check routine ;07/27/03
  1. ;;7.0;OUTPATIENT PHARMACY;**146**;DEC 1997
  1. ;External reference to 4.2 supported by DBIA 3779
  1. ;
  1. ;Check for Domain
  1. N DIR,DIC,DA,X,Y
  1. K DIC S DIC(0)="X",DIC=4.2,X="TPB-AUSTIN.DOMAIN.EXT" D ^DIC K DIC
  1. I +Y'>0 W !!,"Aborting Install!",!,"You will need to create a domain name of 'TPB-AUSTIN.DOMAIN.EXT' for the",!,"HL7 extracts of TPB Patient information. See patch 'XM*DBA*155' for details." D S XPDABORT=2 Q
  1. .W ! K DIR S DIR(0)="E",DIR("A")="Press Return to Continue" D ^DIR K DIR
  1. K Y
  1. ;
  1. I $$PATCH^XPDUTL("PSO*7.0*146") G SUB
  1. N PSOTPLL,DIR
  1. S PSOTPLL="" F S PSOTPLL=$O(^PS(53,"B",PSOTPLL)) Q:PSOTPLL=""!($G(XPDABORT)=2) D
  1. .I $$UP^XLFSTR(PSOTPLL)="NON-VA" S XPDABORT=2 D
  1. ..W !!,"You already have an entry in the RX PATIENT STATUS File (#53) named 'NON-VA'.",!,"This patch exports an entry with that same name, so the current entry",!,"must be changed using VA FileMan, before this patch can be installed.",!
  1. ..K DIR S DIR(0)="E",DIR("A")="Press Return to Continue" D ^DIR S XPDABORT=2 K DIR
  1. I $G(XPDABORT)=2 Q
  1. SUB ;For multiple installs
  1. Q:'$G(XPDENV)
  1. W ! K %DT D NOW^%DTC S %DT="RAEX",%DT(0)=%,%DT("A")="Queue the Post-Install to run at what Date@Time: "
  1. D ^%DT K %DT I $D(DTOUT)!(Y<0) W !!,"Cannot install the patch without queuing the post-install, install aborted!",! S XPDABORT=2 Q
  1. S @XPDGREF@("PSOQ146")=Y
  1. Q