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

FBPRE35.m

Go to the documentation of this file.
  1. FBPRE35 ;AISC/DMK-PRE-INIT FOR FEE BASIS ;5/24/94 09:25
  1. ;;3.5;FEE BASIS;;JAN 30, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;CHECK DUZ and DUZ(0)
  1. I $S('($D(DUZ)#2):1,'($D(DUZ(0))#2):1,'DUZ:1,1:0) W *7,!!,"*** DUZ and DUZ(0) must be defined as a valid user to initialize. ***",!! K DIFQ Q
  1. I DUZ(0)'="@" W *7,!!,"You must have programmer access (DUZ(0)='@') before running FBINIT.",!! K DIFQ Q
  1. ;
  1. ;check for routine XPDUTL (part of kernel tool kit 7.2
  1. S X="XPDUTL" X ^%ZOSF("TEST") I '$T D K DIFQ Q
  1. .W *7,!,"Routine XPDUTL, part of Kernel Tool Kit 7.2 was not found on",!,"your system. This must be installed prior to installing this",!,"version of Fee Basis.",!
  1. ;
  1. ;check version of Fee Basis. If Fee is installed, must be version 3.0.
  1. S X=+$$VERSION^XPDUTL("FB") I X,X<3 D Q
  1. .W *7,!,"You must have Fee Basis Version 3.0 installed prior to installing version 3.5",! K DIFQ
  1. I $D(^FBAA(161.81,6)) S X=$O(^FBAA(161.81,"B","CONTRACT HOSPITAL",0)) I X D
  1. .N DA,DIE,DIC,DR
  1. .S DA=X,DIE="^FBAA(161.81,",DR=".01///"_"NON-VA HOSPITAL" D ^DIE
  1. ;
  1. VER ;determine appropriate version number
  1. N FBI,FBV,FBVNEW,FBX,FBY
  1. S FBI=1 F S FBV=$P($T(V+FBI),";;",2) Q:FBV="END" S FBI=FBI+1,FBVNEW=$P(FBV,";",2),FBX=$P(FBV,";") D Q:'$D(DIFQ)
  1. .S X=+$$VERSION^XPDUTL(FBX) D:X'>0 MESS1 K:X'>0 DIFQ I X>0,X<FBVNEW D MESS2 K DIFQ
  1. ;
  1. CLEANUP ;driver to cleanup package file entries.
  1. N I,X
  1. F I=1:1 S X=$P($T(OLDPKG+I),";;",2) Q:'$L(X) D DELPKG(X)
  1. ;
  1. ;driver to queue data for transmission before install
  1. I $G(DIFQ),+$G(^DD(161,0,"VR"))=3,+$O(^FBAA(161.25,0)) D
  1. .D RTRAN^FBAAV0
  1. ;
  1. Q
  1. ;
  1. MESS1 W !!,"Check your package file for the ",FBX," entry. Unable to determine version."
  1. Q
  1. ;
  1. MESS2 W !!,"Your version of the ",FBX," must be at least ",FBVNEW," to install this version of FEE.",*7
  1. Q
  1. ;
  1. V ;;package namespace;version number
  1. ;;DGYA;5.0
  1. ;;DG;5.3
  1. ;;XU;7.1
  1. ;;XT;7.2
  1. ;;IB;2.0
  1. ;;END
  1. ;
  1. DELPKG(X) ;pass in x equal to the namespace you want deleted from
  1. ;the package file (9.4). Called to clean-up prior version init
  1. ;patches, namespace changes, etc.
  1. Q:'$L(X)
  1. N DIC,DIK,D,DA,Y
  1. S DIC="^DIC(9.4,",DIC(0)="",D="C" D IX^DIC Q:'+Y
  1. S DA=+Y,DIK=DIC
  1. D ^DIK
  1. Q
  1. OLDPKG ;entries to be deleted from the package file.
  1. ;;FBBA