PSGWPRE1 ;BHAM ISC/CML-Pre-init for AR/WS V2.3 ; 16 Jun 93 / 1:18 PM
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
I $S(('($D(DUZ)#2)):1,'$D(^VA(200,DUZ,0)):1,'$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !!,"DUZ MUST BE SET TO A VALID USER NUMBER AND",!,"DUZ(0) MUST BE SET TO THE ""@"" SIGN",!! K DIFQ Q
S XQABT1=$H
G:'$D(^PSI(58.1,0)) START ; This version can be installed in an account that has not had AR/WS before
I $S('$D(^PS(59.7,0)):1,'$D(^PS(59.7,1,59.99)):1,$P(^PS(59.7,1,59.99),"^")<2:1,1:0) D MSG K DIFQ Q ; This version cannot be installed in an account that is currently running a version prior to V2.04
START ;
D NOW^%DTC S INITDT=X,(START,Y)=% X ^DD("DD") W !!,"Beginning pre-init...",!!,"Initialization process started ",Y,".",!
;KILL DD FOR RETURN REASON FIELD
W !!,"Deleting RETURN REASON subfield in Pharmacy AOU Stock file (#58.1)...",!,"(This field will be restored by inits as a multiple field)"
S DA(1)=58.15,DA=2,DIK="^DD(58.15," D ^DIK
QUIT W !!,"Pre-initialization is now complete!",!
S (XQABT2,XQABT3)=$H
K %,%H,%I,DA,DIC,DIK,LN,X,Y Q
MSG S $P(LN,"*",79)=""
W *7,*7,*7,!!,LN,!,"** You cannot install version 2.3 over a current version earlier than 2.04. **",!,"** Contact your local ISC for a copy of AR/WS V2.04 (tape and release notes)**"
W !,"** and install it first.",?76,"**",!,"**",?76,"**",!,"********************* INSTALLATION OF AR/WS V2.3 ABORTED *********************" Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGWPRE1 1438 printed Dec 13, 2024@01:39:58 Page 2
PSGWPRE1 ;BHAM ISC/CML-Pre-init for AR/WS V2.3 ; 16 Jun 93 / 1:18 PM
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
+2 IF $SELECT(('($DATA(DUZ)#2)):1,'$DATA(^VA(200,DUZ,0)):1,'$DATA(DUZ(0)):1,DUZ(0)'="@":1,1:0)
WRITE !!,"DUZ MUST BE SET TO A VALID USER NUMBER AND",!,"DUZ(0) MUST BE SET TO THE ""@"" SIGN",!!
KILL DIFQ
QUIT
+3 SET XQABT1=$HOROLOG
+4 ; This version can be installed in an account that has not had AR/WS before
if '$DATA(^PSI(58.1,0))
GOTO START
+5 ; This version cannot be installed in an account that is currently running a version prior to V2.04
IF $SELECT('$DATA(^PS(59.7,0)):1,'$DATA(^PS(59.7,1,59.99)):1,$PIECE(^PS(59.7,1,59.99),"^")<2:1,1:0)
DO MSG
KILL DIFQ
QUIT
START ;
+1 DO NOW^%DTC
SET INITDT=X
SET (START,Y)=%
XECUTE ^DD("DD")
WRITE !!,"Beginning pre-init...",!!,"Initialization process started ",Y,".",!
+2 ;KILL DD FOR RETURN REASON FIELD
+3 WRITE !!,"Deleting RETURN REASON subfield in Pharmacy AOU Stock file (#58.1)...",!,"(This field will be restored by inits as a multiple field)"
+4 SET DA(1)=58.15
SET DA=2
SET DIK="^DD(58.15,"
DO ^DIK
QUIT WRITE !!,"Pre-initialization is now complete!",!
+1 SET (XQABT2,XQABT3)=$HOROLOG
+2 KILL %,%H,%I,DA,DIC,DIK,LN,X,Y
QUIT
MSG SET $PIECE(LN,"*",79)=""
+1 WRITE *7,*7,*7,!!,LN,!,"** You cannot install version 2.3 over a current version earlier than 2.04. **",!,"** Contact your local ISC for a copy of AR/WS V2.04 (tape and release notes)**"
+2 WRITE !,"** and install it first.",?76,"**",!,"**",?76,"**",!,"********************* INSTALLATION OF AR/WS V2.3 ABORTED *********************"
QUIT