APCPPRE ; IHS/TUCSON/LAB - PRE INIT ; [ 04/03/98 08:39 AM ]
;;2.0;IHS PCC DATA EXTRACTION SYSTEM;;APR 03, 1998
NEW APCPNAME
I '$G(DUZ) K DIFQ W $C(7),!,"DUZ UNDEFINED OR 0." Q
I '$L($G(DUZ(0))) K DIFQ W $C(7),!,"DUZ(0) UNDEFINED OR NULL." Q
S X=$P(^VA(200,DUZ,0),U),APCPNAME=$P($T(APCPPRE+1),";",4)
W !!,$$CTR("Hello, "_$P(X,",",2)_" "_$P(X,",")),!,$$CTR("Checking system requirements....")
I $G(^DD("VERSION"))<21 K DIFQ W $C(7),!,$$CTR("I NEED AT LEAST FILEMAN 21.") Q
W !,$$CTR("FileMan OK...")
I $S('$O(^DIC(9.4,"C","XU",0)):1,$G(^DIC(9.4,$O(^DIC(9.4,"C","XU",0)),"VERSION"))<7.1:1,1:0) K DIFQ W $C(7),!,$$CTR("I NEED AT LEAST KERNEL 7.1.") Q
W !,$$CTR("Kernel OK...")
;
D ^APCPPREI
Q
;----------
CTR(X,Y) ;EP - Center X in a field Y wide.
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
APCPPRE ; IHS/TUCSON/LAB - PRE INIT ; [ 04/03/98 08:39 AM ]
+1 ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;;APR 03, 1998
+2 NEW APCPNAME
+3 IF '$GET(DUZ)
KILL DIFQ
WRITE $CHAR(7),!,"DUZ UNDEFINED OR 0."
QUIT
+4 IF '$LENGTH($GET(DUZ(0)))
KILL DIFQ
WRITE $CHAR(7),!,"DUZ(0) UNDEFINED OR NULL."
QUIT
+5 SET X=$PIECE(^VA(200,DUZ,0),U)
SET APCPNAME=$PIECE($TEXT(APCPPRE+1),";",4)
+6 WRITE !!,$$CTR("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,",")),!,$$CTR("Checking system requirements....")
+7 IF $GET(^DD("VERSION"))<21
KILL DIFQ
WRITE $CHAR(7),!,$$CTR("I NEED AT LEAST FILEMAN 21.")
QUIT
+8 WRITE !,$$CTR("FileMan OK...")
+9 IF $SELECT('$ORDER(^DIC(9.4,"C","XU",0)):1,$GET(^DIC(9.4,$ORDER(^DIC(9.4,"C","XU",0)),"VERSION"))<7.1:1,1:0)
KILL DIFQ
WRITE $CHAR(7),!,$$CTR("I NEED AT LEAST KERNEL 7.1.")
QUIT
+10 WRITE !,$$CTR("Kernel OK...")
+11 ;
+12 DO ^APCPPREI
+13 QUIT
+14 ;----------
CTR(X,Y) ;EP - Center X in a field Y wide.
+1 QUIT $JUSTIFY("",$SELECT($DATA(Y):Y,1:IOM)-$LENGTH(X)\2)_X
+2 ;----------