BWPRE ;IHS/ANMC/MWR - PRE-INIT ROUTINE ;15-Feb-2003 22:07;PLS
;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
;; PRE-INIT ROUTINE TO REMOVE PREVIOUS DATA DICTIONARIES IN THE
;; 9002086-9002086.9999 NUMBER SPACE.
;
D SETVARS^BWUTL5 S BWPOP=0
S Y=$P($P($T(BWPRE+1),";;",2),";")
S BWPTITL="v"_Y_" PRE-INIT PROGRAM"
D PERMISS(.BWPOP) I BWPOP D EXIT S BWPOP=1 Q
D DD
D FORMS
D EXIT S BWPOP=0
Q
;
EXIT ;EP
D KILLALL^BWUTL8
Q
;
PERMISS(BWPOP) ;EP
;---> SET UP PROPER PERMISSION TO DELETE DATA DICTIONARIES.
S BWPOP=0
Q:DUZ(0)["@"
W !!!! D TITLE^BWUTL5(BWPTITL)
D TEXT1,DIRZ^BWUTL3 S BWPOP=1
Q
;
DD ;EP
;---> DELETE ALL BW PACKAGE DATA DICTIONARIES.
N N
D TITLE^BWUTL5(BWPTITL)
D TEXT2
;---> BY DD#.
S N=9002085.99999,DIU(0)="T"
F S N=$O(^DD(N)) Q:'+N Q:N'<9002087 D
.W ?6,N
.S DIU=N
.D EN^DIU2
W !?5,"Data Dictionary deletion complete." H 1
F N="PR","PN","DIAG","CUR","MAMT","LET","MDE","DOC" D
.D ZGBL^BWUTL8("^BW"_N)
W !?5,"Old BW standard tables deletion complete." H 1
Q
;
FORMS ;EP
;---> DELETE ALL BW FORMS AND BLOCKS.
W !!!?6,"The Pre-Initialization Program is removing all old Screenman"
W !?6,"forms and blocks. Please stand by...",!
S N="BW",DIK="^DIST(.403,"
F S N=$O(^DIST(.403,"B",N)) Q:N=""!(N]"BWZZZ") D
.S DA=$O(^DIST(.403,"B",N,0))
.D ^DIK
;
S N="BW",DIK="^DIST(.404,"
F S N=$O(^DIST(.404,"B",N)) Q:N=""!(N]"BWZZZ") D
.S DA=$O(^DIST(.404,"B",N,0))
.D ^DIK
W !?6,"Screen deletions complete." H 1
Q
;
TEXT1 ;
;;This preinit clears all data dictionaries out of the Women's Health
;;number space (9002086-9002086.99) before loading the new data
;;dictionaries. In order for this to occur, your DUZ(0) must contain
;;the "@". Your DUZ(0), however, does NOT contain the "@", and the
;;SAC standards prevent this program from setting it for you.
;;
;;You can set your DUZ(0)=@ by entering S DUZ(0)="@" at the programmer
;;prompt, or by entering Fileman in programmer mode: enter D P^DI at
;;the programmer prompt and then simply press RETURN to back out of it.
;;
;;After resetting your DUZ(0), you may begin the init process again
;;by entering D ^BWINIT at the programmer prompt.
;;
;;This init will now terminate without having made any changes to the
;;current software.
S BWTAB=5,BWLINL="TEXT1" D PRINTX
Q
;
TEXT2 ;
S BWTAB=5,BWLINL="TEXT2" D PRINTX
;The Pre-Initialization Program is removing all old Data Dictionaries
;in the 9002086-9002086.9999 number space and old BW standard tables.
;Please stand by...
Q
;
;
PRINTX ;EP <---REMOVE LEADING "Z" FROM THIS LINE LABEL.
N I,T,X S T="" F I=1:1:BWTAB S T=T_" "
F I=1:1 S X=$T(@BWLINL+I) Q:X'[";;" W !,T,$P(X,";;",2)
Q
BWPRE ;IHS/ANMC/MWR - PRE-INIT ROUTINE ;15-Feb-2003 22:07;PLS
+1 ;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
+2 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
+3 ;; PRE-INIT ROUTINE TO REMOVE PREVIOUS DATA DICTIONARIES IN THE
+4 ;; 9002086-9002086.9999 NUMBER SPACE.
+5 ;
+6 DO SETVARS^BWUTL5
SET BWPOP=0
+7 SET Y=$PIECE($PIECE($TEXT(BWPRE+1),";;",2),";")
+8 SET BWPTITL="v"_Y_" PRE-INIT PROGRAM"
+9 DO PERMISS(.BWPOP)
IF BWPOP
DO EXIT
SET BWPOP=1
QUIT
+10 DO DD
+11 DO FORMS
+12 DO EXIT
SET BWPOP=0
+13 QUIT
+14 ;
EXIT ;EP
+1 DO KILLALL^BWUTL8
+2 QUIT
+3 ;
PERMISS(BWPOP) ;EP
+1 ;---> SET UP PROPER PERMISSION TO DELETE DATA DICTIONARIES.
+2 SET BWPOP=0
+3 IF DUZ(0)["@"
QUIT
+4 WRITE !!!!
DO TITLE^BWUTL5(BWPTITL)
+5 DO TEXT1
DO DIRZ^BWUTL3
SET BWPOP=1
+6 QUIT
+7 ;
DD ;EP
+1 ;---> DELETE ALL BW PACKAGE DATA DICTIONARIES.
+2 NEW N
+3 DO TITLE^BWUTL5(BWPTITL)
+4 DO TEXT2
+5 ;---> BY DD#.
+6 SET N=9002085.99999
SET DIU(0)="T"
+7 FOR
SET N=$ORDER(^DD(N))
IF '+N
QUIT
IF N'<9002087
QUIT
Begin DoDot:1
+8 WRITE ?6,N
+9 SET DIU=N
+10 DO EN^DIU2
End DoDot:1
+11 WRITE !?5,"Data Dictionary deletion complete."
HANG 1
+12 FOR N="PR","PN","DIAG","CUR","MAMT","LET","MDE","DOC"
Begin DoDot:1
+13 DO ZGBL^BWUTL8("^BW"_N)
End DoDot:1
+14 WRITE !?5,"Old BW standard tables deletion complete."
HANG 1
+15 QUIT
+16 ;
FORMS ;EP
+1 ;---> DELETE ALL BW FORMS AND BLOCKS.
+2 WRITE !!!?6,"The Pre-Initialization Program is removing all old Screenman"
+3 WRITE !?6,"forms and blocks. Please stand by...",!
+4 SET N="BW"
SET DIK="^DIST(.403,"
+5 FOR
SET N=$ORDER(^DIST(.403,"B",N))
IF N=""!(N]"BWZZZ")
QUIT
Begin DoDot:1
+6 SET DA=$ORDER(^DIST(.403,"B",N,0))
+7 DO ^DIK
End DoDot:1
+8 ;
+9 SET N="BW"
SET DIK="^DIST(.404,"
+10 FOR
SET N=$ORDER(^DIST(.404,"B",N))
IF N=""!(N]"BWZZZ")
QUIT
Begin DoDot:1
+11 SET DA=$ORDER(^DIST(.404,"B",N,0))
+12 DO ^DIK
End DoDot:1
+13 WRITE !?6,"Screen deletions complete."
HANG 1
+14 QUIT
+15 ;
TEXT1 ;
+1 ;;This preinit clears all data dictionaries out of the Women's Health
+2 ;;number space (9002086-9002086.99) before loading the new data
+3 ;;dictionaries. In order for this to occur, your DUZ(0) must contain
+4 ;;the "@". Your DUZ(0), however, does NOT contain the "@", and the
+5 ;;SAC standards prevent this program from setting it for you.
+6 ;;
+7 ;;You can set your DUZ(0)=@ by entering S DUZ(0)="@" at the programmer
+8 ;;prompt, or by entering Fileman in programmer mode: enter D P^DI at
+9 ;;the programmer prompt and then simply press RETURN to back out of it.
+10 ;;
+11 ;;After resetting your DUZ(0), you may begin the init process again
+12 ;;by entering D ^BWINIT at the programmer prompt.
+13 ;;
+14 ;;This init will now terminate without having made any changes to the
+15 ;;current software.
+16 SET BWTAB=5
SET BWLINL="TEXT1"
DO PRINTX
+17 QUIT
+18 ;
TEXT2 ;
+1 SET BWTAB=5
SET BWLINL="TEXT2"
DO PRINTX
+2 ;The Pre-Initialization Program is removing all old Data Dictionaries
+3 ;in the 9002086-9002086.9999 number space and old BW standard tables.
+4 ;Please stand by...
+5 QUIT
+6 ;
+7 ;
PRINTX ;EP <---REMOVE LEADING "Z" FROM THIS LINE LABEL.
+1 NEW I,T,X
SET T=""
FOR I=1:1:BWTAB
SET T=T_" "
+2 FOR I=1:1
SET X=$TEXT(@BWLINL+I)
IF X'[";;"
QUIT
WRITE !,T,$PIECE(X,";;",2)
+3 QUIT