source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURXENV.m@ 862

Last change on this file since 862 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

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