source: FOIAVistA/trunk/r/IMAGING-MAG-ZMAG/MAGQE6.m@ 1806

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1MAGQE6 ;WOIFO/OHH - Counts for Remote Image Views ; 08/29/2006 09:48
2 ;;3.0;IMAGING;**46**;16-February-2007;;Build 1023
3 ;; Per VHA Directive 2004-038, this routine should not be modified.
4 ;; +---------------------------------------------------------------+
5 ;; | Property of the US Government. |
6 ;; | No permission to copy or redistribute this software is given. |
7 ;; | Use of unreleased versions of this software requires the user |
8 ;; | to execute a written test agreement with the VistA Imaging |
9 ;; | Development Office of the Department of Veterans Affairs, |
10 ;; | telephone (301) 734-0100. |
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 ; This routine collects information related to telereader read/unread
20 ; list activities and passes it to MAG-Enterprise, so that it will
21 ; appear in the monthly reports.
22 ;
23START(SDATE,EDATE,INST,NMS) ;
24 N AA,AI,COUNT,DIVISION,I,IMAGES,M0,OM,WHERE
25 ;
26 F AA=0,1 F I=1:1:6 S COUNT(AA,I)=0
27 S DIVISION=INST_$$GETAI^MAGQE5($$PLACE^MAGBAPI(INST),"^")
28 F I=1:1 S AI=$P(DIVISION,"^",I) Q:'AI D:$D(^MAG(2006.5849,"E",AI))
29 . S AA=$O(^MAG(2006.5849,"E",AI,SDATE),-1)
30 . F S AA=$O(^MAG(2006.5849,"E",AI,AA)) Q:'AA Q:AA>EDATE D
31 . . S OM="" F S OM=$O(^MAG(2006.5849,"E",AI,AA,OM)) Q:'OM D
32 . . . S M0=^MAG(2006.5849,OM,0) Q:$P(M0,"^",11)'="R"
33 . . . S WHERE=$P(M0,"^",16)=$P(M0,"^",2)
34 . . . S COUNT(WHERE,1)=COUNT(WHERE,1)+1
35 . . . S COUNT(WHERE,2)=COUNT(WHERE,2)+$P(M0,"^",10)
36 . . . I $P(M0,"^",18)>0,$P(M0,"^",17)>0 S COUNT(WHERE,3)=COUNT(WHERE,3)+$$FMDIFF^XLFDT($P(M0,"^",18),$P(M0,"^",17),2)
37 . . . I $P(M0,"^",18)>0,$P(M0,"^",17)>0 S COUNT(WHERE,4)=COUNT(WHERE,4)+1
38 . . . S:$P(M0,"^",17)="" COUNT(WHERE,6)=COUNT(WHERE,6)+1
39 . . . I $P(M0,"^",9)>0,$P(M0,"^",7)>0 S COUNT(WHERE,5)=COUNT(WHERE,5)+$$FMDIFF^XLFDT($P(M0,"^",9),$P(M0,"^",7),2)
40 . . . Q
41 . . Q
42 . Q
43 ;
44 ; Output collected data:
45 D:COUNT(1,1)+COUNT(0,1)
46 . I NMS'="",$E(NMS,$L(NMS))'=" " S NMS=NMS_" "
47 . D MSG^MAGQE2(NMS_"SPECIALITY: 57")
48 . D MSG^MAGQE2(NMS_"PROCEDURE: 88")
49 . D MSG^MAGQE2(NMS_"LOCAL STUDIES: "_COUNT(1,1))
50 . D MSG^MAGQE2(NMS_"REMOTE STUDIES: "_COUNT(0,1))
51 . D MSG^MAGQE2(NMS_"LOCAL IMAGES: "_COUNT(1,2))
52 . D MSG^MAGQE2(NMS_"REMOTE IMAGES: "_COUNT(0,2))
53 . D MSG^MAGQE2(NMS_"LOCAL READING TIME: "_COUNT(1,3))
54 . D MSG^MAGQE2(NMS_"REMOTE READING TIME: "_COUNT(0,3))
55 . D MSG^MAGQE2(NMS_"RESULTED LOCALLY BY TELEREADER: "_COUNT(1,4))
56 . D MSG^MAGQE2(NMS_"RESULTED LOCALLY BY CPRS: "_COUNT(1,6))
57 . D MSG^MAGQE2(NMS_"RESULTED REMOTELY BY TELEREADER: "_COUNT(0,4))
58 . D MSG^MAGQE2(NMS_"RESULTED REMOTELY BY CPRS: "_COUNT(0,6))
59 . D MSG^MAGQE2(NMS_"LOCAL ACQUISITION TIME: "_COUNT(1,5))
60 . D MSG^MAGQE2(NMS_"REMOTE ACQUISITION TIME: "_COUNT(0,5))
61 . Q
62 Q
63 ;
Note: See TracBrowser for help on using the repository browser.