source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/AWCMCPST.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1AWCMCPST ;VISN 7/THM-POST-INIT FOR CPRS MONITOR ; Feb 27, 2004
2 ;;7.3;TOOLKIT;**84,86**;Jan 09, 2004
3 ;
4EN ; set up ^XTMP nodes first
5 N AWCPGDT,X,Y
6 D DT^DICRW
7 S X="T+10",%DT="" D ^%DT Q:Y<0 S AWCPGDT=Y
8 ; locks applied even though nodes do not exist yet
9 I '$D(^XTMP("AWCCPRS",0)) DO
10 .L +^XTMP("AWCCPRS",0):1
11 .S ^XTMP("AWCCPRS",0)=AWCPGDT_U_DT_U_"CPRS Monitor temporary global" ;zero node
12 .L -^XTMP("AWCCPRS",0)
13 I '$D(^XTMP("AWCCPRS",.5)) DO
14 .L +^XTMP("AWCCPRS",.5):1
15 .S ^XTMP("AWCCPRS",.5)=0 ;node that supplies IEN
16 .L -^XTMP("AWCCPRS",.5)
17 ;
18PARAM ; set up parameter file; all settings off initially
19 S AWCX=$$SITE^VASITE,AWCDIV=+AWCX,AWCDNAME=$P(AWCX,U,2),AWCMSTA=$P(AWCX,U,3)
20 ; Output= Institution file pointer^Institution name^station number with suffix
21 I AWCDIV="" W !!,$C(7),"Unable to resolve the site's station number",!! H 3
22 G:AWCDIV="" EXIT
23 ; Beta test sites have it already, so update it for consistency
24 I $D(^AWC(177100.12,1,0)) DO G EXIT
25 .S (DIC,DIE)="^AWC(177100.12,",DIC(0)="QLM",DA=1
26 .; set the first piece manually; can't edit a DINUMed field
27 .; field 1.5 will be triggered on new entries at non-beta sites, but not for existing beta sites
28 .S $P(^AWC(177100.12,DA,0),U)=AWCDIV
29 .S DR="1///0;1.2///0;1.5////"_AWCMSTA_";2///0;3///0;5////cprsmonitor"_AWCMSTA
30 .S DR=DR_";6///8;7///30;8///192,0,0;9///0,192,0;10///0,0,192;11///1;12///230,230,230"
31 .S DR=DR_";13///7;20///vaftp.va.gov;21////itmuser;22////Padfoot1;23///0;24///1"
32 .D ^DIE
33 . ;now re-index .01 field because it changed (DIK executes KILL and then SET)
34 .S DIK="^AWC(177100.12,",DA=1,DIK(1)=".01" D EN^DIK
35 ; section for new sites - field 1.5 is triggered
36 I '$D(^AWC(177100.12,1,0)) DO
37 .S X=AWCDIV,DIC("DR")="1///0;1.2///0;2///0;3///0;5///cprsmonitor"_AWCMSTA
38 .S DIC("DR")=DIC("DR")_";6///8;7///30;8///192,0,0;9///0,192,0;10///0,0,192;11///YES;12///230,230,230"
39 .S DIC("DR")=DIC("DR")_";13///7;20///vaftp.va.gov;21///itmuser;22///Padfoot1;23///0;24///1"
40 .S (DIC,DIE)="^AWC(177100.12,",DIC(0)="EQLM" K DO,DD D FILE^DICN
41 ;
42EXIT K AWCDIV,AWCDA,AWCDNAME,AWCMSTA,DO,DD,DIC,DIE,DR,%DT,AWCPGDT,X,Y
43 K AWCX,DA
44 Q
Note: See TracBrowser for help on using the repository browser.