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

AWCMCPST.m

Go to the documentation of this file.
  1. AWCMCPST ;VISN 7/THM-POST-INIT FOR CPRS MONITOR ; Feb 27, 2004
  1. ;;7.3;TOOLKIT;**84,86**;Jan 09, 2004
  1. ;
  1. EN ; set up ^XTMP nodes first
  1. N AWCPGDT,X,Y
  1. D DT^DICRW
  1. S X="T+10",%DT="" D ^%DT Q:Y<0 S AWCPGDT=Y
  1. ; locks applied even though nodes do not exist yet
  1. I '$D(^XTMP("AWCCPRS",0)) DO
  1. .L +^XTMP("AWCCPRS",0):1
  1. .S ^XTMP("AWCCPRS",0)=AWCPGDT_U_DT_U_"CPRS Monitor temporary global" ;zero node
  1. .L -^XTMP("AWCCPRS",0)
  1. I '$D(^XTMP("AWCCPRS",.5)) DO
  1. .L +^XTMP("AWCCPRS",.5):1
  1. .S ^XTMP("AWCCPRS",.5)=0 ;node that supplies IEN
  1. .L -^XTMP("AWCCPRS",.5)
  1. ;
  1. PARAM ; set up parameter file; all settings off initially
  1. S AWCX=$$SITE^VASITE,AWCDIV=+AWCX,AWCDNAME=$P(AWCX,U,2),AWCMSTA=$P(AWCX,U,3)
  1. ; Output= Institution file pointer^Institution name^station number with suffix
  1. I AWCDIV="" W !!,$C(7),"Unable to resolve the site's station number",!! H 3
  1. G:AWCDIV="" EXIT
  1. ; Beta test sites have it already, so update it for consistency
  1. I $D(^AWC(177100.12,1,0)) DO G EXIT
  1. .S (DIC,DIE)="^AWC(177100.12,",DIC(0)="QLM",DA=1
  1. .; set the first piece manually; can't edit a DINUMed field
  1. .; field 1.5 will be triggered on new entries at non-beta sites, but not for existing beta sites
  1. .S $P(^AWC(177100.12,DA,0),U)=AWCDIV
  1. .S DR="1///0;1.2///0;1.5////"_AWCMSTA_";2///0;3///0;5////cprsmonitor"_AWCMSTA
  1. .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"
  1. .S DR=DR_";13///7;20///vaftp.domain.ext;21////itmuser;22////Padfoot1;23///0;24///1"
  1. .D ^DIE
  1. . ;now re-index .01 field because it changed (DIK executes KILL and then SET)
  1. .S DIK="^AWC(177100.12,",DA=1,DIK(1)=".01" D EN^DIK
  1. ; section for new sites - field 1.5 is triggered
  1. I '$D(^AWC(177100.12,1,0)) DO
  1. .S X=AWCDIV,DIC("DR")="1///0;1.2///0;2///0;3///0;5///cprsmonitor"_AWCMSTA
  1. .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"
  1. .S DIC("DR")=DIC("DR")_";13///7;20///vaftp.domain.ext;21///itmuser;22///Padfoot1;23///0;24///1"
  1. .S (DIC,DIE)="^AWC(177100.12,",DIC(0)="EQLM" K DO,DD D FILE^DICN
  1. ;
  1. EXIT K AWCDIV,AWCDA,AWCDNAME,AWCMSTA,DO,DD,DIC,DIE,DR,%DT,AWCPGDT,X,Y
  1. K AWCX,DA
  1. Q