source: FOIAVistA/trunk/r/CPT_HCPCS_CODES-ICPT-DGYA/ICPT619.m@ 1586

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1ICPT619 ;SLC/KER - ICPT Env. Check ; 04/18/2004
2 ;;6.0;CPT/HCPCS;**19**;May 19, 1997
3 ;
4 ; External References
5 ; DBIA 10141 $$PATCH^XPDUTL
6 ; DBIA 10141 BMES^XPDUTL
7 ; DBIA 10141 MES^XPDUTL
8 ;
9ENV ; Environment Check
10 N PATCHES,PATCH,BUILD,ABORT,I
11 W !," ICPT/HCPCS Code Text Descriptors (CTD)",! S XPDABORT="",BUILD="ICPT*6.0*19" S ABORT=0
12 S ABORT=$$PATCHES S:+ABORT'>0 ABORT=$$DATA(BUILD) S:+ABORT'>0 ABORT=$$VAR D:+ABORT>0 ABRT
13 I $G(XPDABORT)="" K XPDABORT D OK
14 Q
15ABRT ; Abort - All or nothing
16 S XPDABORT=1,XPDQUIT=1,XPDQUIT("LEX*2.0*30")=1
17 S XPDQUIT("ICD*18.0*12")=1,XPDQUIT("ICPT*6.0*19")=1
18 S XPDQUIT("CTD UTIL 1.0")=1
19 Q
20OK ; Environment is Ok
21 Q:+($G(XPDENV))>0 D BM((" Environment for patch/build "_BUILD_" is ok")),M(" ")
22 Q
23 ;
24 ; Checks
25PATCHES(X) ; Check Required Patches/Components
26 Q:+($G(ABORT))>0 1 N PATCHES,I,INS
27 S PATCHES="ICPT*6.0*16"
28 F I=1:1 Q:'$L($P($G(PATCHES),";",I)) S PATCH=$P($G(PATCHES),";",I) D Q:+($G(ABORT))>0
29 . W !," Checking for ",PATCH S INS=$$PATCH^XPDUTL(PATCH) I +INS>0 H 1 W " - installed"
30 . I 'INS D BM((" >>> "_PATCH_" is required and MUST be installed prior to this patch.")) W ! S ABORT=1
31 Q:+($G(ABORT))>0 1 Q 0
32 ;
33DATA(X) ; Check Required Data
34 Q:+($G(ABORT))>0 1 Q:+($G(XPDENV))=0 0 N BUILD,BUILDI,CPD S BUILDI=$G(^LEXM(81,0,"BUILD")),BUILD=$G(X),CPD=$$CPD
35 W !," Checking for ICD installed data" H:+CPD>0 1 W:+CPD>0 " - Installed"
36 I +CPD'>0 D
37 . I $L(BUILD),BUILD=BUILDI H 1 W " - Ready for installation"
38 . I $L(BUILD),BUILD'=BUILDI D
39 . . I '$L(BUILDI) D
40 . . . D BM(" >>> Global ^LEXM either not found or incomplete.")
41 . . . D M((" Expecting data for "_BUILD_"."))
42 . . I $L(BUILDI) D
43 . . . D BM(" >>> Global ^LEXM incorrect for this installation.")
44 . . . D M((" Expecting data for "_BUILD_", found "_BUILDI_"."))
45 . . W ! S ABORT=1
46 . I '$L(BUILD) H 1 W " - Data not required"
47 Q:+($G(ABORT))>0 1 Q 0
48 ;
49VAR(X) ; Check Variables
50 W !," Checking required environment variables"
51 D HOME^%ZIS S U="^",DT=$$DT^XLFDT Q:+($G(ABORT))>0 1
52 I (+($G(DUZ))>0)&($G(DUZ(0))="@") H 1 W " - ok"
53 I '$G(DUZ)!($G(DUZ(0))'="@") D
54 . D BM(" >>> Programming variables are not set up properly.") W ! S ABORT=1
55 Q:+($G(ABORT))>0 1 Q 0
56 ;
57CPD(X) ; Check Current Patched Data is installed
58 N INS S INS=1
59 S:'$D(^ICPT("AST"))!('$D(^ICPT("ADS")))!('$D(^DIC(81.3,"AST")))!('$D(^DIC(81.3,"ADS"))) INS=0
60 S:'$D(^ICPT(100,61,"B"))!('$D(^ICPT(100,62,"B"))) INS=0 S:'$D(^DIC(81.3,1,61,"B"))!('$D(^DIC(81.3,1,62,"B"))) INS=0
61 S X=INS Q X
62 ;
63 ; Miscellaneous
64BM(X) ; Blank Line with Message
65 D BMES^XPDUTL($G(X)) Q
66M(X) ; Message
67 D MES^XPDUTL($G(X)) Q
Note: See TracBrowser for help on using the repository browser.