BAREV189 ; IHS/SD/LSL - ENVIRONMENT CHECK V1.8 PATCH 9; 11/05/2008
;;1.8;IHS ACCOUNTS RECEIVABLE;**9**;APR 27,2007
;NEW ROUTINE BAR*1.8*9 D150
;BAR*1.8*8 WAS REPLACED WITH BAR*1.8*9 DUE TO ERROR IN BAREV188;MRS:BAR*1.8*9
;
K XPDQUIT ;CLEAR FLAG
I '$G(DUZ) D Q
. W !,"DUZ UNDEFINED OR 0"
. D SORRY(2)
;
I '$L($G(DUZ(0))) D Q
. W !,"DUZ(0) UNDEFINED OR NULL"
. D SORRY(2)
;
S X=$P(^VA(200,DUZ,0),U) ;User's name
W !!,$$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)
W !!,$$CJ^XLFSTR("Checking Environment for "_$P($T(+2),";",4)_" V "_$P($T(+2),";",3),IOM)
;
N BARXU
S BARXU=$$INSTALLD("XU","8.0",1011) ;Find current Kernel version and patch
I $P(BARXU,"*",2)<8 S BARXU=0
I $P(BARXU,"*",3)'=1011 S BARXU=0
W !,$$CJ^XLFSTR("Need at least XU v8.0 Patch 1011..... "_$S(BARXU=0:"NOT ",1:"")_"Present",IOM)
I BARXU=0 D SORRY(2)
;
I $$VCHK("DI","21.0",2) ;FileMan V21.0
;
N BARXB
S BARXB=$$INSTALLD("XB","3.0",11) ;Find current IHS utilities version and patch
I $P(BARXB,"*",2)<3 S BARXB=0
I $P(BARXU,"*",3)'=11 S BARXU=0
W !,$$CJ^XLFSTR("Need at least XB v3.0 Patch 11..... "_$S(BARXB=0:"NOT ",1:"")_"Present",IOM)
I BARXB=0 D SORRY(2)
;
I $$VCHK("BAR","1.8",2) ;Accounts Receivable V1.8
;
N BARABM
S BARABM=$$INSTALLD("ABM","2.5",13)
I $P(BARABM,"*",2)<2.5 S BARABM=0
I $P(BARABM,"*",3)'=13 S BARABM=0
W !,$$CJ^XLFSTR("Need at least Third Party Billing v2.5 Patch 13..... "_$S(BARABM=0:"NOT ",1:"")_"Present",IOM)
I BARABM=0 D SORRY(2)
;
N DA,DIC
S X="BAR"
S DIC="^DIC(9.4,"
S DIC(0)=""
S D="C"
D IX^DIC
I Y<0,$D(^DIC(9.4,"C","BAR")) D
. W !!,*7,*7,$$CJ^XLFSTR("You Have More Than One Entry In The",IOM)
. W !,$$CJ^XLFSTR("PACKAGE File with an ""BAR"" prefix.",IOM)
. W !,$$CJ^XLFSTR("One entry needs to be deleted.",IOM)
. D SORRY(2)
. Q
;
;A/R IS NO LONGER CUMULATIVE AFTER PATCH 6
;LAST CUMULATIVE PATCH WAS PATCH 6
N BAR,I
F I=6:1:7 D
.S BAR=$$INSTALLD("BAR","1.8",I)
.I $P(BAR,"*",3)'=I S BAR=0 D
..W !,$$CJ^XLFSTR("Need Accounts Receivable v1.8 Patch "_I_"..... "_$S(BAR=0:"NOT ",1:"")_"Present",IOM)
I BAR=0 D SORRY(2)
;
I $G(XPDQUIT) W !,$$CJ^XLFSTR("FIX IT! Before Proceeding.",IOM),!!,*7,*7,*7 Q
;
W !!,$$CJ^XLFSTR("ENVIRONMENT OK.",IOM)
D HELP^XBHELP("INTROE","BAREV188")
;
I $G(XPDENV)=1 D
. ; The following line prevents the "Disable Options..." and "Move
. ; Routines..." questions from being asked during the install.
. S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
. D HELP^XBHELP("INTROI","BAREV189")
. Q
;
I '$$DIR^XBDIR("E","","","","","",1) D SORRY(2)
Q
;
SORRY(X) ;
KILL DIFQ
S XPDQUIT=X
W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
Q
; ***
VCHK(BARPRE,BARVER,BARQUIT) ; Check versions needed.
;
N BARV
S BARV=$$VERSION^XPDUTL(BARPRE)
W !,$$CJ^XLFSTR("Need at least "_BARPRE_" v "_BARVER_"....."_BARPRE_" v "_BARV_" Present",IOM)
I BARV<BARVER KILL DIFQ S XPDQUIT=BARQUIT D SORRY(BARQUIT) Q 0
Q 1
; ***
INSTALLD(BARNM,BARVR,BARPT) ;EP ;RLT
; RLT - 04/05/05 - Per Don Jackson, modified this tag to use
; PATCH^XPDUTL. Removed the reverse $O, problem
; with XU patch numbers. VA (lower than 1000) and
; IHS patch numers (1000 and higher) not loaded
; in numerical order. No longer
; verifies that a lower version did not get
; reinstalled over a higher version.
N BARVNUM,BARPATCH
;1 get current version
S BARVNUM=$$VERSION^XPDUTL(BARNM)
I '+BARVNUM Q 0
;2 is needed patch loaded
S BARPATCH=$$PATCH^XPDUTL(BARNM_"*"_BARVR_"*"_BARPT)
I '+BARPATCH Q 0
Q BARNM_"*"_BARVNUM_"*"_BARPT
;
POST ;EP; CHECK AND CORRECT ZISH PARAMETER ENTRY
;
;IF ENTRY IS SET TO umftest THIS IS TEST SYSTEM - DO NOT UPDATE
N BAR,BARREC,BARS
F BARS="BAR UFMS F","BAR UFMS B" D
.S BAR=$O(^%ZIB(9888888.93,"B",BARS,""))
.S BARREC=$$GET1^DIQ(9888888.93,BAR_",",.03)
.Q:BARREC="ufmstest"
.S BARREC=$$GET1^DIQ(9888888.93,BAR_",",.02)
.Q:BARREC="quovadx-ie.DOMAIN.NAME"
.D BMES^XPDUTL("Updating "_BARS_" entry")
.D UP(BAR,BARS)
Q
;
UP(BAR,X) ;
K DIC,DIE,DA,DR,DIR
S DIC="^%ZIB(9888888.93,"
S DIC(0)="L"
D ^DIC
I +Y<0 W !,"UNABLE TO UPDATE ZISH PARAMETER ENTRY. TRY MANUALLY!!" Q
K DIC,DIE,DA,DR,DIR,DD,DO,DINUM
S DIE="^%ZIB(9888888.93,"
S DA=+Y
S TARGETIP="quovadx-ie.DOMAIN.NAME"
S DR=".02///^S X=TARGETIP"
D ^DIE
K DIC,DIE,DA,DR,DIR
Q
; ********************************************************************
INTROE ; Intro text during KIDS Environment check.
;;This distribution Modifies Accounts Receivable and does not contain
;;previous patch modifications for version 1.8.
;;
;; This patch is **not** cumulative.
;;
;;###
;;
;
INTROI ; Intro text during KIDS Install.
;;If you run interactively, results will be displayed on your screen,
;;and recorded in the entry in the INSTALL file.
;;If you queue to TaskMan, remember not to Q to the HOME device.
;;###
BAREV189 ; IHS/SD/LSL - ENVIRONMENT CHECK V1.8 PATCH 9; 11/05/2008
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**9**;APR 27,2007
+2 ;NEW ROUTINE BAR*1.8*9 D150
+3 ;BAR*1.8*8 WAS REPLACED WITH BAR*1.8*9 DUE TO ERROR IN BAREV188;MRS:BAR*1.8*9
+4 ;
+5 ;CLEAR FLAG
KILL XPDQUIT
+6 IF '$GET(DUZ)
Begin DoDot:1
+7 WRITE !,"DUZ UNDEFINED OR 0"
+8 DO SORRY(2)
End DoDot:1
QUIT
+9 ;
+10 IF '$LENGTH($GET(DUZ(0)))
Begin DoDot:1
+11 WRITE !,"DUZ(0) UNDEFINED OR NULL"
+12 DO SORRY(2)
End DoDot:1
QUIT
+13 ;
+14 ;User's name
SET X=$PIECE(^VA(200,DUZ,0),U)
+15 WRITE !!,$$CJ^XLFSTR("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,","),IOM)
+16 WRITE !!,$$CJ^XLFSTR("Checking Environment for "_$PIECE($TEXT(+2),";",4)_" V "_$PIECE($TEXT(+2),";",3),IOM)
+17 ;
+18 NEW BARXU
+19 ;Find current Kernel version and patch
SET BARXU=$$INSTALLD("XU","8.0",1011)
+20 IF $PIECE(BARXU,"*",2)<8
SET BARXU=0
+21 IF $PIECE(BARXU,"*",3)'=1011
SET BARXU=0
+22 WRITE !,$$CJ^XLFSTR("Need at least XU v8.0 Patch 1011..... "_$SELECT(BARXU=0:"NOT ",1:"")_"Present",IOM)
+23 IF BARXU=0
DO SORRY(2)
+24 ;
+25 ;FileMan V21.0
IF $$VCHK("DI","21.0",2)
+26 ;
+27 NEW BARXB
+28 ;Find current IHS utilities version and patch
SET BARXB=$$INSTALLD("XB","3.0",11)
+29 IF $PIECE(BARXB,"*",2)<3
SET BARXB=0
+30 IF $PIECE(BARXU,"*",3)'=11
SET BARXU=0
+31 WRITE !,$$CJ^XLFSTR("Need at least XB v3.0 Patch 11..... "_$SELECT(BARXB=0:"NOT ",1:"")_"Present",IOM)
+32 IF BARXB=0
DO SORRY(2)
+33 ;
+34 ;Accounts Receivable V1.8
IF $$VCHK("BAR","1.8",2)
+35 ;
+36 NEW BARABM
+37 SET BARABM=$$INSTALLD("ABM","2.5",13)
+38 IF $PIECE(BARABM,"*",2)<2.5
SET BARABM=0
+39 IF $PIECE(BARABM,"*",3)'=13
SET BARABM=0
+40 WRITE !,$$CJ^XLFSTR("Need at least Third Party Billing v2.5 Patch 13..... "_$SELECT(BARABM=0:"NOT ",1:"")_"Present",IOM)
+41 IF BARABM=0
DO SORRY(2)
+42 ;
+43 NEW DA,DIC
+44 SET X="BAR"
+45 SET DIC="^DIC(9.4,"
+46 SET DIC(0)=""
+47 SET D="C"
+48 DO IX^DIC
+49 IF Y<0
IF $DATA(^DIC(9.4,"C","BAR"))
Begin DoDot:1
+50 WRITE !!,*7,*7,$$CJ^XLFSTR("You Have More Than One Entry In The",IOM)
+51 WRITE !,$$CJ^XLFSTR("PACKAGE File with an ""BAR"" prefix.",IOM)
+52 WRITE !,$$CJ^XLFSTR("One entry needs to be deleted.",IOM)
+53 DO SORRY(2)
+54 QUIT
End DoDot:1
+55 ;
+56 ;A/R IS NO LONGER CUMULATIVE AFTER PATCH 6
+57 ;LAST CUMULATIVE PATCH WAS PATCH 6
+58 NEW BAR,I
+59 FOR I=6:1:7
Begin DoDot:1
+60 SET BAR=$$INSTALLD("BAR","1.8",I)
+61 IF $PIECE(BAR,"*",3)'=I
SET BAR=0
Begin DoDot:2
+62 WRITE !,$$CJ^XLFSTR("Need Accounts Receivable v1.8 Patch "_I_"..... "_$SELECT(BAR=0:"NOT ",1:"")_"Present",IOM)
End DoDot:2
End DoDot:1
+63 IF BAR=0
DO SORRY(2)
+64 ;
+65 IF $GET(XPDQUIT)
WRITE !,$$CJ^XLFSTR("FIX IT! Before Proceeding.",IOM),!!,*7,*7,*7
QUIT
+66 ;
+67 WRITE !!,$$CJ^XLFSTR("ENVIRONMENT OK.",IOM)
+68 DO HELP^XBHELP("INTROE","BAREV188")
+69 ;
+70 IF $GET(XPDENV)=1
Begin DoDot:1
+71 ; The following line prevents the "Disable Options..." and "Move
+72 ; Routines..." questions from being asked during the install.
+73 SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+74 DO HELP^XBHELP("INTROI","BAREV189")
+75 QUIT
End DoDot:1
+76 ;
+77 IF '$$DIR^XBDIR("E","","","","","",1)
DO SORRY(2)
+78 QUIT
+79 ;
SORRY(X) ;
+1 KILL DIFQ
+2 SET XPDQUIT=X
+3 WRITE *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
+4 QUIT
+5 ; ***
VCHK(BARPRE,BARVER,BARQUIT) ; Check versions needed.
+1 ;
+2 NEW BARV
+3 SET BARV=$$VERSION^XPDUTL(BARPRE)
+4 WRITE !,$$CJ^XLFSTR("Need at least "_BARPRE_" v "_BARVER_"....."_BARPRE_" v "_BARV_" Present",IOM)
+5 IF BARV<BARVER
KILL DIFQ
SET XPDQUIT=BARQUIT
DO SORRY(BARQUIT)
QUIT 0
+6 QUIT 1
+7 ; ***
INSTALLD(BARNM,BARVR,BARPT) ;EP ;RLT
+1 ; RLT - 04/05/05 - Per Don Jackson, modified this tag to use
+2 ; PATCH^XPDUTL. Removed the reverse $O, problem
+3 ; with XU patch numbers. VA (lower than 1000) and
+4 ; IHS patch numers (1000 and higher) not loaded
+5 ; in numerical order. No longer
+6 ; verifies that a lower version did not get
+7 ; reinstalled over a higher version.
+8 NEW BARVNUM,BARPATCH
+9 ;1 get current version
+10 SET BARVNUM=$$VERSION^XPDUTL(BARNM)
+11 IF '+BARVNUM
QUIT 0
+12 ;2 is needed patch loaded
+13 SET BARPATCH=$$PATCH^XPDUTL(BARNM_"*"_BARVR_"*"_BARPT)
+14 IF '+BARPATCH
QUIT 0
+15 QUIT BARNM_"*"_BARVNUM_"*"_BARPT
+16 ;
POST ;EP; CHECK AND CORRECT ZISH PARAMETER ENTRY
+1 ;
+2 ;IF ENTRY IS SET TO umftest THIS IS TEST SYSTEM - DO NOT UPDATE
+3 NEW BAR,BARREC,BARS
+4 FOR BARS="BAR UFMS F","BAR UFMS B"
Begin DoDot:1
+5 SET BAR=$ORDER(^%ZIB(9888888.93,"B",BARS,""))
+6 SET BARREC=$$GET1^DIQ(9888888.93,BAR_",",.03)
+7 IF BARREC="ufmstest"
QUIT
+8 SET BARREC=$$GET1^DIQ(9888888.93,BAR_",",.02)
+9 IF BARREC="quovadx-ie.DOMAIN.NAME"
QUIT
+10 DO BMES^XPDUTL("Updating "_BARS_" entry")
+11 DO UP(BAR,BARS)
End DoDot:1
+12 QUIT
+13 ;
UP(BAR,X) ;
+1 KILL DIC,DIE,DA,DR,DIR
+2 SET DIC="^%ZIB(9888888.93,"
+3 SET DIC(0)="L"
+4 DO ^DIC
+5 IF +Y<0
WRITE !,"UNABLE TO UPDATE ZISH PARAMETER ENTRY. TRY MANUALLY!!"
QUIT
+6 KILL DIC,DIE,DA,DR,DIR,DD,DO,DINUM
+7 SET DIE="^%ZIB(9888888.93,"
+8 SET DA=+Y
+9 SET TARGETIP="quovadx-ie.DOMAIN.NAME"
+10 SET DR=".02///^S X=TARGETIP"
+11 DO ^DIE
+12 KILL DIC,DIE,DA,DR,DIR
+13 QUIT
+14 ; ********************************************************************
INTROE ; Intro text during KIDS Environment check.
+1 ;;This distribution Modifies Accounts Receivable and does not contain
+2 ;;previous patch modifications for version 1.8.
+3 ;;
+4 ;; This patch is **not** cumulative.
+5 ;;
+6 ;;###
+7 ;;
+8 ;
INTROI ; Intro text during KIDS Install.
+1 ;;If you run interactively, results will be displayed on your screen,
+2 ;;and recorded in the entry in the INSTALL file.
+3 ;;If you queue to TaskMan, remember not to Q to the HOME device.
+4 ;;###