NURXENV ;HIRMFO/FT-Environment Check for Nursing v4.0 ;1/21/97 14:26
;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ; Check environment to see if Nursing v4.0 should be installed.
S NURPKG=+$$VERSION^XPDUTL("GMRG")
I NURPKG<3 D BMES^XPDUTL("Text Generator v3.0 is required before you continue with this installation.") S NURSTOP=1
S NURPKG=+$$VERSION^XPDUTL("REGISTRATION")
I NURPKG<5.3 D BMES^XPDUTL("PIMS (MAS) v5.3 or greater is required before you continue with this installation.") S NURSTOP=1
S NURPKG=+$$VERSION^XPDUTL("PRS")
I NURPKG<3.5 D BMES^XPDUTL("PAID v3.5 or greater is required before you continue with this installation.") S NURSTOP=1
S NURVER=+$$VERSION^XPDUTL("NUR")
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
I NURVER=3 D
.D FIND^DIC(9.7,"","","X","NUR*3.0*1","","B","","","NURIEN","NURERROR")
.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
.D FIND^DIC(9.7,"","","X","NUR*3.0*3","","B","","","NURIEN","NURERROR")
.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
.Q
NMSP ;
Q:+$$VERSION^XPDUTL("NUR")>3 ;quit if install already ran.
Q:'$D(^NURSF(210,0)) ;quit if virgin install
K NURIEN,NURERROR
D FIND^DIC(9.4,"","","X","NUR","","C","","","NURIEN","NURERROR")
; quit if FileMan lookup errors out
I +$G(NURERROR("DIERR")) D S NURSTOP=1 D KILL Q
.K NURMSG
.S NURMSG(1)="Error trying to lookup NURSING SERVICE in the PACKAGE (#9.4) file."
.S NURMSG(2)="Halting."
.D BMES^XPDUTL(.NURMSG)
.Q
;
S (NURCNT,NURSEQ)=0
F S NURSEQ=$O(NURIEN("DILIST",1,NURSEQ)) Q:NURSEQ'>0 D
.S NURCNT=NURCNT+1
.Q
; quit if more than one entry with 3 lettered namespace of NUR
I NURCNT>1 D S NURSTOP=1 D KILL Q
.K NURMSG
.S NURMSG(1)="There is more than one PACKAGE (#9.4) file entry with"
.S NURMSG(2)="NUR as its PREFIX (field #1) value. The NUR namespace"
.S NURMSG(3)="must be associated with the NURSING SERVICE entry in"
.S NURMSG(4)="File #9.4. Delete the extra entries and re-point those"
.S NURMSG(5)="entries to the NURSING SERVICE entry."
.S NURMSG(6)="If the namespace for the NURSING SERVICE entry is not"
.S NURMSG(7)="the three letter namespace of NUR, then you must edit"
.S NURMSG(8)="it so that it is NUR."
.D BMES^XPDUTL(.NURMSG)
.Q
I NURCNT=1 D
.S NURDA=+(NURIEN("DILIST",2,1))
.I NURIEN("DILIST",1,1)'="NURSING SERVICE" D S NURSTOP=1 Q
..K NURMSG
..S NURMSG(1)="The name of the PACKAGE (#9.4) file entry for the NUR"
..S NURMSG(2)="namespace must be NURSING SERVICE. Please edit the"
..S NURMSG(3)="entry via FileMan to change the namespace of the NURSING"
..S NURMSG(4)="SERVICE entry to the 3 letter namespace of NUR before"
..S NURMSG(5)="continuing with this installation."
..S NURMSG(6)="Delete any other Package file entries that have a namespace"
..S NURMSG(7)="of NUR and re-point those entries to the NURSING SERVICE "
..S NURMSG(8)="entry."
..D BMES^XPDUTL(.NURMSG)
..Q
.Q
KILL ;
S:$G(NURSTOP) XPDABORT=2 ;don't install transport global/leave in ^XTMP
K DA,DIC,NURCNT,NURDA,NURERROR,NURIEN,NURMSG,NURPKG,NURSEQ,NURSTOP,NURVER,X,Y
Q
NURXENV ;HIRMFO/FT-Environment Check for Nursing v4.0 ;1/21/97 14:26
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ; Check environment to see if Nursing v4.0 should be installed.
+1 SET NURPKG=+$$VERSION^XPDUTL("GMRG")
+2 IF NURPKG<3
DO BMES^XPDUTL("Text Generator v3.0 is required before you continue with this installation.")
SET NURSTOP=1
+3 SET NURPKG=+$$VERSION^XPDUTL("REGISTRATION")
+4 IF NURPKG<5.3
DO BMES^XPDUTL("PIMS (MAS) v5.3 or greater is required before you continue with this installation.")
SET NURSTOP=1
+5 SET NURPKG=+$$VERSION^XPDUTL("PRS")
+6 IF NURPKG<3.5
DO BMES^XPDUTL("PAID v3.5 or greater is required before you continue with this installation.")
SET NURSTOP=1
+7 SET NURVER=+$$VERSION^XPDUTL("NUR")
+8 IF NURVER>0
IF NURVER<3
DO BMES^XPDUTL("You must have Nursing v3.0 loaded prior to the installation of v4.0")
SET NURSTOP=1
+9 IF NURVER=3
Begin DoDot:1
+10 DO FIND^DIC(9.7,"","","X","NUR*3.0*1","","B","","","NURIEN","NURERROR")
+11 IF $ORDER(NURIEN("DILIST",2,0))'>0
DO BMES^XPDUTL("You must install NUR*3.0*1 prior to the installation of v4.0")
SET NURSTOP=1
+12 DO FIND^DIC(9.7,"","","X","NUR*3.0*3","","B","","","NURIEN","NURERROR")
+13 IF $ORDER(NURIEN("DILIST",2,0))'>0
DO BMES^XPDUTL("You must install NUR*3.0*3 prior to the installation of v4.0")
SET NURSTOP=1
+14 QUIT
End DoDot:1
NMSP ;
+1 ;quit if install already ran.
IF +$$VERSION^XPDUTL("NUR")>3
QUIT
+2 ;quit if virgin install
IF '$DATA(^NURSF(210,0))
QUIT
+3 KILL NURIEN,NURERROR
+4 DO FIND^DIC(9.4,"","","X","NUR","","C","","","NURIEN","NURERROR")
+5 ; quit if FileMan lookup errors out
+6 IF +$GET(NURERROR("DIERR"))
Begin DoDot:1
+7 KILL NURMSG
+8 SET NURMSG(1)="Error trying to lookup NURSING SERVICE in the PACKAGE (#9.4) file."
+9 SET NURMSG(2)="Halting."
+10 DO BMES^XPDUTL(.NURMSG)
+11 QUIT
End DoDot:1
SET NURSTOP=1
DO KILL
QUIT
+12 ;
+13 SET (NURCNT,NURSEQ)=0
+14 FOR
SET NURSEQ=$ORDER(NURIEN("DILIST",1,NURSEQ))
IF NURSEQ'>0
QUIT
Begin DoDot:1
+15 SET NURCNT=NURCNT+1
+16 QUIT
End DoDot:1
+17 ; quit if more than one entry with 3 lettered namespace of NUR
+18 IF NURCNT>1
Begin DoDot:1
+19 KILL NURMSG
+20 SET NURMSG(1)="There is more than one PACKAGE (#9.4) file entry with"
+21 SET NURMSG(2)="NUR as its PREFIX (field #1) value. The NUR namespace"
+22 SET NURMSG(3)="must be associated with the NURSING SERVICE entry in"
+23 SET NURMSG(4)="File #9.4. Delete the extra entries and re-point those"
+24 SET NURMSG(5)="entries to the NURSING SERVICE entry."
+25 SET NURMSG(6)="If the namespace for the NURSING SERVICE entry is not"
+26 SET NURMSG(7)="the three letter namespace of NUR, then you must edit"
+27 SET NURMSG(8)="it so that it is NUR."
+28 DO BMES^XPDUTL(.NURMSG)
+29 QUIT
End DoDot:1
SET NURSTOP=1
DO KILL
QUIT
+30 IF NURCNT=1
Begin DoDot:1
+31 SET NURDA=+(NURIEN("DILIST",2,1))
+32 IF NURIEN("DILIST",1,1)'="NURSING SERVICE"
Begin DoDot:2
+33 KILL NURMSG
+34 SET NURMSG(1)="The name of the PACKAGE (#9.4) file entry for the NUR"
+35 SET NURMSG(2)="namespace must be NURSING SERVICE. Please edit the"
+36 SET NURMSG(3)="entry via FileMan to change the namespace of the NURSING"
+37 SET NURMSG(4)="SERVICE entry to the 3 letter namespace of NUR before"
+38 SET NURMSG(5)="continuing with this installation."
+39 SET NURMSG(6)="Delete any other Package file entries that have a namespace"
+40 SET NURMSG(7)="of NUR and re-point those entries to the NURSING SERVICE "
+41 SET NURMSG(8)="entry."
+42 DO BMES^XPDUTL(.NURMSG)
+43 QUIT
End DoDot:2
SET NURSTOP=1
QUIT
+44 QUIT
End DoDot:1
KILL ;
+1 ;don't install transport global/leave in ^XTMP
IF $GET(NURSTOP)
SET XPDABORT=2
+2 KILL DA,DIC,NURCNT,NURDA,NURERROR,NURIEN,NURMSG,NURPKG,NURSEQ,NURSTOP,NURVER,X,Y
+3 QUIT