source: VWGUIRegistration/trunk/VWREGIT2.m@ 1803

Last change on this file since 1803 was 1798, checked in by Jim B., 8 years ago
File size: 2.3 KB
Line 
1VWREGIT2 ;Portland/WorldVista/BFP,LLC/Jim Bell, et al... - Post-Install for VWREG
2 ;;1.0;WORLD VISTA;**HOME **;;Build 2
3 ;
4 ;Continued from VWREGIT
5 ;
6 ;GNU License: See WVLIC.txt
7 ;Modified FOIA VISTA,
8 ;Copyright 2013 WorldVistA. Licensed under the terms of the GNU
9 Q
10PRE ;Did this installation happen already? Avoid a re-do?
11 I $O(^XMB(3.8,"B","VW REG ERROR REPORT",0))&($D(^XTV(8989.51,"B","VW GUI REG TEMPLATE DIRECTORY",0))) W !?5,"Installation has already occurred"
12 W !,"Do you want to continue? NO//" R X:60 S:'$L(X) X="NO" S X=$$UP^XLFSTR(X)
13 I "NON"[X W !,"OK" D ^XUSCLEAN
14 Q
15 ;
16PI ;Post Installation install
17 ;Checking for a home directory & file
18 I $O(^XMB(3.8,"B","VW REG ERROR REPORT",0)) W !?5,"Installation has already occurred" Q
19 S AR=1,AR(1)="[TEMPLATES]"
20 S N=0 F S N=$O(^DIE(N)) Q:'+N S X=$P(^(N,0),"^") D
21 . I X["VW " S AR($I(AR))=X_"("_N_")"
22 . I X["[World" S AR($I(AR))=X_"("_N_")"
23 S AR($I(AR))="[ID]"
24 S P4=1,P5="",HD=$ZDIRECTORY_"regparam/",FILE="regit.txt"
25 S X=$$GTF^%ZISH($NA(AR(1)),1,HD,"regit.txt")
26 ZSY "chmod 777 "_$ZDIRECTORY_"regparam/"_FILE ;No sensitive info here
27 Q:$G(TEST) ;Straightening out regit.txt
28 ;
29 ;; NOTE: The parameter definition is installed but there is no installation for
30 ;;the actual parameter and value. Do it here.
31 ;parameter value attempt
32 ;Set a home directory for editing; SYSTEM (DIC(4,) and DOMAIN (DIC(4.2,) only:"/home/vista/regparam/"
33 S PARD=$O(^XTV(8989.51,"B","VW GUI REG TEMPLATE DIRECTORY",0))
34 I PARD D
35 . L +^XTV(8989.5,0):1 D L -^XTV(8989.5,0)
36 .. S NEW=$O(^XTV(8989.5," "),-1)+1
37 .. S $P(^XTV(8989.5,0),"^",3)=NEW
38 .. S $P(^XTV(8989.5,0),"^",4)=$P(^(0),"^",4)+1
39 .. S $P(^XTV(8989.5,NEW,0),"^")="1;DIC(4,"
40 .. S $P(^XTV(8989.5,NEW,0),"^",2)=PARD
41 .. S $P(^XTV(8989.5,NEW,0),"^",3)=1
42 .. S ^XTV(8989.5,NEW,1)=HD
43 .. S DA=NEW,DIK="^XTV(8989.5," D IX^DIK
44 .. S NEW2=$O(^XTV(8989.5," "),-1)+1
45 .. S $P(^XTV(8989.5,0),"^",3)=NEW2
46 .. S $P(^XTV(8989.5,0),"^",4)=$P(^(0),"^",4)+1
47 .. S $P(^XTV(8989.5,NEW2,0),"^")="9;DIC(4.2,"
48 .. S $P(^XTV(8989.5,NEW2,0),"^",2)=PARD
49 .. S $P(^XTV(8989.5,NEW2,0),"^",3)=1
50 .. S ^XTV(8989.5,NEW2,1)=HD
51 .. S DA=NEW2,DIK="^XTV(8989.5," D IX^DIK
52 ;
53 ;Mailgroup VW REG ERROR REPORT - add programmer's email
54 S DA(1)=$O(^XMB(3.8,"B","VW REG ERROR REPORT",0))
55 Q:'DA(1)
56 S DIC="^XMB(3.8,"_DA(1)_",6,"
57 S X="jbellco65@gmail.com"
58 S DIC(0)="LZ"
59 D FILE^DICN
60 Q
61 ;
Note: See TracBrowser for help on using the repository browser.