source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBRVCOND.m@ 1432

Last change on this file since 1432 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.6 KB
RevLine 
[613]1LBRVCOND ;SSI/ALA/JSR-Consolidate library files env check ;[ 06/27/2000 7:29 PM ]
2 ;;2.5;Library;**8**;Mar 11, 2000
3 ;
4EN ; Checking for patch load requirements
5 N QUIT
6 I '$G(DUZ)!($G(DUZ(0))'["@") W !,"USER 'DUZ' VARIABLES **NOT** CORRECTLY DEFINED. CONFIRM THAT DUZ(0)='@'. THEN D ^XUP." S XPDQUIT=1 Q
7 ;
8 ;
9 S LBRPT2=$$PATCH^XPDUTL("LBR*2.5*2")
10 I LBRPT2'=1 D S XPDQUIT=1 Q
11 . W !!,"*** Patch LBR*2.5*2 must be installed prior to loading"
12 . W !,"this patch. This install will now abort.",!
13 ;
14 S LBRPT3=$$PATCH^XPDUTL("LBR*2.5*3")
15 I LBRPT3'=1 D S XPDQUIT=1 Q
16 . W !!,"*** Patch LBR*2.5*3 must be installed prior to loading"
17 . W !,"this patch. This install will now abort.",!
18 ;;
19RX ; re-index file 680.6 for checks
20 F LBRXREF="B","C" K ^LBRY(680.6,LBRXREF)
21 S DIK="^LBRY(680.6," D IXALL^DIK
22LEG ;Check for Legacy Station
23 S LBRPRT=$P($G(^A7RLBRY("LBRV",0)),"^",3),LBRSYS=$P(LBRPRT,";",2)
24 I LBRSYS="LEG" K LBRSYS,LBRPRT,LBRPT2,LBRXREF Q
25 ;
26PL ;
27 S QUIT=0,XPDQUIT=1,DIRUT=1
28 D MES^XPDUTL("")
29 D MES^XPDUTL(" ** PLEASE IDENTIFY YOUR STATION TYPE ** ")
30 S DIR(0)="SX^1:Primary;2:Legacy"
31 S DIR("A")="SELECT SITE TYPE"
32 S DIR("B")=""
33 D ^DIR
34 I $D(DIRUT) K DIR,X S QUIT=1,FLAG="YES" Q
35 I Y=2 S LBRLEGP="LEGACY"
36 I Y=1 S LBRLEGP="PRIMARY"
37QUEST1 K FLAG
38 D MES^XPDUTL("*** WARNING PLEASE VERIFY THE FOLLOWING ***")
39 D MES^XPDUTL("Have all the entries in the Legacy's National Library Files (680.1,680.2, 680.8 and 680.9) been confirmed in the Primary's National Library Files? ")
40 D MES^XPDUTL(" Enter 'Y'es to continue or 'N'o to stop the install.")
41 D MES^XPDUTL(" ")
42 S DIR(0)="Y",DIR("A")="Enter 'N' to quit, or 'Y' to continue: "
43 S DIR("B")="NO" D ^DIR
44 I Y=0!$D(DIRUT) K DIR,X,Y S QUIT=1,FLAG="YES" Q
45QUEST2 K FLAG
46 D MES^XPDUTL("*** WARNING - PLEASE VERIFY THE FOLLOWING ***")
47 D MES^XPDUTL("Have your Service File (#49) and New Person File (#200) been consolidated?")
48 D MES^XPDUTL(" Enter 'Y'es to continue or 'N'o to stop the install.")
49 D MES^XPDUTL(" ")
50 S DIR(0)="Y",DIR("A")="Enter 'N' to quit, or 'Y' to continue: "
51 S DIR("B")="NO" D ^DIR
52 I Y=0!$D(DIRUT) K DIR,X,Y S QUIT=1,FLAG="YES" Q
53WRN ; Warning on existence of Translated global
54 I $D(^A7RLBRY) S QUIT=0 D I QUIT S XPDQUIT=1,DIRUT=1 Q
55 . W !!
56 . D MES^XPDUTL("*** WARNING - A7RLBRY global exists! ***")
57 . D MES^XPDUTL("If you are a LEGACY STATION this data should not exist in prepare data")
58 . D BMES^XPDUTL("If you are a PRIMARY STATION this file must EXIST to proceed")
59 . D MES^XPDUTL(" Enter 'Y'es to continue or 'N'o to stop the install.")
60 . D MES^XPDUTL(" ")
61 . S DIR(0)="Y",DIR("A")="Enter 'N' to quit, or 'Y' to continue: "
62 . S DIR("B")="NO" D ^DIR
63 . I Y=0!$D(DIRUT) K DIR,X,Y S QUIT=1,FLAG="YES" Q
64 . I LBRLEGP="LEGACY" K DIR,X,Y S QUIT=1,FLAG="YES" D MES^XPDUTL("*** Legacy Station cannot proceed ***") Q
65CNF ; Warning on existence of Translated global
66 I '$D(^A7RLBRY) S QUIT=0 D I QUIT S XPDQUIT=1,DIRUT=1 Q
67 . D MES^XPDUTL("*** WARNING - A7RLBRY global does not exist! ***")
68 . D MES^XPDUTL("If you are a LEGACY SITE this global CANNOT exist to proceed!")
69 . D MES^XPDUTL(" ")
70 . S DIR(0)="Y",DIR("A")="Enter 'N' to quit, or 'Y' to continue: "
71 . S DIR("B")="NO" D ^DIR
72 . I Y=0!$D(DIRUT) K DIR,X S QUIT=1,FLAG="YES" Q
73 . I Y=1 S FLAG="",QUIT=1 Q
74 . I LBRLEGP="PRIMARY" S FLAG="YES" D MES^XPDUTL("**WARNING**") G EXIT
75 I QUIT=1 G EXIT
76STA ;
77 S LBRVSTA=0,CT=0
78 F S LBRVSTA=$O(^A7RLBRY(LBRVSTA)) Q:LBRVSTA="" S CT=CT+1
79 I CT>0 S $P(^A7RLBRY(0),"^",3)=CT
80 I CT>1 D
81 . D MES^XPDUTL("**WARNING** Temporary global contains multiple stations.")
82 . D MES^XPDUTL("The integration may take a couple of hours.")
83 K CT,LBRPT2,LBRVSTA
84QUEST3 ;
85 W !!
86 S FLAG=""
87 D MES^XPDUTL("*** WARNING PLEASE VERIFY ***")
88 D MES^XPDUTL(" Below is a list of Sites which exist in the Primary System:")
89 S LBRX=0
90 F S LBRX=$O(^LBRY(680.6,LBRX)) Q:'LBRX D
91 . S LBRDATA=^LBRY(680.6,LBRX,0)
92 . S LBRAB=$P(LBRDATA,"^",7)
93 . S LBRSTA=$P(LBRDATA,"^",1)
94 . S LBRLST(LBRAB)=""
95 . D MES^XPDUTL("ID Code:"_LBRAB_" Site:"_LBRSTA)
96 W !!
97 D MES^XPDUTL(" Below is a list of Sites ready for integration")
98 S LBRA7=0
99 F S LBRA7=$O(^A7RLBRY(LBRA7)) Q:LBRA7="" D
100 . D MES^XPDUTL("ID Code:"_LBRA7)
101 . S:'$D(LBRLST(LBRA7)) LBRHLT=1
102 . W !!
103 D MES^XPDUTL("If no Division Site Name defined in Library Parameters File for integrating")
104 D MES^XPDUTL("site then enter the corresponding SITE NAME to match the above 5 letter code.")
105 W !!
106 D MES^XPDUTL("PRESS ANY KEY WHEN READY TO CONTINUE")
107 R DUMB:400
108 I $G(LBRHLT) D MES^XPDUTL("SITE MISMATCH -- You must Define Site[s] PRIOR TO INTEGRATION. This install is now aborted.") S QUIT=1,FLAG="YES" Q
109EXIT ;Kill local variables
110 K LBRVSTA,LBRVNM,DIR,DIC,DIE,D,DA,D0,DR,X,Y
111 I QUIT S DIRUT=1
112 Q
Note: See TracBrowser for help on using the repository browser.