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

BWPRE.m

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