MAGQE5 ;WOIFO/RMP - Support for MAG Enterprise ; 08/29/2006 09:48
;;3.0;IMAGING;**27,29,8,30,20,46,39**;Mar 19, 2002;Build 2010;Mar 08, 2011
;; Per VHA Directive 2004-038, this routine should not be modified.
;; +---------------------------------------------------------------+
;; | 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. |
;; +---------------------------------------------------------------+
;;
Q
ISU2 ;
; Workstation Session and Patient counts
N CCNT,D0,DATE,ICNT,M1,M2,PCNT,RES,SCNAD,SCNMN,SCNT,TD,TD1,UNSCN,VD,VI,X1,X2,YR,AI,DUP,IQ,TIOP,TGPP,TIEDP
N GRPPRNT,IMAGE,DELETED
S (SCNT,PCNT,ICNT,CCNT,DUP,TIOP,TGPP,TIEDP,GRPPRNT,IMAGE,DELETED)=0
S (VD,VI)=""
I '$$CONSOLID() D
. S DATE="L"_START
. F S DATE=$O(^MAG(2006.82,"AC",DATE)) Q:DATE="" Q:$P(DATE,"L",2)\1>STOP D
. . S D0=0 F S D0=$O(^MAG(2006.82,"AC",DATE,D0)) Q:'D0 D
. . . Q:'$D(^MAG(2006.82,D0,1))
. . . S SCNT=SCNT+1
. . . S PCNT=PCNT+$P($G(^MAG(2006.82,D0,1)),"^",1)
. . . D ACT^MAGQE3(D0,.ICNT,.CCNT,.VD,.VI,.RES)
. . . Q
. . Q
. Q
E D
. S DATE=START
. F S DATE=$O(^MAG(2006.82,"APL",PLACE,DATE)) Q:DATE="" Q:DATE\1>STOP D
. . S D0=0 F S D0=$O(^MAG(2006.82,"APL",PLACE,DATE,D0)) Q:D0'?1.N D
. . . Q:'$D(^MAG(2006.82,D0,1))
. . . S SCNT=SCNT+1
. . . S PCNT=PCNT+$P($G(^MAG(2006.82,D0,1)),"^",1)
. . . D ACT^MAGQE3(D0,.ICNT,.CCNT,.VD,.VI,.RES)
. . . Q
. . Q
. Q
S X1=START,X2=STOP D ^%DTC S X=$TR(X,"-")+1_" day "
D MSG^MAGQE2(X_"Image Workstation Sessions: "_SCNT)
D MSG^MAGQE2(X_"Image Workstation Patients: "_PCNT)
D MSG^MAGQE2(X_"Image Workstation Images: "_ICNT)
D MSG^MAGQE2(X_"Image Workstation Captures: "_CCNT)
D MSG^MAGQE2(X_"VistaRad WS Display: "_VD)
D MSG^MAGQE2(X_"VistaRad WS Interpretations: "_VI)
K VD,VI
I $T(AVERAGE^MAGBRTLD)'="" D
. D MSG^MAGQE2(X_"average daily routed images: "_$$AVERAGE^MAGBRTLD())
. Q
D BPV^MAGQE1(PLACE)
D MSG^MAGQE2("Vista Image Version/Build: "_$$VSTAV^MAGQE1())
D DICOMV^MAGQE1()
D MSG^MAGQE2("Image file namespace(s): "_$$SNS^MAGQE1(PLACE))
S I="" F S I=$O(RES(I)) Q:I="" D
. S RES="" F S RES=$O(RES(I,RES)) Q:RES="" D
. . S X=$TR(I,"^")_"^"_RES S $P(X,"^",6)=RES(I,RES)
. . D MSG^MAGQE2(" RESOLUTION: "_X)
. . Q
. Q
K RES
;
S AI=$$GETAI(PLACE)
D COUNT^MAGQE3(START,STOP,INST,AI,.IQ,.DUP,.TIOP,.TGPP,.TIEDP,.GRPPRNT,.IMAGE,.DELETED)
D MSG^MAGQE2("Total Image Objects for Place: "_TIOP)
D MSG^MAGQE2("Total Group Parents for Place: "_TGPP)
D MSG^MAGQE2("Total Image Entry Deletes for Place: "_TIEDP)
D MSG^MAGQE2("Image file group parents: "_GRPPRNT)
D MSG^MAGQE2("Image file objects: "_IMAGE)
D MSG^MAGQE2("Image file deletes: "_DELETED)
;
S (I,D0)=0 F S D0=$O(^TMP($J,"MAGQ","ACQPAT",D0)) Q:D0="" S I=I+1
D MSG^MAGQE2("Unique Image patients captured: "_I)
K ^TMP($J,"MAGQ","ACQPAT")
S (I,D0)=0 F S D0=$O(^TMP($J,"MAGQ","DISPAT",D0)) Q:D0="" S I=I+1
D MSG^MAGQE2("Unique Image patients display: "_I)
K ^TMP($J,"MAGQ","DISPAT")
S (I,D0)=0 F S D0=$O(^TMP($J,"MAGQ","ALLPAT",D0)) Q:D0="" S I=I+1
D MSG^MAGQE2("Unique Image patients All: "_I)
K ^TMP($J,"MAGQ","ALLPAT")
D MSG^MAGQE2("Total Non-Verified Images for Place: "_$P(IQ,U,1))
D MSG^MAGQE2("Total Verified Images for Place: "_$P(IQ,U,2))
D MSG^MAGQE2("Total Integrity Issues for Place: "_$P(IQ,U,3))
D MSG^MAGQE2("Total Duplicate Images for Place: "_DUP)
D START^MAGQE6(START,STOP,INST,"TLR")
D ADCNT^MAGQE3(START,STOP,INST,AI)
D GPACHX^MAGQE3()
D GS1^MAGQE5() ;Get Share data
D AI1^MAGQE5() ;Get Associated Institutions
D GATH^MAGQE6(START,STOP,INST) ;Gather remote va/dod views
Q
;
AHOPT ;
N %DT,START,STOP,X,Y
S STOP=$$FMADD^XLFDT($$NOW^XLFDT()\100_"01",-1)
S START=STOP\100_"01"
S Y=START D DD^%DT S %DT("B")=Y
S %DT="AEXP",%DT("A")="Enter starting Date: "
D ^%DT I ((X="")!(X="^")!($D(DTOUT))) K %DT(0),DTOUT Q
S START=Y
S Y=STOP D DD^%DT S %DT("B")=Y
S %DT="AEXP",%DT("A")="Enter ending Date: "
D ^%DT I ((X="")!(X="^")!($D(DTOUT))) K %DT(0),DTOUT Q
S STOP=Y
W !!,"Creating ad-hoc report over the period "
W $$DT(START)," until ",$$DT(STOP),".",!
D AHISU^MAGQE2(START,STOP)
Q
;
DT(X) ;
Q (X\1#100)_"-"_$P("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"," ",X\100#100)_"-"_(X\10000+1700)
;
LLOAD(AR,LBL) ;
N I
S I="" F S I=$O(AR(I)) Q:I="" D MSG^MAGQE2(" "_LBL_" "_I_"^"_AR(I))
Q
;
GETPLACE(PLACE) ; Validate place
S PLACE=$S($$CONSOLID():$G(PLACE),1:+$O(^MAG(2006.1," "),-1)) Q:'PLACE 0
S:$P($G(^MAG(2006.1,PLACE,0)),"^",1)="" PLACE=0
Q PLACE
;
CONSOLID() ;
; Return value: 0 = site not consolidated,
; 1 = site is consolidated
N FLDNFO
D FIELD^DID(2006.1,.01,"","SPECIFIER","FLDNFO")
I $G(FLDNFO("SPECIFIER"))["P" Q 1
Q 0
;
PLACE(INST) ;
Q:'$$CONSOLID() +$O(^MAG(2006.1," "),-1)
Q $$GETPLACE(+$O(^MAG(2006.1,"B",INST,"")))
;
QCNT(READY,PLACE) ;
N D0,FAILED,NEXT,TYPE
S (READY,FAILED)=0
I $$CONSOLID() D
. S TYPE="" F S TYPE=$O(^MAGQUEUE(2006.031,"C",PLACE,TYPE)) Q:TYPE="" D
. . S NEXT=+$O(^MAGQUEUE(2006.031,"C",PLACE,TYPE,""))
. . S NEXT=+$P($G(^MAGQUEUE(2006.031,NEXT,0)),"^",2)
. . S D0=0 F S D0=$O(^MAGQUEUE(2006.03,"C",PLACE,TYPE,D0)) Q:'D0 D
. . . I D0<NEXT S FAILED=FAILED+1
. . . E S READY=READY+1
. . . Q
. . Q
E D
. S TYPE="" F S TYPE=$O(^MAGQUEUE(2006.031,"B",TYPE)) Q:TYPE="" D
. . S NEXT=+$O(^MAGQUEUE(2006.031,"B",TYPE,""))
. . S NEXT=+$P($G(^MAGQUEUE(2006.031,NEXT,0)),"^",2)
. . S D0=0 F S D0=$O(^MAGQUEUE(2006.03,"B",TYPE,D0)) Q:'D0 D
. . . I D0<NEXT S FAILED=FAILED+1
. . . E S READY=READY+1
. . . Q
. . Q
. Q
Q READY+FAILED
;
WSP(PLACE) ; Imaging workstations per place
N COUNT,D0,RD
S RD=$$FMADD^XLFDT($$NOW^XLFDT,-180,"","","")
S (D0,COUNT)=0 F S D0=$O(^MAG(2006.81,"C",PLACE,D0)) Q:'D0 D
. S:$P(^MAG(2006.81,D0,0),"^",3)'<RD COUNT=COUNT+1
. Q
Q COUNT
;
MAGDUZ2() Q $G(DUZ(2),$$KSP^XUPARAM("INST"))
;
GS1() ; Get local Network location share data
N I,L,M,MSG,RESULT,TAR
S RESULT(0)="NETWORK LOCATION^PHYSICAL REFERENCE^TOTAL SPACE^FREE SPACE^OPERATIONAL STATUS^READ ONLY^STORAGE TYPE^HASH^ROUTER"
D LIST^DIC(2005.2,"","@;.01;1;2;4;5;5.5;6;7;26","","","","","","I $P(^(0),U,10)=PLACE","","TAR","MSG")
Q:$D(MSG("DIERR"))
S L=0 F S L=$O(TAR("DILIST","ID",L)) Q:'L D
. S RESULT(L)=$P(TAR("DILIST","ID",L,.01),U,1)
. F M=1,2,4,5,5.5,6,7,26 S RESULT(L)=RESULT(L)_U_$P(TAR("DILIST","ID",L,M),U,1)
. Q
S I="" F S I=$O(RESULT(I)) Q:I="" D
. D MSG^MAGQE2("LOCAL NETWORK LOCATIONS: "_I_"^"_RESULT(I))
. Q
K TAR,MSG,RESULT
Q
AI1() ; get Associated Institutions list per place
N I,L,M,MSG,RESULT,TAR
S RESULT(0)="Associated Institutions"
D LIST^DIC(2006.12,","_PLACE_",","@;.01","","","","","","","","TAR","MSG")
Q:$D(MSG("DIERR"))
S L=0 F S L=$O(TAR("DILIST","ID",L)) Q:'L D
. S RESULT(L)=$P(TAR("DILIST","ID",L,.01),U,1)
. Q
S I="" F S I=$O(RESULT(I)) Q:I="" D
. D MSG^MAGQE2("ASSOCIATED INSTITUTIONS: "_I_"^"_RESULT(I))
. Q
K TAR,MSG,RESULT
Q
GETAI(PLACE,PARAM) ;
N I,J
S PARAM=$S('$D(PARAM):U,PARAM="":U,1:PARAM)
S I="",J=PARAM
F S I=$O(^MAG(2006.1,PLACE,"INSTS","B",I)) Q:I="" S J=J_I_PARAM
Q J
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGQE5 7961 printed Dec 13, 2024@02:08:04 Page 2
MAGQE5 ;WOIFO/RMP - Support for MAG Enterprise ; 08/29/2006 09:48
+1 ;;3.0;IMAGING;**27,29,8,30,20,46,39**;Mar 19, 2002;Build 2010;Mar 08, 2011
+2 ;; Per VHA Directive 2004-038, this routine should not be modified.
+3 ;; +---------------------------------------------------------------+
+4 ;; | Property of the US Government. |
+5 ;; | No permission to copy or redistribute this software is given. |
+6 ;; | Use of unreleased versions of this software requires the user |
+7 ;; | to execute a written test agreement with the VistA Imaging |
+8 ;; | Development Office of the Department of Veterans Affairs, |
+9 ;; | telephone (301) 734-0100. |
+10 ;; | The Food and Drug Administration classifies this software as |
+11 ;; | a medical device. As such, it may not be changed in any way. |
+12 ;; | Modifications to this software may result in an adulterated |
+13 ;; | medical device under 21CFR820, the use of which is considered |
+14 ;; | to be a violation of US Federal Statutes. |
+15 ;; +---------------------------------------------------------------+
+16 ;;
+17 QUIT
ISU2 ;
+1 ; Workstation Session and Patient counts
+2 NEW CCNT,D0,DATE,ICNT,M1,M2,PCNT,RES,SCNAD,SCNMN,SCNT,TD,TD1,UNSCN,VD,VI,X1,X2,YR,AI,DUP,IQ,TIOP,TGPP,TIEDP
+3 NEW GRPPRNT,IMAGE,DELETED
+4 SET (SCNT,PCNT,ICNT,CCNT,DUP,TIOP,TGPP,TIEDP,GRPPRNT,IMAGE,DELETED)=0
+5 SET (VD,VI)=""
+6 IF '$$CONSOLID()
Begin DoDot:1
+7 SET DATE="L"_START
+8 FOR
SET DATE=$ORDER(^MAG(2006.82,"AC",DATE))
if DATE=""
QUIT
if $PIECE(DATE,"L",2)\1>STOP
QUIT
Begin DoDot:2
+9 SET D0=0
FOR
SET D0=$ORDER(^MAG(2006.82,"AC",DATE,D0))
if 'D0
QUIT
Begin DoDot:3
+10 if '$DATA(^MAG(2006.82,D0,1))
QUIT
+11 SET SCNT=SCNT+1
+12 SET PCNT=PCNT+$PIECE($GET(^MAG(2006.82,D0,1)),"^",1)
+13 DO ACT^MAGQE3(D0,.ICNT,.CCNT,.VD,.VI,.RES)
+14 QUIT
End DoDot:3
+15 QUIT
End DoDot:2
+16 QUIT
End DoDot:1
+17 IF '$TEST
Begin DoDot:1
+18 SET DATE=START
+19 FOR
SET DATE=$ORDER(^MAG(2006.82,"APL",PLACE,DATE))
if DATE=""
QUIT
if DATE\1>STOP
QUIT
Begin DoDot:2
+20 SET D0=0
FOR
SET D0=$ORDER(^MAG(2006.82,"APL",PLACE,DATE,D0))
if D0'?1.N
QUIT
Begin DoDot:3
+21 if '$DATA(^MAG(2006.82,D0,1))
QUIT
+22 SET SCNT=SCNT+1
+23 SET PCNT=PCNT+$PIECE($GET(^MAG(2006.82,D0,1)),"^",1)
+24 DO ACT^MAGQE3(D0,.ICNT,.CCNT,.VD,.VI,.RES)
+25 QUIT
End DoDot:3
+26 QUIT
End DoDot:2
+27 QUIT
End DoDot:1
+28 SET X1=START
SET X2=STOP
DO ^%DTC
SET X=$TRANSLATE(X,"-")+1_" day "
+29 DO MSG^MAGQE2(X_"Image Workstation Sessions: "_SCNT)
+30 DO MSG^MAGQE2(X_"Image Workstation Patients: "_PCNT)
+31 DO MSG^MAGQE2(X_"Image Workstation Images: "_ICNT)
+32 DO MSG^MAGQE2(X_"Image Workstation Captures: "_CCNT)
+33 DO MSG^MAGQE2(X_"VistaRad WS Display: "_VD)
+34 DO MSG^MAGQE2(X_"VistaRad WS Interpretations: "_VI)
+35 KILL VD,VI
+36 IF $TEXT(AVERAGE^MAGBRTLD)'=""
Begin DoDot:1
+37 DO MSG^MAGQE2(X_"average daily routed images: "_$$AVERAGE^MAGBRTLD())
+38 QUIT
End DoDot:1
+39 DO BPV^MAGQE1(PLACE)
+40 DO MSG^MAGQE2("Vista Image Version/Build: "_$$VSTAV^MAGQE1())
+41 DO DICOMV^MAGQE1()
+42 DO MSG^MAGQE2("Image file namespace(s): "_$$SNS^MAGQE1(PLACE))
+43 SET I=""
FOR
SET I=$ORDER(RES(I))
if I=""
QUIT
Begin DoDot:1
+44 SET RES=""
FOR
SET RES=$ORDER(RES(I,RES))
if RES=""
QUIT
Begin DoDot:2
+45 SET X=$TRANSLATE(I,"^")_"^"_RES
SET $PIECE(X,"^",6)=RES(I,RES)
+46 DO MSG^MAGQE2(" RESOLUTION: "_X)
+47 QUIT
End DoDot:2
+48 QUIT
End DoDot:1
+49 KILL RES
+50 ;
+51 SET AI=$$GETAI(PLACE)
+52 DO COUNT^MAGQE3(START,STOP,INST,AI,.IQ,.DUP,.TIOP,.TGPP,.TIEDP,.GRPPRNT,.IMAGE,.DELETED)
+53 DO MSG^MAGQE2("Total Image Objects for Place: "_TIOP)
+54 DO MSG^MAGQE2("Total Group Parents for Place: "_TGPP)
+55 DO MSG^MAGQE2("Total Image Entry Deletes for Place: "_TIEDP)
+56 DO MSG^MAGQE2("Image file group parents: "_GRPPRNT)
+57 DO MSG^MAGQE2("Image file objects: "_IMAGE)
+58 DO MSG^MAGQE2("Image file deletes: "_DELETED)
+59 ;
+60 SET (I,D0)=0
FOR
SET D0=$ORDER(^TMP($JOB,"MAGQ","ACQPAT",D0))
if D0=""
QUIT
SET I=I+1
+61 DO MSG^MAGQE2("Unique Image patients captured: "_I)
+62 KILL ^TMP($JOB,"MAGQ","ACQPAT")
+63 SET (I,D0)=0
FOR
SET D0=$ORDER(^TMP($JOB,"MAGQ","DISPAT",D0))
if D0=""
QUIT
SET I=I+1
+64 DO MSG^MAGQE2("Unique Image patients display: "_I)
+65 KILL ^TMP($JOB,"MAGQ","DISPAT")
+66 SET (I,D0)=0
FOR
SET D0=$ORDER(^TMP($JOB,"MAGQ","ALLPAT",D0))
if D0=""
QUIT
SET I=I+1
+67 DO MSG^MAGQE2("Unique Image patients All: "_I)
+68 KILL ^TMP($JOB,"MAGQ","ALLPAT")
+69 DO MSG^MAGQE2("Total Non-Verified Images for Place: "_$PIECE(IQ,U,1))
+70 DO MSG^MAGQE2("Total Verified Images for Place: "_$PIECE(IQ,U,2))
+71 DO MSG^MAGQE2("Total Integrity Issues for Place: "_$PIECE(IQ,U,3))
+72 DO MSG^MAGQE2("Total Duplicate Images for Place: "_DUP)
+73 DO START^MAGQE6(START,STOP,INST,"TLR")
+74 DO ADCNT^MAGQE3(START,STOP,INST,AI)
+75 DO GPACHX^MAGQE3()
+76 ;Get Share data
DO GS1^MAGQE5()
+77 ;Get Associated Institutions
DO AI1^MAGQE5()
+78 ;Gather remote va/dod views
DO GATH^MAGQE6(START,STOP,INST)
+79 QUIT
+80 ;
AHOPT ;
+1 NEW %DT,START,STOP,X,Y
+2 SET STOP=$$FMADD^XLFDT($$NOW^XLFDT()\100_"01",-1)
+3 SET START=STOP\100_"01"
+4 SET Y=START
DO DD^%DT
SET %DT("B")=Y
+5 SET %DT="AEXP"
SET %DT("A")="Enter starting Date: "
+6 DO ^%DT
IF ((X="")!(X="^")!($DATA(DTOUT)))
KILL %DT(0),DTOUT
QUIT
+7 SET START=Y
+8 SET Y=STOP
DO DD^%DT
SET %DT("B")=Y
+9 SET %DT="AEXP"
SET %DT("A")="Enter ending Date: "
+10 DO ^%DT
IF ((X="")!(X="^")!($DATA(DTOUT)))
KILL %DT(0),DTOUT
QUIT
+11 SET STOP=Y
+12 WRITE !!,"Creating ad-hoc report over the period "
+13 WRITE $$DT(START)," until ",$$DT(STOP),".",!
+14 DO AHISU^MAGQE2(START,STOP)
+15 QUIT
+16 ;
DT(X) ;
+1 QUIT (X\1#100)_"-"_$PIECE("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"," ",X\100#100)_"-"_(X\10000+1700)
+2 ;
LLOAD(AR,LBL) ;
+1 NEW I
+2 SET I=""
FOR
SET I=$ORDER(AR(I))
if I=""
QUIT
DO MSG^MAGQE2(" "_LBL_" "_I_"^"_AR(I))
+3 QUIT
+4 ;
GETPLACE(PLACE) ; Validate place
+1 SET PLACE=$SELECT($$CONSOLID():$GET(PLACE),1:+$ORDER(^MAG(2006.1," "),-1))
if 'PLACE
QUIT 0
+2 if $PIECE($GET(^MAG(2006.1,PLACE,0)),"^",1)=""
SET PLACE=0
+3 QUIT PLACE
+4 ;
CONSOLID() ;
+1 ; Return value: 0 = site not consolidated,
+2 ; 1 = site is consolidated
+3 NEW FLDNFO
+4 DO FIELD^DID(2006.1,.01,"","SPECIFIER","FLDNFO")
+5 IF $GET(FLDNFO("SPECIFIER"))["P"
QUIT 1
+6 QUIT 0
+7 ;
PLACE(INST) ;
+1 if '$$CONSOLID()
QUIT +$ORDER(^MAG(2006.1," "),-1)
+2 QUIT $$GETPLACE(+$ORDER(^MAG(2006.1,"B",INST,"")))
+3 ;
QCNT(READY,PLACE) ;
+1 NEW D0,FAILED,NEXT,TYPE
+2 SET (READY,FAILED)=0
+3 IF $$CONSOLID()
Begin DoDot:1
+4 SET TYPE=""
FOR
SET TYPE=$ORDER(^MAGQUEUE(2006.031,"C",PLACE,TYPE))
if TYPE=""
QUIT
Begin DoDot:2
+5 SET NEXT=+$ORDER(^MAGQUEUE(2006.031,"C",PLACE,TYPE,""))
+6 SET NEXT=+$PIECE($GET(^MAGQUEUE(2006.031,NEXT,0)),"^",2)
+7 SET D0=0
FOR
SET D0=$ORDER(^MAGQUEUE(2006.03,"C",PLACE,TYPE,D0))
if 'D0
QUIT
Begin DoDot:3
+8 IF D0<NEXT
SET FAILED=FAILED+1
+9 IF '$TEST
SET READY=READY+1
+10 QUIT
End DoDot:3
+11 QUIT
End DoDot:2
End DoDot:1
+12 IF '$TEST
Begin DoDot:1
+13 SET TYPE=""
FOR
SET TYPE=$ORDER(^MAGQUEUE(2006.031,"B",TYPE))
if TYPE=""
QUIT
Begin DoDot:2
+14 SET NEXT=+$ORDER(^MAGQUEUE(2006.031,"B",TYPE,""))
+15 SET NEXT=+$PIECE($GET(^MAGQUEUE(2006.031,NEXT,0)),"^",2)
+16 SET D0=0
FOR
SET D0=$ORDER(^MAGQUEUE(2006.03,"B",TYPE,D0))
if 'D0
QUIT
Begin DoDot:3
+17 IF D0<NEXT
SET FAILED=FAILED+1
+18 IF '$TEST
SET READY=READY+1
+19 QUIT
End DoDot:3
+20 QUIT
End DoDot:2
+21 QUIT
End DoDot:1
+22 QUIT READY+FAILED
+23 ;
WSP(PLACE) ; Imaging workstations per place
+1 NEW COUNT,D0,RD
+2 SET RD=$$FMADD^XLFDT($$NOW^XLFDT,-180,"","","")
+3 SET (D0,COUNT)=0
FOR
SET D0=$ORDER(^MAG(2006.81,"C",PLACE,D0))
if 'D0
QUIT
Begin DoDot:1
+4 if $PIECE(^MAG(2006.81,D0,0),"^",3)'<RD
SET COUNT=COUNT+1
+5 QUIT
End DoDot:1
+6 QUIT COUNT
+7 ;
MAGDUZ2() QUIT $GET(DUZ(2),$$KSP^XUPARAM("INST"))
+1 ;
GS1() ; Get local Network location share data
+1 NEW I,L,M,MSG,RESULT,TAR
+2 SET RESULT(0)="NETWORK LOCATION^PHYSICAL REFERENCE^TOTAL SPACE^FREE SPACE^OPERATIONAL STATUS^READ ONLY^STORAGE TYPE^HASH^ROUTER"
+3 DO LIST^DIC(2005.2,"","@;.01;1;2;4;5;5.5;6;7;26","","","","","","I $P(^(0),U,10)=PLACE","","TAR","MSG")
+4 if $DATA(MSG("DIERR"))
QUIT
+5 SET L=0
FOR
SET L=$ORDER(TAR("DILIST","ID",L))
if 'L
QUIT
Begin DoDot:1
+6 SET RESULT(L)=$PIECE(TAR("DILIST","ID",L,.01),U,1)
+7 FOR M=1,2,4,5,5.5,6,7,26
SET RESULT(L)=RESULT(L)_U_$PIECE(TAR("DILIST","ID",L,M),U,1)
+8 QUIT
End DoDot:1
+9 SET I=""
FOR
SET I=$ORDER(RESULT(I))
if I=""
QUIT
Begin DoDot:1
+10 DO MSG^MAGQE2("LOCAL NETWORK LOCATIONS: "_I_"^"_RESULT(I))
+11 QUIT
End DoDot:1
+12 KILL TAR,MSG,RESULT
+13 QUIT
AI1() ; get Associated Institutions list per place
+1 NEW I,L,M,MSG,RESULT,TAR
+2 SET RESULT(0)="Associated Institutions"
+3 DO LIST^DIC(2006.12,","_PLACE_",","@;.01","","","","","","","","TAR","MSG")
+4 if $DATA(MSG("DIERR"))
QUIT
+5 SET L=0
FOR
SET L=$ORDER(TAR("DILIST","ID",L))
if 'L
QUIT
Begin DoDot:1
+6 SET RESULT(L)=$PIECE(TAR("DILIST","ID",L,.01),U,1)
+7 QUIT
End DoDot:1
+8 SET I=""
FOR
SET I=$ORDER(RESULT(I))
if I=""
QUIT
Begin DoDot:1
+9 DO MSG^MAGQE2("ASSOCIATED INSTITUTIONS: "_I_"^"_RESULT(I))
+10 QUIT
End DoDot:1
+11 KILL TAR,MSG,RESULT
+12 QUIT
GETAI(PLACE,PARAM) ;
+1 NEW I,J
+2 SET PARAM=$SELECT('$DATA(PARAM):U,PARAM="":U,1:PARAM)
+3 SET I=""
SET J=PARAM
+4 FOR
SET I=$ORDER(^MAG(2006.1,PLACE,"INSTS","B",I))
if I=""
QUIT
SET J=J_I_PARAM
+5 QUIT J
+6 ;