MAGQBUT2 ;WOIFO/SRR/RMP -IMAGE SITE PARAMETERS COMPANION [ 11/08/2001 17:18 ] ;;3.0;IMAGING;**7,8,20**;Apr 12, 2006 ;; +---------------------------------------------------------------+ ;; | Property of the US Government. | ;; | No permission to copy or redistribute this software is given. | ;; | Use of unreleased versions of this software requires the user | ;; | to execute a written test agreement with the VistA Imaging | ;; | Development Office of the Department of Veterans Affairs, | ;; | telephone (301) 734-0100. | ;; | | ;; | The Food and Drug Administration classifies this software as | ;; | a medical device. As such, it may not be changed in any way. | ;; | Modifications to this software may result in an adulterated | ;; | medical device under 21CFR820, the use of which is considered | ;; | to be a violation of US Federal Statutes. | ;; +---------------------------------------------------------------+ ;; VSTAV() ; N VER,IEN,ARRAY,VALUE,LATEST S VER=$$VERSION^XPDUTL("IMAGING") S:$T(LAST^XPDUTL)]"" VER=VER_"^"_$$LAST^XPDUTL("IMAGING",VER) Q VER IWSV(WSD,WSC,WSV,PLACE) ;IMAGE WORKSTATION VERSIONS N IEN,NODE,RD,OS S RD=$$FMADD^XLFDT($$NOW^XLFDT,-180,"","","") S IEN=0 F S IEN=$O(^MAG(2006.81,"C",PLACE,IEN)) Q:IEN'?1N.N D . S NODE=^MAG(2006.81,IEN,0) . Q:($P(NODE,U,3)0) Q "GP" I (($P(N0,U,2)'="")&($P(N0,U,10)?1N.N)&(N1="")) D Q "GO" . S GPDFN=$P($G(^MAG(2005,$P(N0,U,10),0)),U,7) Q I ($P(N0,U,2)'="")&($P(N0,U,10)'?1N.N)&(N1="") Q "NG" Q "ER" PF(IEN,IC,N0,PF,PD0,PD1,PD2,PACS,IOR,APR) ; N N2 S PACS=$S($D(^MAG(2005,IEN,"PACS")):1,1:0) S IOR=$S(IC="GO":$P($G(N0),U,10),1:IEN) I ((IC="GP")!(IC="NG")!((PACS)&(IC="GO"))) S N2=$G(^MAG(2005,IEN,2)) I ((IC="GO")&('PACS)) S N2=$G(^MAG(2005,IOR,2)) S PF=$P(N2,"^",6),PD0=$P(N2,"^",7),PD1=$P(N2,"^",10),PD2=$P(N2,"^",8) I PACS S APR=$S(PD0?1N.N:1,1:0) E S APR=$S(((PF'="")&(PD0?1N.N)):1,$P($G(^MAG(2005,IOR,100)),U)?1N.N:1,$P($G(^MAG(2005,IOR,0)),U,6)="18":1,1:0) Q