source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LR138PO.m@ 776

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1LR138PO ;DALISC/FHS - LR*5.2*138 POST INSTALL ROUTINE KIDS INSTALL
2 ;;5.2;LAB SERVICE;**138**;Sep 27, 1994;Build 4
3 ;Modified from FOIA VISTA,
4 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU
5 ;General Public License See attached copy of the License.
6 ;
7 ;This program is free software; you can redistribute it and/or modify
8 ;it under the terms of the GNU General Public License as published by
9 ;the Free Software Foundation; either version 2 of the License, or
10 ;(at your option) any later version.
11 ;
12 ;This program is distributed in the hope that it will be useful,
13 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;GNU General Public License for more details.
16 ;
17 ;You should have received a copy of the GNU General Public License along
18 ;with this program; if not, write to the Free Software Foundation, Inc.,
19 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20EN ;Builds Laboratory OOS Locations for each LMIP valid WKLD Divison
21 ;
22 W !!,$$CJ^XLFSTR("Starting Post Install Process",80),!!
23 L +^LAM(0):2 I $T S:$D(^LAM(0))#2 $P(^(0),U,3)=99999 L -^LAM(0)
24 L +^LRO(69,"AA"):1 I '$T D G END
25 . W !?5,"Cant lock ^LRO(69,AA) GLOBAL POST INSTALL ABORTED",!
26 S X=$$ADD^XPDMENU("LR LIM/WKLD MENU","LR WKLD LOCATION")
27 W !!,"Option [LR WKLD LOCATIONS] was ",$S(X:"Added",1:"NOT ADDED")," to [LR LIM/WKLD] MENU ",!!
28 S X=$$ADD^XPDMENU("LR LIM/WKLD MENU","LR WKLD ACC AREA LOCATION")
29 W !!,"Option [LR WKLD ACC AREA LOCATIONS] was ",$S(X:"Added",1:"NOT ADDED")," to [LR LIM/WKLD] MENU ",!!
30LOC ;
31 S LRPKG=$O(^DIC(9.4,"B","LR",0))
32 I 'LRPKG S LRPKG=$O(^DIC(9.4,"B","LAB SERVICE",0))
33 I 'LRPKG D G END
34 .W !!,$$CJ^XLFSTR("Not able to find 'LAB SERVICE' in your Package (#9.4) file.",80),!,$$CJ^XLFSTR("Contact your IRM Service !!",80),!!,$C(7) H 5 S XPDQUIT=2
35 . W !,$$CJ^XLFSTR("POST INSTALL ABORTED",80)
36 W !!,$$CJ^XLFSTR("Creating Laboratory OOS Workload Locations",80),!!
37SET S LROK=""
38 S LRVN=$O(^LRO(67.9,0)) I LRVN S LRDIVN=LRVN D LK I $G(LROK)>0 S ^LAB(69.9,1,.8)=LROK
39 I $G(LROK)>0 S LRVN1=0 F S LRVN1=$O(^LRO(67.9,LRVN,1,LRVN1)) Q:LRVN1<1 S LRDIVN=LRVN1 D LK
40 S LRDIVN=+$$SITE^VASITE I LRDIVN D LK I $G(LROK)>0,'$G(^LAB(69.9,1,.8)) S ^(.8)=LROK
41 I $G(^LAB(69.9,1,.8)) W !,$$CJ^XLFSTR("Database Upgrade Completed Successfully",80),!! D G MSG
42 . K DA,DIC,DIE S DA=+$G(^LAB(69.9,1,.8)),DIC="^SC(",DR="0:999999"
43 . W !!,$$CJ^XLFSTR("DEFAULT LAB OOS LOCATION IS",80),!! D EN^DIQ W !
44 W !! F I=1:1:2 D EQUALS^LRX W $C(7)
45 W !,$$CJ^XLFSTR(" Database Upgrade was INCOMPLETE ",80)
46 W !! F I=1:1:2 D EQUALS^LRX W $C(7)
47 W !
48MSG S $P(^LAB(69.9,1,"VSIT"),U)=2
49 W !,$$CJ^XLFSTR("PCE/VSIT ON (#615) field in LABORATORY SITE (#69.9) file",80)
50 W !,$$CJ^XLFSTR("has been set to BOTH PCE/VSIT AND STOP CODES",80),!!
51END ;
52 L -^LRO(69,"AA")
53 Q:$G(LRDBUG)
54 K DA,DATA,DIE,DIK,DIC,DR,LRDIV,LRDIVN,LRNAME,LROK,LRPKG,LRSCODE,LRVN
55 K LRVN1,X
56 Q
57LK ;
58 Q:$G(LRSDCX)
59 S LRDIV=$S($G(^DIC(4,LRDIVN,99)):$P(^(99),U),1:LRDIVN)
60 S LRSCODE=108,LRNAME="LAB DIV "_LRDIV_" OOS ID "_LRSCODE
61 D LOADB^LRCAPPH2
62 Q
Note: See TracBrowser for help on using the repository browser.