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

GMRVXENV.m

Go to the documentation of this file.
  1. GMRVXENV ;HIRMFO/RM-ENVIRONMENT CHECK FOR VITALS ;7/18/96
  1. ;;4.0;Vitals/Measurements;;Apr 25, 1997
  1. EN1 ; environment check for the vitals package
  1. N GMRV
  1. S GMRV=+$$VERSION^XPDUTL("REGISTRATION") I GMRV<5.3 W !!,"PIMS (MAS) V5.3 OR GREATER IS REQUIRED - INSTALL ABORTED!" S XPDABORT=2 Q
  1. S GMRV=+$$VERSION^XPDUTL("GMRV") I GMRV>0,GMRV<3 W !!,"GEN. MED. REC. - VITALS V3.0 is required",!,"prior to the installation of V4.0 - INSTALL ABORTED!" S XPDABORT=2 Q
  1. I GMRV=3,+$$PATCH^XPDUTL("GMRV*3.0*3")=0 W !!,"GMRV*3*3 is required prior to the installation of v4.0 - Install aborted!" S XPDABORT=2 Q
  1. ;
  1. Q:+$$VERSION^XPDUTL("GMRV")'>0 ;quit if virgin install
  1. K GMRVIEN,GMRVERR
  1. ; how many V/M entries in Package File (#9.4)
  1. D FIND^DIC(9.4,"","","X","GMRV","","C","","","GMRVIEN","GMRVERR")
  1. ; quit if FileMan lookup errors out
  1. I +$G(GMRVERR("DIERR")) D S GMRVSTOP=1 D KILL Q
  1. .K GMRVMSG
  1. .S GMRVMSG(1)="Error trying to lookup Vitals/Measurements in the PACKAGE (#9.4) file."
  1. .S GMRVMSG(2)="Halting."
  1. .D BMES^XPDUTL(.GMRVMSG)
  1. .Q
  1. ; delete duplicates
  1. ; keep GEN. MED. REC. - VITALS entry
  1. S GMRVSEQ=0
  1. F S GMRVSEQ=$O(GMRVIEN("DILIST",1,GMRVSEQ)) Q:GMRVSEQ'>0 D
  1. . S GMRVNAME=$G(GMRVIEN("DILIST",1,GMRVSEQ)) Q:GMRVNAME=""
  1. . I GMRVNAME="GEN. MED. REC. - VITALS" Q
  1. . S DA=$G(GMRVIEN("DILIST",2,GMRVSEQ))
  1. . I DA S DIK="^DIC(9.4," D ^DIK
  1. . Q
  1. KILL ;
  1. S:$G(GMRVSTOP) XPDABORT=2 ;don't install transport global/leave in ^XTMP
  1. K DA,DIK,GMRVERR,GMRVIEN,GMRVMSG,GMRVNAME,GMRVSEQ,X,Y
  1. Q