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

ICPT002E.m

Go to the documentation of this file.
  1. ICPT002E ;IHS/OIT/FCJ - ICPT*6.0*1002 Env Check FOR IHS patch 1002
  1. ;;6.0;CPT/HCPCS;**1002**;May 19, 1997 ;Build 9
  1. ;
  1. ENV ;
  1. I '$G(IOM) D HOME^%ZIS
  1. I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY(2) Q
  1. I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY(2) Q
  1. I '(DUZ(0)["@") W:'$D(ZTQUEUED) !,"DUZ(0) DOES NOT CONTAIN AN '@'." D SORRY(2) Q
  1. ;
  1. S X=$$GET1^DIQ(200,DUZ,.01)
  1. W !!,$$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)
  1. W !!,$$CJ^XLFSTR("Checking Environment for "_$P($T(+2),";",4)_" V "_$P($T(+2),";",3)_" Patch "_$P($T(+2),";",5)_".",IOM)
  1. ;
  1. NEW IORVON,IORVOFF
  1. S X="IORVON;IORVOFF"
  1. D ENDR^%ZISS
  1. CHK ;
  1. I '$$INSTALLD("ICPT*6.0*37") S XPDQUIT=2
  1. I $$VCHK("DI","22.0",2,"<")
  1. I $$VCHK("XU","8.0",2,"<")
  1. I '$$INSTALLD("AUT*98.1*24") S XPDQUIT=2
  1. I '$$INSTALLD("AUM*11.0*6") S XPDQUIT=2
  1. ;
  1. NEW DA,DIC
  1. S X="ICPT",DIC="^DIC(9.4,",DIC(0)="",D="C"
  1. D IX^DIC
  1. I Y<0,$D(^DIC(9.4,"C","ICPT")) D
  1. .W !!,*7,*7,$$CJ^XLFSTR("You Have More Than One Entry In The",IOM),!,$$CJ^XLFSTR("PACKAGE File with an ""ICPT"" prefix.",IOM)
  1. .W !,$$CJ^XLFSTR(IORVON_"One entry needs to be deleted."_IORVOFF,IOM)
  1. .D SORRY(2)
  1. ;
  1. I $G(XPDQUIT) W !,$$CJ^XLFSTR(IORVON_"You must FIX IT, Before Proceeding."_IORVOFF,IOM),!!,*7,*7,*7 Q
  1. W !!,$$CJ^XLFSTR("ENVIRONMENT OK.",IOM)
  1. D HELP^XBHELP("INTROE","ICPT002E")
  1. I '$$DIR^XBDIR("E","","","","","",1) D SORRY(2) Q
  1. I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 D HELP^XBHELP("INTROI","ICPT002E") I '$$DIR^XBDIR("E","","","","","",1) D SORRY(2)
  1. Q
  1. ;
  1. SORRY(X) ;
  1. KILL DIFQ
  1. S XPDQUIT=X
  1. W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
  1. Q
  1. ;
  1. VCHK(ICPTPRE,ICPTVER,ICPTQUIT,ICPTCOMP) ; Check versions needed.
  1. ;
  1. NEW ICPTV
  1. S ICPTV=$$VERSION^XPDUTL(ICPTPRE)
  1. W !,$$CJ^XLFSTR("Need "_$S(ICPTCOMP="<":"at least ",1:"")_ICPTPRE_" v "_ICPTVER_"....."_ICPTPRE_" v "_ICPTV_" Present",IOM)
  1. I @(ICPTV_ICPTCOMP_ICPTVER) D SORRY(ICPTQUIT) Q 0
  1. Q 1
  1. INSTALLD(ICPT) ;EP; Determine if patch was installed, where ICPT is
  1. ; the name of the INSTALL. E.g "AVA*93.2*12".
  1. ;
  1. NEW DIC,X,Y
  1. ; lookup package.
  1. S X=$P(ICPT,"*",1)
  1. S DIC="^DIC(9.4,",DIC(0)="FM",D="C"
  1. D IX^DIC
  1. I Y<1 Q 0
  1. ; lookup version.
  1. S DIC=DIC_+Y_",22,",X=$P(ICPT,"*",2)
  1. D ^DIC
  1. I Y<1 Q 0
  1. ; lookup patch.
  1. S DIC=DIC_+Y_",""PAH"",",X=$P(ICPT,"*",3)
  1. D ^DIC
  1. I Y<1 S P=DIC_"""B"","_X_")" I $O(@P)'="" S Y=1
  1. I Y>0 W !,$$CJ^XLFSTR("Need at least "_ICPT_"....."_ICPT_" Present",IOM)
  1. I Y<0 W !,$$CJ^XLFSTR("Need at least "_ICPT_".....",IOM)
  1. Q $S(Y<1:0,1:1)
  1. ; -------------------------------------------
  1. INTROE ; Intro text during KIDS Environment check.
  1. ;; Distribution contains VA ICPT patches 38 through 57.
  1. ;; Patch is required for Lexicon IHS patch 1002.
  1. ;;
  1. ;;
  1. ;;###
  1. ;
  1. INTROI ; Intro text during KIDS Install.
  1. ;;A standard message will be produced by this update.
  1. ;;
  1. ;;If you run interactively, results are displayed on your screen,
  1. ;;in the mail message and in the INSTALL file.
  1. ;;If you queue to TaskMan, please read the mail message for results of
  1. ;;this update, and remember not to Q to the HOME device.
  1. ;;###