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

NURXENV.m

Go to the documentation of this file.
  1. NURXENV ;HIRMFO/FT-Environment Check for Nursing v4.0 ;1/21/97 14:26
  1. ;;4.0;NURSING SERVICE;;Apr 25, 1997
  1. EN1 ; Check environment to see if Nursing v4.0 should be installed.
  1. S NURPKG=+$$VERSION^XPDUTL("GMRG")
  1. I NURPKG<3 D BMES^XPDUTL("Text Generator v3.0 is required before you continue with this installation.") S NURSTOP=1
  1. S NURPKG=+$$VERSION^XPDUTL("REGISTRATION")
  1. I NURPKG<5.3 D BMES^XPDUTL("PIMS (MAS) v5.3 or greater is required before you continue with this installation.") S NURSTOP=1
  1. S NURPKG=+$$VERSION^XPDUTL("PRS")
  1. I NURPKG<3.5 D BMES^XPDUTL("PAID v3.5 or greater is required before you continue with this installation.") S NURSTOP=1
  1. S NURVER=+$$VERSION^XPDUTL("NUR")
  1. I NURVER>0,NURVER<3 D BMES^XPDUTL("You must have Nursing v3.0 loaded prior to the installation of v4.0") S NURSTOP=1
  1. I NURVER=3 D
  1. .D FIND^DIC(9.7,"","","X","NUR*3.0*1","","B","","","NURIEN","NURERROR")
  1. .I $O(NURIEN("DILIST",2,0))'>0 D BMES^XPDUTL("You must install NUR*3.0*1 prior to the installation of v4.0") S NURSTOP=1
  1. .D FIND^DIC(9.7,"","","X","NUR*3.0*3","","B","","","NURIEN","NURERROR")
  1. .I $O(NURIEN("DILIST",2,0))'>0 D BMES^XPDUTL("You must install NUR*3.0*3 prior to the installation of v4.0") S NURSTOP=1
  1. .Q
  1. NMSP ;
  1. Q:+$$VERSION^XPDUTL("NUR")>3 ;quit if install already ran.
  1. Q:'$D(^NURSF(210,0)) ;quit if virgin install
  1. K NURIEN,NURERROR
  1. D FIND^DIC(9.4,"","","X","NUR","","C","","","NURIEN","NURERROR")
  1. ; quit if FileMan lookup errors out
  1. I +$G(NURERROR("DIERR")) D S NURSTOP=1 D KILL Q
  1. .K NURMSG
  1. .S NURMSG(1)="Error trying to lookup NURSING SERVICE in the PACKAGE (#9.4) file."
  1. .S NURMSG(2)="Halting."
  1. .D BMES^XPDUTL(.NURMSG)
  1. .Q
  1. ;
  1. S (NURCNT,NURSEQ)=0
  1. F S NURSEQ=$O(NURIEN("DILIST",1,NURSEQ)) Q:NURSEQ'>0 D
  1. .S NURCNT=NURCNT+1
  1. .Q
  1. ; quit if more than one entry with 3 lettered namespace of NUR
  1. I NURCNT>1 D S NURSTOP=1 D KILL Q
  1. .K NURMSG
  1. .S NURMSG(1)="There is more than one PACKAGE (#9.4) file entry with"
  1. .S NURMSG(2)="NUR as its PREFIX (field #1) value. The NUR namespace"
  1. .S NURMSG(3)="must be associated with the NURSING SERVICE entry in"
  1. .S NURMSG(4)="File #9.4. Delete the extra entries and re-point those"
  1. .S NURMSG(5)="entries to the NURSING SERVICE entry."
  1. .S NURMSG(6)="If the namespace for the NURSING SERVICE entry is not"
  1. .S NURMSG(7)="the three letter namespace of NUR, then you must edit"
  1. .S NURMSG(8)="it so that it is NUR."
  1. .D BMES^XPDUTL(.NURMSG)
  1. .Q
  1. I NURCNT=1 D
  1. .S NURDA=+(NURIEN("DILIST",2,1))
  1. .I NURIEN("DILIST",1,1)'="NURSING SERVICE" D S NURSTOP=1 Q
  1. ..K NURMSG
  1. ..S NURMSG(1)="The name of the PACKAGE (#9.4) file entry for the NUR"
  1. ..S NURMSG(2)="namespace must be NURSING SERVICE. Please edit the"
  1. ..S NURMSG(3)="entry via FileMan to change the namespace of the NURSING"
  1. ..S NURMSG(4)="SERVICE entry to the 3 letter namespace of NUR before"
  1. ..S NURMSG(5)="continuing with this installation."
  1. ..S NURMSG(6)="Delete any other Package file entries that have a namespace"
  1. ..S NURMSG(7)="of NUR and re-point those entries to the NURSING SERVICE "
  1. ..S NURMSG(8)="entry."
  1. ..D BMES^XPDUTL(.NURMSG)
  1. ..Q
  1. .Q
  1. KILL ;
  1. S:$G(NURSTOP) XPDABORT=2 ;don't install transport global/leave in ^XTMP
  1. K DA,DIC,NURCNT,NURDA,NURERROR,NURIEN,NURMSG,NURPKG,NURSEQ,NURSTOP,NURVER,X,Y
  1. Q