source: WorldVistAEHR/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAIENVCK.m@ 1046

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

initial load of WorldVistAEHR

File size: 3.1 KB
Line 
1RAIENVCK ;HIRMFO/GJC-Environmental Check Routine ;5/16/97 08:50
2VERSION ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
3EN1 ; Version 5.0 environment check routine for Radiology/Nuclear Medicine.
4 I $S($D(DUZ)[0:1,$D(DUZ(0))[0:1,'DUZ:1,1:0) D S XPDABORT=2 Q
5 . W !?5,"DUZ and DUZ(0) must be defined as an active user to initialize"
6 . W !?5,"the RADIOLOGY/NUCLEAR MEDICINE v",$P($T(+2),";",3)
7 . W " software.",$C(7)
8 . Q
9 I DUZ(0)'="@" D S XPDABORT=2 Q
10 . W !?5,"You must have programmer access i.e, DUZ(0)=@, to run this "
11 . W "init!",$C(7)
12 . Q
13 Q:$G(^RADPT(0))']"" ; virgin install, quit!
14 ; Check for the two imaging types which will use radiopharmaceuticals.
15 ; Abort the install if they are not present.
16 S RAFLG=0
17 I +$G(^DD(70,0,"VR"))<5.0 D
18 . F RAI=1:1 S RATXT=$P($T(TEXT+RAI),";;",2) Q:RATXT']"" D
19 .. S RATXT(1)=$P(RATXT,";"),RATXT(2)=$P(RATXT,";",2)
20 .. I '$D(^RA(79.2,"C",RATXT(2))) D
21 ... S (RAFLG,XPDABORT)=2 ; abort install, don't remove from ^XTMP
22 ... W !!?3,"The Imaging type abbreviated as: "_RATXT(2)
23 ... W !?3,"is missing. ("_RATXT(1)_")"
24 ... Q
25 .. Q
26 . Q
27 I RAFLG D ERR792
28 S RA787=+$O(^RA(78.7,"B","VERIFIED DATE",0))
29 I $G(^RA(78.7,RA787,"E"))'["RAVERFDT" D
30 . W !!?3,"Patch 2 (RA*4.5*2) must be installed before"
31 . W " RADIOLOGY/NUCLEAR",!?3,"MEDICINE v",$P($T(+2),";",3)
32 . W " can be installed!",$C(7) S XPDABORT=2
33 . Q
34 I '$$PATCH^XPDUTL("RA*4.5*10") D
35 . W !!?3,"Patch 10 (RA*4.5*10) must be installed before"
36 . W " RADIOLOGY/NUCLEAR",!?3,"MEDICINE v",$P($T(+2),";",3)
37 . W " can be installed!",$C(7) S XPDABORT=2
38 . Q
39 I '$$CLEANUP() D
40 . W !!?3,"RADIOLOGY/NUCLEAR MEDICINE CLEANUP v",$P($T(+2),";",3)
41 . W " must be loaded and reside",!?3,"in the transport global before"
42 . W " RADIOLOGY/NUCLEAR MEDICINE v",$P($T(+2),";",3)
43 . W !?3,"can be installed!",!,$C(7) S XPDABORT=2
44 . Q
45XIT ; Exit point, kill variables then quit application.
46 K RA787,RAFLG,RAI,RATXT
47 Q
48CLEANUP() ; Check if the 'Radiology/Nuclear Medicine Cleanup 5.0'
49 ; distribution has been loaded and is resident in the transport global.
50 ; Output: 0 if not loaded -OR- not resident in transport global
51 ; 1 if ok to proceed (loaded & transport global present)
52 N %,DIC,RASTAT,X,Y
53 S X="RADIOLOGY/NUCLEAR MEDICINE CLEANUP "_$P($T(+2),";",3)
54 S DIC="^XPD(9.7,",DIC(0)="O" D ^DIC Q:+Y'>0 0 ;cleanup missing
55 S RASTAT=$$GET1^DIQ(9.7,+Y,.02,"I") ; status of distribution
56 Q:RASTAT'=0 0 ; status must be 'loaded from distribution'
57 Q:'$D(^XTMP("XPDI",+Y,"BLD")) 0 ; missing from transport global
58 Q 1
59ERR792 ; Error messages for an incomplete Imaging Type file. Needed are the
60 ; imaging type abbreviations for those imaging types which will use
61 ; radiopharmaceuticals.
62 W !!?3,"The Imaging Type file must have these imaging type"
63 W !?3,"abbreviations before the package can be updated from"
64 W !?3,"version 4.5 to 5.0:",!
65 W !?5,"CARD - Cardiology Studies (Nuc Med)"
66 W !?5,"NM - Nuclear Medicine"
67 W !!?3,"Package installation cannot proceed. Contact the Radiology/"
68 W !?3,"Nuclear Medicine ADPAC for assistance.",$C(7)
69 Q
70TEXT ; Check I-Type & abbreviation of file 79.2 against those listed below.
71 ;;CARDIOLOGY STUDIES (NUC MED);CARD
72 ;;NUCLEAR MEDICINE;NM
73 ;;
Note: See TracBrowser for help on using the repository browser.