source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMV2E.m@ 1154

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1PXRMV2E ; SLC/PKR - Environment check for PXRM*2.0. ;12/17/2004
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 ;
4 ;===============================================================
5ENVCHK ;Perform an environment check. Check for the existence of the globals
6 ;that are indexed. If they exist then the index for that global must
7 ;be built before v2.0 can be installed.
8 N DIR,DIROUT,DIRUT,DTOUT,DUOUT,GNAME,NE,NG,NI,TEXTG,TEXTI,X,Y
9 ;Ask if this is a Legacy system, if it is then don't require the
10 ;index being built.
11 S DIR(0)="Y"_U_"AO",DIR("B")="NO"
12 W !,"Is this a Legacy system?"
13 D ^DIR
14 I Y Q
15 S (NG,NI)=2
16 ;
17 ;LABORATORY TEST
18 D CHECK(63,.NG,.TEXTG,.NI,.TEXTI)
19 ;
20 ;MENTAL HEALTH
21 D CHECK(601.2,.NG,.TEXTG,.NI,.TEXTI)
22 ;
23 ;ORDERS
24 D CHECK(100,.NG,.TEXTG,.NI,.TEXTI)
25 ;
26 ;PTF
27 D CHECK(45,.NG,.TEXTG,.NI,.TEXTI)
28 ;
29 ;PHARMACY PATIENT
30 D CHECK(55,.NG,.TEXTG,.NI,.TEXTI)
31 ;
32 ;PRESCRIPTION
33 D CHECK(52,.NG,.TEXTG,.NI,.TEXTI)
34 ;
35 ;PROBLEM LIST
36 D CHECK(9000011,.NG,.TEXTG,.NI,.TEXTI)
37 ;
38 ;RADIOLOGY
39 D CHECK(70,.NG,.TEXTG,.NI,.TEXTI)
40 ;
41 ;V CPT
42 D CHECK(9000010.18,.NG,.TEXTG,.NI,.TEXTI)
43 ;
44 ;V EXAM
45 D CHECK(9000010.13,.NG,.TEXTG,.NI,.TEXTI)
46 ;
47 ;V IMMUNIZATION
48 D CHECK(9000010.11,.NG,.TEXTG,.NI,.TEXTI)
49 ;
50 ;V PATIENT ED
51 D CHECK(9000010.16,.NG,.TEXTG,.NI,.TEXTI)
52 ;
53 ;V POV
54 D CHECK(9000010.07,.NG,.TEXTG,.NI,.TEXTI)
55 ;
56 ;V SKIN TEST
57 D CHECK(9000010.12,.NG,.TEXTG,.NI,.TEXTI)
58 ;
59 ;VITAL MEASUREMENT
60 D CHECK(120.5,.NG,.TEXTG,.NI,.TEXTI)
61 ;
62 I NI>2 S XPDABORT=1
63 I $G(XPDABORT) D
64 . S TEXTI(1)="Clinical Reminders v2.0 cannot be installed because the following indexes"
65 . S TEXTI(2)="are not built:"
66 . D EN^DDIOL(.TEXTI)
67 E D
68 . S TEXTI(1)="Environment check passed, ok to install Clinical Reminders v2.0"
69 . D EN^DDIOL(.TEXTI)
70 ;
71 I NG>2 D
72 . S TEXTG(1)=" "
73 . I NG=3 S TEXTG(2)="The following global does not have data or does not exist:"
74 . I NG>3 S TEXTG(2)="The following globals do not have data or do not exist:"
75 . S NG=NG+1,TEXTG(NG)="Because of this Clinical Reminder evaluation may not operate correctly on your system!"
76 . D EN^DDIOL(.TEXTG)
77 Q
78 ;
79 ;===============================================================
80CHECK(FNUM,NG,TEXTG,NI,TEXTI) ;
81 N GNAME,NE
82 S GNAME=$$GET1^DID(FNUM,"","","NAME")
83 S NE=$$GET1^DID(FNUM,"","","ENTRIES")
84 I NE="" S NG=NG+1,TEXTG(NG)=" "_GNAME_" does not exist"
85 I NE=0 S NG=NG+1,TEXTG(NG)=" "_GNAME_" does not have any data"
86 I (NE>0)&'$D(^PXRMINDX(FNUM,"DATE BUILT")) S NI=NI+1,TEXTI(NI)=" "_GNAME
87 Q
88 ;
Note: See TracBrowser for help on using the repository browser.