Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ICD1812

ICD1812.m

Go to the documentation of this file.
  1. ICD1812 ;SLC/KER - ICD Environment Check ; 04/18/2004
  1. ;;18.0;DRG Grouper;**12**;Oct 20, 2000
  1. ;
  1. ; External References
  1. ; DBIA 10141 $$PATCH^XPDUTL
  1. ; DBIA 10141 BMES^XPDUTL
  1. ; DBIA 10141 MES^XPDUTL
  1. ;
  1. ENV ; Environment Check
  1. N PATCHES,PATCH,BUILD,ABORT,I
  1. W !," ICD GROUPER Code Text Descriptors (CTD)",! S XPDABORT="",BUILD="ICD*18.0*12" S ABORT=0
  1. S ABORT=$$PATCHES S:+ABORT'>0 ABORT=$$DATA(BUILD) S:+ABORT'>0 ABORT=$$VAR D:+ABORT>0 ABRT
  1. I $G(XPDABORT)="" K XPDABORT D OK
  1. Q
  1. ABRT ; Abort - All or nothing
  1. S XPDABORT=1,XPDQUIT=1,XPDQUIT("LEX*2.0*30")=1
  1. S XPDQUIT("ICD*18.0*12")=1,XPDQUIT("ICPT*6.0*19")=1
  1. S XPDQUIT("CTD UTIL 1.0")=1
  1. Q
  1. OK ; Environment is Ok
  1. Q:+($G(XPDENV))>0 D BM((" Environment for patch/build "_BUILD_" is ok")),M(" ")
  1. Q
  1. ;
  1. ; Checks
  1. PATCHES(X) ; Check Required Patches/Components
  1. Q:+($G(ABORT))>0 1 N PATCHES,I,INS
  1. S PATCHES="ICD*18.0*7;ICD*18.0*11"
  1. F I=1:1 Q:'$L($P($G(PATCHES),";",I)) S PATCH=$P($G(PATCHES),";",I) D Q:+($G(ABORT))>0
  1. . W !," Checking for ",PATCH S INS=$$PATCH^XPDUTL(PATCH) I +INS>0 H 1 W " - installed"
  1. . I 'INS D BM((" >>> "_PATCH_" is required and MUST be installed prior to this patch.")) W ! S ABORT=1
  1. Q:+($G(ABORT))>0 1 Q 0
  1. ;
  1. DATA(X) ; Check Required Data
  1. Q:+($G(ABORT))>0 1 Q:+($G(XPDENV))=0 0 N BUILD,BUILDI,CPD S BUILDI=$G(^LEXM(80,0,"BUILD")),BUILD=$G(X),CPD=$$CPD
  1. W !," Checking for ICD installed data" H:+CPD>0 1 W:+CPD>0 " - Installed"
  1. I +CPD'>0 D
  1. . I $L(BUILD),BUILD=BUILDI H 1 W " - Ready for installation"
  1. . I $L(BUILD),BUILD'=BUILDI D
  1. . . I '$L(BUILDI) D
  1. . . . D BM(" >>> Global ^LEXM either not found or incomplete.")
  1. . . . D M((" Expecting data for "_BUILD_"."))
  1. . . I $L(BUILDI) D
  1. . . . D BM(" >>> Global ^LEXM incorrect for this installation.")
  1. . . . D M((" Expecting data for "_BUILD_", found "_BUILDI_"."))
  1. . . W ! S ABORT=1
  1. . I '$L(BUILD) H 1 W " - Data not required"
  1. Q:+($G(ABORT))>0 1 Q 0
  1. ;
  1. VAR(X) ; Check Variables
  1. W !," Checking required environment variables"
  1. D HOME^%ZIS S U="^",DT=$$DT^XLFDT Q:+($G(ABORT))>0 1
  1. I (+($G(DUZ))>0)&($G(DUZ(0))="@") H 1 W " - ok"
  1. I '$G(DUZ)!($G(DUZ(0))'="@") D
  1. . D BM(" >>> Programming variables are not set up properly.") W ! S ABORT=1
  1. Q:+($G(ABORT))>0 1 Q 0
  1. ;
  1. CPD(X) ; Check Current Patched Data is installed
  1. N INS S INS=1
  1. S:'$D(^ICD9("AST"))!('$D(^ICD9("ADS")))!('$D(^ICD0("AST")))!('$D(^ICD0("ADS")))!('$D(^ICD("ADS"))) INS=0
  1. S:'$D(^ICD9(1,67,"B"))!('$D(^ICD9(1,68,"B"))) INS=0 S:'$D(^ICD0(1,67,"B"))!('$D(^ICD0(1,68,"B"))) INS=0
  1. S:'$D(^ICD(1,68,"B")) INS=0 S X=INS
  1. Q X
  1. ;
  1. ; Miscellaneous
  1. BM(X) ; Blank Line with Message
  1. D BMES^XPDUTL($G(X)) Q
  1. M(X) ; Message
  1. D MES^XPDUTL($G(X)) Q