source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMV5ENV.m@ 1806

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1GMV5ENV ;HIOFO/FT-GMRV*5*5 ENVIRONMENT CHECK ROUTINE ;11/23/04 11:21
2 ;;5.0;GEN. MED. REC. - VITALS;**5**;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10048 - PACKAGE file (9.4) (supported)
6 ; #10141 - ^XPDUTL calls (supported)
7 ;
8EN ; If FILE 9.4 entry is not "GEN. MED. REC. - VITALS", make it so.
9 ; If more than one entry for package in FILE 9.4 and none are
10 ; "GEN. MED. REC. - VITALS", then stop installation.
11 ;
12 N GMVARRAY,GMVCNT,GMVDA,GMVERR,GMVIEN,GMVLOOP,GMVMSG,GMVNAME,GMVNS,GMVOTHER,GMVYES
13 S (GMVCNT,GMVOTHER(0),GMVYES)=0,GMVNS="GMRV"
14 D FIND^DIC(9.4,"","","X",GMVNS,"","C","","","GMVARRAY","GMVERR")
15 S GMVLOOP=0
16 F S GMVLOOP=$O(GMVARRAY("DILIST",1,GMVLOOP)) Q:GMVLOOP'>0!(GMVYES>0) D
17 .S GMVNAME=$G(GMVARRAY("DILIST",1,GMVLOOP)) Q:GMVNAME=""
18 .I GMVNAME="GEN. MED. REC. - VITALS" D Q ;found the right entry
19 ..S GMVYES=+$G(GMVARRAY("DILIST",2,GMVLOOP))
20 ..Q
21 .I GMVNAME'="GEN. MED. REC. - VITALS" D Q ;wrong name
22 ..S GMVCNT=GMVCNT+1
23 ..S GMVOTHER(0)=GMVCNT
24 ..S GMVOTHER(GMVCNT)=+$G(GMVARRAY("DILIST",2,GMVLOOP))
25 ..Q
26 .Q
27 Q:GMVYES ;right entry found in FILE 9.4
28 ; If only one entry in FILE 9.4 and it isn't "GEN. MED. REC. - VITALS",
29 ; then change it.
30 I GMVOTHER(0)=1 D Q
31 .S GMVIEN=+$G(GMVOTHER(1))
32 .S GMVDA(9.4,GMVIEN_",",.01)="GEN. MED. REC. - VITALS"
33 .D FILE^DIE("","GMVDA","GMVERR")
34 .I $G(GMVERR) D Q
35 ..S GMVMSG="Could not change FILE 9.4 entry #"_GMVIEN_" to 'GEN. MED. REC. - VITALS'. Please log a NOIS."
36 ..D BMES^XPDUTL(GMVMSG)
37 ..S XPDQUIT=2 ;don't install patch, but leave in XTMP global
38 ..Q
39 .Q
40 I GMVOTHER(0)>1 D
41 .D BMES^XPDUTL("None of the FILE 9.4 entries have the correct name for the vitals package. Please log a NOIS.")
42 .S XPDQUIT=2 ;don't install patch, but leave in XTMP global
43 .Q
44 Q
Note: See TracBrowser for help on using the repository browser.