| NAME | 
MAGG IMAGE STATISTICS QUE | 
| TAG | 
STATS | 
| ROUTINE | 
MAGGA03Q | 
| RETURN VALUE TYPE | 
GLOBAL ARRAY | 
| AVAILABILITY | 
RESTRICTED | 
| WORD WRAP ON | 
TRUE | 
| DESCRIPTION | 
The MAGG QUEUE IMAGE STATISTICS remote procedure queues a job through
TaskMan that queries the image file(s) and returns various
statistics/summary data. Currently, 2 queries are implemented:
 
  Counts of images captured in the provided date range grouped by the 
  image status codes.
 
  Counts of images captured in the provided date range grouped by users 
  and image status codes.
 
 | 
| INPUT PARAMETER | 
- 
- FLAGS
 
- PARAMETER TYPE:    LITERAL
 
- REQUIRED:    YES
 
- SEQUENCE NUMBER:    1
 
- DESCRIPTION:    
Flags that control the execution (can be combined):
     Otherwise, values of those parameters are
     treated as the date range when procedures were
     performed (see the PROCEDURE/EXAM DATE/TIME
     field (15) and cross-references "APDTPX" and
     "APDT").
  
  D  Include only deleted images (file #2005.1)
  E  Include only existing images (file #2005)
  
  S  Return image counts grouped by status
  
  U  Return image counts grouped by users and status
  
If neither 'E' nor 'D' flag is provided, then an error code (-6) is
returned.
  
If neither 'S' nor 'U' flag is provided, then an error code (-6) is
returned.
  C  Capture date range. If this flag is provided,
     then the remote procedure uses values of the
     FROMDATE and TODATE parameters to select images
     that were captured in this date range (see the
     DATE/TIME IMAGE SAVED field (7) and the "AD"
     cross-reference).
  
 
 
- 
- FROMDATE
 
- PARAMETER TYPE:    LITERAL
 
- SEQUENCE NUMBER:    2
 
- DESCRIPTION:    
Beginning of the date range for image selection. Dates can be in internal
range are included in the search. For example, in order to search images
for May 21, 2008, the internal value of both parameters should be 3080521.
or external FileMan format. If the parameter is not defined or empty, 
then the date range remains open on this side.
  
Depending on the value of the FLAGS parameter, the date range filter is
applied either to the exam/procedure dates (PROCEDURE/EXAM DATE/TIME 
field (15)) or image capture dates (DATE/TIME IMAGE SAVED field (7)).
  
Time parts of date range parameters are ignored and both ends of the date
 
 
 
- 
- TODATE
 
- PARAMETER TYPE:    LITERAL
 
- SEQUENCE NUMBER:    3
 
- DESCRIPTION:    
End of the date range for image selection. Dates can be in internal or
range are included in the search. For example, in order to search images
for May 21, 2008, the internal value of both parameters should be 3080521.
external FileMan format. If the parameter is not defined or empty, then
the date range remains open on this side.
  
Depending on the value of the FLAGS parameter, the date range filter is
applied either to the exam/procedure dates (PROCEDURE/EXAM DATE/TIME 
field (15)) or image capture dates (DATE/TIME IMAGE SAVED field (7)).
  
Time parts of date range parameters are ignored and both ends of the date
 
 
 
- 
- MQUE
 
- PARAMETER TYPE:    LITERAL
 
- SEQUENCE NUMBER:    4
 
- DESCRIPTION:    
Flags for tasking reports and action on previously tasked reports.
  D  Stop a running or completed report task and delete all associated
     data from temporary storage.
 
  Q  (Default) Queue a new report task or return the status of In 
     Progress for a running report. If previously ran task is complete,
     then the report data is returned in the output of the RPC.
 
  R  Stop and Re-queue a running report task with the same parameters.
     Existing data collected is removed from temporary storage.
 
 
 
 
 | 
| RETURN PARAMETER DESCRIPTION | 
Zero value of the first '^'-piece of the Results[0] indicates that an
                           ^01: Error code
                           ^02: Message
                           ^03: Error location
                           ^04: Message type
  
   Results[j]            Line of the additional info (optional)
                           ^01: ""
                           ^02: Text  
  
Otherwise, '1^Ok' is returned in the Results[0] and subsequent nodes 
error occurred during the execution of the procedure. In this case, the
contain requested data:
  
   Results[i]            Header of the counts grouped by status
                           ^01: "S"
                           ^02: empty
                           ^03: Number of "S"-items
                           ^04: empty
                           ^05: "Totals"
                           ^06: Number of image entries
                           ^07: Number of images/pages
errors are returned in the Results array as shown below:
          
   Results[i+j]          Image status record
                           ^01: "S"
                           ^02: Sequential number of the "S"-item
                           ^03: empty
                           ^04: Internal value of the STATUS field (113).
                                If this piece is empty or 0, then the
                                record contains counts of images with 
                                empty STATUS field.
                           ^05: External value of the STATUS field (113)
   
                           ^06: Number of image entries
                           ^07: Number of images/pages
         
   Results[i]            Header of the counts grouped by users and status
                           ^01: "U"
                           ^02: empty
                           ^03: Number of "U"-items
                           ^04: empty
                           ^05: "Totals"
                           ^06: Number of image entries
   Results[0]            Result descriptor
                           ^07: Number of images/pages
          
   Results[i+j]          User record
                           ^01: "U"
                           ^02: Sequential number of the "U"-item
                           ^03: Number of "US"-items
                           ^04: User IEN (DUZ).
                                If this piece is empty or 0, then the
                                record contains counts of images that 
                                are not associated with a user.
                           ^01: 0
                           ^05: User name
                           ^06: Number of image entries
                           ^07: Number of images/pages
                           ^08: Percentage of verified images
          
   Results[i+j+k]        User/status record
                           ^01: "US"
                           ^02: Sequential number of the "US"-item
                           ^03: empty
                           ^04: Internal value of the STATUS field (113).
                           ^02: Message
                                If this piece is empty or 0, then the
                                record contains counts of images with 
                                empty STATUS field.
                           ^05: External value of the STATUS field (113)
                           ^06: Number of image entries
                           ^07: Number of images/pages
   
   Results[i]            Error descriptor
 |