source: FOIAVistA/tag/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORCENV.m@ 636

Last change on this file since 636 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1ORCENV ;SLC/MLI - Environment check routine ; 18 March 97
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3 ;
4 ; This is an environment check routine to check for
5 ; existence of all packages and patches required by
6 ; CPRS.
7 ;
8EN ; check environment
9 N ABORT,Y
10 S ABORT=0
11 S Y=$$VARIABLE() I Y S ABORT=1 G ENQ
12 S Y=$$CMOPCHK() I Y S ABORT=1
13 S Y=$$PATCHCHK() I Y S ABORT=1 G ENQ
14ENQ I ABORT S XPDABORT=2 ; aborts all transport globals in distribution
15 Q
16 ;
17 ;
18VARIABLE() ; check for crucial variables
19 N ABORT,I
20 D BMES^XPDUTL("Checking for key variables...")
21 S ABORT=0
22 F I="DUZ","DT","DTIME" I '($D(@I)#10) D
23 . S ABORT=1
24 . D MES^XPDUTL(" Missing key variable "_I)
25 I $G(DUZ(0))'="@" D
26 . S ABORT=1
27 . D MES^XPDUTL(" DUZ(0) must equal @ to install")
28 I ABORT D MES^XPDUTL(" These variables must be set before installing.")
29 I 'ABORT D MES^XPDUTL(" Key variables are defined properly.")
30 Q ABORT
31 ;
32 ;
33PATCHCHK() ; check for packages and patches
34 N ABORT,CURRENT,I,J,NMSP,OPTIONAL,PACKAGE,PATCH,VERSION,VIRGIN,X
35 S ABORT=0
36 D BMES^XPDUTL("Checking status of packages and patches...")
37 F I=1:1 S X=$P($T(LIST+I),";;",2) Q:X="QUIT" D
38 . N PATCHES,OK
39 . S OK=1,PACKAGE=$P(X,"^",1),NMSP=$P(X,"^",2)
40 . S VERSION=$P($P(X,"^",3),"*",1)
41 . S VIRGIN=($P(X,"^",2)["*"),OPTIONAL=(X["OPTIONAL")
42 . S PATCHES=$$NUMBERS($P(X,"^",4))
43 . D BMES^XPDUTL(" Checking "_PACKAGE_" v"_VERSION_"...")
44 . I VIRGIN,(+$$VERSION^XPDUTL(NMSP)=0) D Q
45 . . D MES^XPDUTL(" "_PACKAGE_" will be installed.")
46 . S CURRENT=+$$VERSION^XPDUTL(NMSP)
47 . I CURRENT<VERSION D Q
48 . . I 'CURRENT,OPTIONAL D Q
49 . . . D MES^XPDUTL(" optional "_PACKAGE_" is not on system...ok")
50 . . S ABORT=1
51 . . D MES^XPDUTL(" "_PACKAGE_" is not up to version "_VERSION)
52 . I CURRENT>VERSION D Q
53 . . D MES^XPDUTL(" "_PACKAGE_" is up to version "_CURRENT_"...OK")
54 . I PATCHES D Q
55 . . F J=1:1 S X=$P(PATCHES,",",J) Q:X="" D
56 . . . S PATCH=NMSP_"*"_VERSION_"*"_X
57 . . . I $$PATCH^XPDUTL(PATCH) Q
58 . . . S ABORT=1,OK=0
59 . . . D MES^XPDUTL(" Patch "_PATCH_" has not been installed")
60 . . I OK D MES^XPDUTL(" "_PACKAGE_" v"_VERSION_" is up to date")
61 . D MES^XPDUTL(" "_PACKAGE_" v"_VERSION_" is up to date")
62 Q ABORT
63 ;
64 ;
65LIST ; list of packages and patches to check
66 ;;Adverse Reaction Tracking^GMRA^4.0^4,6
67 ;;Consult/Request Tracking^GMRC^2.5*^14
68 ;;CMOP^PSX^2.0*^3^^^^OPTIONAL
69 ;;Dietetics^FH^5.0^
70 ;;Vitals^GMRV^3.0^3-5
71 ;;Health Level Seven^HL^1.6^8-9,17-18,21
72 ;;Health Summary^GMTS^2.7^3,7-9,12-13
73 ;;Kernel^XU^8.0^49,59
74 ;;Laboratory^LR^5.2^121^
75 ;;OE/RR^OR^2.5*^46,49
76 ;;Patient Care Encounter^PX^1.0^1-5,7-9,15
77 ;;Outpatient Pharmacy^PSO^6*
78 ;;Inpatient Pharmacy^PSJ^4.5*^42
79 ;;Radiology^RA^4.5^3-6,8-11
80 ;;Registration^DG^5.3^57,73,77-80,82,84-85,87-90,92-101,103-105,107,109-112,121,124
81 ;;Scheduling (including PCMM)^SD^5.3^27,39,41,42,44-49,53-61,63-65,67-75,78,79,84-88,93
82 ;;RPC Broker^XWB^1.1
83 ;;Text Integration Utility^TIU^1.0^1,3,4,7
84 ;;VA FileMan^DI^21.0^8,12,15,18-20,24-25,27,31,33,36
85 ;;Visit Tracking^VSIT^2.0^1
86 ;;QUIT
87 ;
88 ;
89NUMBERS(STRING) ; get list of numbers from string by parsing
90 N I,J,LIST,X
91 S LIST=""
92 F I=1:1 S X=$P(STRING,",",I) Q:X="" D
93 . I X["-" F J=$P(X,"-",1):1:$P(X,"-",2) S LIST=LIST_J_","
94 . E S LIST=LIST_X_","
95 Q LIST
96 ;
97 ;
98CMOPCHK() ; check to see if CMOP processing is inactivated
99 N Y
100 S Y=$D(^PSX(550,"C"))
101 D BMES^XPDUTL("Checking for active CMOP transmissions...")
102 I Y D
103 . D MES^XPDUTL(" CMOP Currently Activated!!!")
104 . D MES^XPDUTL(" You must inactivate CMOP before installing CPRS!")
105 E D
106 . D MES^XPDUTL(" CMOP is inactivated...ok to continue")
107 Q Y
Note: See TracBrowser for help on using the repository browser.