source: FOIAVistA/trunk/r/IMAGING-MAG-ZMAG/MAGQE2.m@ 1589

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1MAGQE2 ;WOIFO/RMP - Support for MAG Enterprise ; 08/22/2003 13:44
2 ;;3.0;IMAGING;**27,29,20**;Apr 12, 2006
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 ;; | |
11 ;; | The Food and Drug Administration classifies this software as |
12 ;; | a medical device. As such, it may not be changed in any way. |
13 ;; | Modifications to this software may result in an adulterated |
14 ;; | medical device under 21CFR820, the use of which is considered |
15 ;; | to be a violation of US Federal Statutes. |
16 ;; +---------------------------------------------------------------+
17 ;;
18 Q
19 ;
20MAILSHR ; Shared Mail server code
21 N D,D0,D1,D2,DG,DIC,DICR,DIW,XMID,XMY
22 S XMID=$G(DUZ) S:'XMID XMID=.5
23 S XMY(XMID)=""
24 S XMY("G.MAG SERVER")=""
25 S:$G(MAGDUZ) XMY(MAGDUZ)=""
26 S XMSUB=$E(XMSUB,1,63)
27 D SENDMSG^XMXAPI(XMID,XMSUB,"^TMP($J,""MAGQ"")",.XMY,,.XMZ,)
28 I $G(XMERR) M XMERR=^TMP("XMERR",$J) S $EC=",U13-Cannot send MailMan message," K XMERR
29 Q
30 ;
31AHISU(START,STOP) ;
32 N ADHOC
33 S ADHOC=1
34 ;
35ISU ;IMAGING SITE USAGE - SERVER
36 N INST,LOC,PLACE,TMP
37 I $$CONSOLID^MAGQE5() D
38 . S INST="" F S INST=$O(^MAG(2006.1,"B",INST)) Q:INST="" D
39 . . S PLACE=$O(^MAG(2006.1,"B",INST,"")) Q:'PLACE
40 . . Q:($P($G(^MAG(2006.1,PLACE,0)),U)'=INST) ;Screen Associated Institutions
41 . . D ISU1(PLACE,INST)
42 . . Q
43 . Q
44 E D ISU1($O(^MAG(2006.1," "),-1),$$KSP^XUPARAM("INST"))
45 D:'$G(ADHOC) TASK^MAGQE4
46 K ^TMP($J,"MAGQ")
47 Q
48 ;
49ISU1(PLACE,INST) ;
50 I '$G(ADHOC) D TASK Q ; We are already in a TaskMan task...
51 ;
52 S ZTDTH=$$NOW^XLFDT()
53 S ZTRTN="TASK^"_$T(+0)
54 S ZTDESC="Ad-Hoc Imaging Usage Report ("_$$FMTE^XLFDT(START\1)_" - "_$$FMTE^XLFDT(STOP\1)_")"
55 S ZTIO=""
56 S ZTSAVE("START")=START
57 S ZTSAVE("STOP")=STOP
58 S ZTSAVE("PLACE")=PLACE
59 S ZTSAVE("INST")=INST
60 S:$G(ADHOC) ZTSAVE("ADHOC")=1
61 S:$D(MAGDUZ) ZTSAVE("MAGDUZ")=MAGDUZ
62 D ^%ZTLOAD
63 K ZTDTH,ZTRTN,ZTDESC,ZTIO,ZTSAVE
64 Q
65 ;
66MSG(TXT) N I
67 S I=$O(^TMP($J,"MAGQ"," "),-1)+1,^TMP($J,"MAGQ",I)=TXT
68 Q
69 ;
70TASK N DM,I,LOC,NEW,OCONS,PCNT,REC,VR,XMSUB,Y
71 S:'$D(INST) INST=$$KSP^XUPARAM("INST")
72 K ^TMP($J,"MAGQ")
73 I '$G(START)!'$G(STOP) D
74 . S STOP=$$FMADD^XLFDT($$NOW^XLFDT()\100_"01",-1)
75 . S START=STOP\100_"01"
76 . Q
77 D NOW^%DTC S Y=% D DD^%DT
78 S U="^",LOC=$$GET1^DIQ(4,INST,.01)_"^"_INST
79 D MSG(" SITE: "_LOC)
80 D MSG("Reporting Period: "_$$FMTE^XLFDT(START\1)_" - "_$$FMTE^XLFDT(STOP\1))
81 D MSG(" DATE: "_Y_" "_$G(^XMB("TIMEZONE")))
82 D MSG(" DOMAIN: "_$$KSP^XUPARAM("WHERE"))
83 D MSG(" 2005 ENTRIES: "_$P($G(^MAG(2005,0)),"^",4))
84 D MSG(" 2006.81 ENTRIES: "_$$WSP^MAGQE5(PLACE))
85 ; Distribute an array each of the capture and display versions
86 D IWSV^MAGQE1(PLACE)
87 ; VistaRad version
88 S VR=$$VERSION^XPDUTL("MAGJ RADIOLOGY") D:VR'="" MSG("VistaRad Version: "_VR)
89 I $D(^MAGD(2006.599,0)) D MSG("DICOM Error Log:"_+$P(^MAGD(2006.599,0),"^",4))
90 I $D(^MAGD(2006.575,0)) D MSG("DICOM FAILED IMAGES:"_+$P(^MAGD(2006.575,0),"^",4))
91 ; Queue File count & Unprocessed Queue entries
92 D MSG("Queue File count: "_$$QCNT^MAGQE5(.PCNT,PLACE))
93 D MSG("Unprocessed Queue entries: "_PCNT)
94 D ISU2^MAGQE5
95 S X=""
96 S:'$G(ADHOC) X=" ("_$P("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"," ",START\100#100)_" "_(START\10000+1700)_")"
97 S XMSUB=$S($G(ADHOC):"Ad Hoc",1:"Monthly")_" Image Site Usage: "_LOC_X
98 D MAILSHR
99 Q
100 ;
Note: See TracBrowser for help on using the repository browser.