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

BIPRE.m

Go to the documentation of this file.
  1. BIPRE ;IHS/CMI/MWR - PRE-INIT ROUTINE; OCT 15, 2010
  1. ;;8.5;IMMUNIZATION;**9**;OCT 01,2014
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; PRE-INIT TO REMOVE PREVIOUS ^DD's, RPC's, Forms, List Templates,
  1. ;; and Protocols in the 9002084-9002084.9999 and BI* Spaces.
  1. ;; PATCH 1: Change DIU(0)="T" to DIU(0)="S" to preserve local templates: DD+7
  1. ;; PATCH 3: Clear BIMAN global for updates.
  1. ;; PATCH 9: Delete all previous BI TABLE DATA ELEMENTS.
  1. ;
  1. ;----------
  1. MAIN ;EP
  1. ;---> Pre-init program.
  1. ;
  1. D SETVARS^BIUTL5 S BIPOP=0
  1. S BIPTITL="v"_$$VER^BILOGO_" PRE-INIT PROGRAM"
  1. ;D PERMISS(.BIPOP) I BIPOP D EXIT Q
  1. ;S DUZ(0)="@"
  1. ;
  1. ;---> Delete all old Error Codes. Added. vvv83
  1. ;D ZGBL^BIUTL8("^BIERR")
  1. ;---> Delete all previous BI Manufacturers.
  1. ;D ZGBL^BIUTL8("^BIMAN")
  1. ;---> Delete all previous BI Eligibility Codes (for preloaded Beta Sites).
  1. ;D ZGBL^BIUTL8("^BIELIG")
  1. ;
  1. ;********** PATCH 9, v8.5, OCT 01,2014, IHS/CMI/MWR
  1. ;---> Delete all previous BI TABLE DATA ELEMENTS.
  1. D ZGBL^BIUTL8("^BIEXPDD")
  1. ;
  1. ;W !!,"DO SOMETHING HERE?" R ZZZ
  1. Q
  1. ;
  1. ;
  1. D DD
  1. D RPCS
  1. D FORMS
  1. D LISTS
  1. D PROTOCOL
  1. D CLRGLBS
  1. D EXIT
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PERMISS(BIPOP) ;EP
  1. ;---> Set up proper permission to delete Data Dictionaries.
  1. S BIPOP=0
  1. Q:DUZ(0)["@"
  1. W !!!! D TITLE^BIUTL5(BIPTITL)
  1. D TEXT1,DIRZ^BIUTL3 S BIPOP=1
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. DD ;EP
  1. ;---> Delete all BI Package Data Dictionaries.
  1. N N
  1. D TITLE^BIUTL5(BIPTITL)
  1. D TEXT2
  1. ;---> BY DD#.
  1. ;
  1. ;********** PATCH 1, v8.2.1, FEB 01,2008, IHS/CMI/MWR
  1. ;---> PATCH 1: Change DIU(0)="T" to DIU(0)="S" to preserve local templates.
  1. ;S N=9002083.99999,DIU(0)="T"
  1. S N=9002083.99999,DIU(0)="S"
  1. ;**********
  1. ;
  1. F S N=$O(^DD(N)) Q:'+N Q:N'<9002085 D
  1. .W !?6,N
  1. .S DIU=N
  1. .D EN^DIU2
  1. ;S N=9999999.14,DIU=N W !?6,N D EN^DIU2 ;IMMUNIZATION (VACCINE TABLE)
  1. ;S N=9999999.04,DIU=N W !?6,N D EN^DIU2 ;IMM MANUFACTURER
  1. S N=9999999.41,DIU=N W !?6,N D EN^DIU2 ;IMMUNIZATION LOT
  1. K DIU
  1. W !?5,"Data Dictionary deletion complete." H 1
  1. ;
  1. F N="ERR","EXPDD","SERT" D
  1. .D ZGBL^BIUTL8("^BI"_N)
  1. W !?5,"Old BI standard tables deletion complete." H 1
  1. ;
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. RPCS ;EP
  1. ;---> Delete all RPCs in BI Namespace.
  1. W !!!?6,"The Pre-Initialization Program is removing all old Remote"
  1. W !?6,"Procedure Calls. Please stand by...",!
  1. S N="BI",DIK="^XWB(8994,"
  1. F S N=$O(^XWB(8994,"B",N)) Q:N=""!(N]"BIZZZ") D
  1. .S DA=$O(^XWB(8994,"B",N,0))
  1. .D ^DIK
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. FORMS ;EP
  1. ;---> Delete all BI 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="BI",DIK="^DIST(.403,"
  1. F S N=$O(^DIST(.403,"B",N)) Q:N=""!(N]"BIZZZ") D
  1. .S DA=$O(^DIST(.403,"B",N,0))
  1. .D ^DIK
  1. ;
  1. S N="BI",DIK="^DIST(.404,"
  1. F S N=$O(^DIST(.404,"B",N)) Q:N=""!(N]"BIZZZ") 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. ;
  1. ;----------
  1. LISTS ;EP
  1. ;---> Delete all LIST Templates in BI Namespace.
  1. W !!!?6,"The Pre-Initialization Program is removing all old"
  1. W !?6,"List Templates. Please stand by...",!
  1. S N="BI",DIK="^SD(409.61,"
  1. F S N=$O(^SD(409.61,"B",N)) Q:N=""!(N]"BIZZZ") D
  1. .S DA=$O(^SD(409.61,"B",N,0))
  1. .D ^DIK
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. PROTOCOL ;EP
  1. ;---> Delete all Protocols in BI Namespace.
  1. W !!!?6,"The Pre-Initialization Program is removing all old Protocols"
  1. W !?6,"Please stand by...",!
  1. S N="BI",DIK="^ORD(101,"
  1. F S N=$O(^ORD(101,"B",N)) Q:N=""!(N]"BIZZZ") D
  1. .S DA=$O(^ORD(101,"B",N,0))
  1. .D ^DIK
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. CLRGLBS ;EP
  1. ;---> Delete globals of standard data that will have data placed
  1. ;---> in them by KIDS.
  1. ;---> Delete all old text in BI PACKAGE INFORMATION.
  1. D ZGBL^BIUTL8("^BINFO")
  1. ;---> Delete all old Sample Letters.
  1. D ZGBL^BIUTL8("^BILETS")
  1. ;---> Delete all old Error Codes. Added. vvv83
  1. D ZGBL^BIUTL8("^BIERR")
  1. ;---> Delete VT-100 Codes.
  1. D KGBL^BIUTL8("^BIVT100")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT1 ;
  1. ;;This preinit clears all data dictionaries out of the Immunization
  1. ;;number space (9002084-9002084.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 ^BIINIT at the programmer prompt.
  1. ;;
  1. ;;This init will now terminate without having made any changes to the
  1. ;;current software.
  1. D PRINTX("TEXT1")
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. TEXT2 ;
  1. ;;The Pre-Initialization Program is removing all old Data Dictionaries
  1. ;;in the 9002084-9002084.9999 number space and old BI standard tables.
  1. ;;Please stand by...
  1. ;;
  1. D PRINTX("TEXT2")
  1. Q
  1. ;
  1. ;
  1. PRINTX(BILINL,BITAB) ;EP
  1. Q:$G(BILINL)=""
  1. N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
  1. F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" W !,T,$P(X,";;",2)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. EXIT ;EP
  1. ;---> End of job cleanup.
  1. D KILLALL^BIUTL8(1)
  1. Q