gov.lanl.Web
Class SyndromeReport

java.lang.Object
  |
  +--gov.lanl.Web.SyndromeReport

public class SyndromeReport
extends java.lang.Object

Version:
$Revision: 1.27 $ $Date: 2003/02/07 18:14:22 $
Author:
$Author: dwokoun $

Nested Class Summary
static class SyndromeReport.CalendarComparator
           
static class SyndromeReport.PageStats
          Holder class for the results of a Page's statistic computation.
 
Constructor Summary
SyndromeReport()
          Creates new SyndromeReport with default chart (JFreeChart)
SyndromeReport(JFreeChartGenericChart chart)
          Creates new SyndromeReport with user specified chart
 
Method Summary
 void addField(java.lang.String field)
          add field for display
static void expandCountsMap(java.util.TreeMap calendars)
          Fill in the missing slots in a Calendar-to-Integer mapping with zeros.
 java.lang.String getAllRecords()
          return XMl string of all contained records
 java.lang.String getChart(java.lang.String[] facilities, java.lang.String syndromeName, java.lang.String start, java.lang.String stop, boolean fullData)
          Compute the time history chart
 org.w3c.dom.Document getDom(int no)
          return Dom representation of specified record
 java.util.Vector getFields()
          return the fields labels
 DateGraphGenerator[] getGenerators()
          Get the generators used to produce the graph data.
 int getInterval()
          Get the chart interval as a date code from java.util.Calendar.
 int getNumber()
          return the number of observations that were found
 org.w3c.dom.Document getObsById(int no)
          get the ObservationId associated with a data element
 java.util.ArrayList getObservations(java.lang.String[] facilities, java.lang.String syndromeName, java.lang.String start, java.lang.String stop, boolean fullData)
          Get observations from the server, merging results from multiple facilities.
 org.omg.DsObservationAccess.ObservationDataStruct[] getObservations(java.lang.String facility, java.lang.String syndromeName, java.lang.String start, java.lang.String stop, boolean fullData)
          get the observations from the server
 java.util.TreeSet getPageStatisticsByDay(java.lang.String syndrome, java.util.Calendar t0Date, java.util.Calendar endDate)
          Get an ordered set of page statistics for the current observations (which are obtained from CountsDaemon)
 java.lang.String getRangedChart(java.lang.String[] facilities, java.lang.String syndromeName, java.lang.String start, java.lang.String stop, boolean fullData)
          Get a chart with control chart information superimposed.
 java.lang.String getRecord(int no)
          return XML string of the specified record
 java.util.Vector getRecords()
          return a Collection of Events organized by row with date/syndrome/facility/clinician in the row
 java.util.TreeMap getSortedCountsByDay()
          Get an ordered mapping of calendars to Integers containing the number of counts found on that date in the given observation data
static java.util.TreeMap getSortedCountsByDay(org.omg.DsObservationAccess.ObservationDataStruct[] observations)
          Get an ordered mapping of calendars to Integers containing the number of counts found on that date in the given observation data
 java.lang.String getStackedChart(java.lang.String[] facilities, java.lang.String[] syndromeNames, java.lang.String start, java.lang.String stop, boolean fullData)
          Compute the time history chart
static java.util.ArrayList removeDuplicates(java.util.ArrayList observations)
          Remove duplicate observations (as determined by the OBSERVATION_ID) from the data set, keeping only the most recent (as determined by DATE_RECORDED)
 void setCoas(COAS coas)
          set the COAS server
 void setFields(java.lang.String[] inFields)
          replace the fields with these (but retain Date_Time as first field no matter what)
 void setInterval(java.lang.String interval)
          set the Interval
 void setPlotType(java.lang.String plotType)
          set the plot type
 void setProperties(java.util.Properties props)
          set the Properties
 void setWriteDirectory(java.lang.String writeDirectory)
          set the write Directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyndromeReport

public SyndromeReport()
Creates new SyndromeReport with default chart (JFreeChart)


SyndromeReport

public SyndromeReport(JFreeChartGenericChart chart)
Creates new SyndromeReport with user specified chart

Method Detail

setProperties

public void setProperties(java.util.Properties props)
set the Properties

Parameters:
props - Properties

setCoas

public void setCoas(COAS coas)
set the COAS server

Parameters:
coas - COAS server

setInterval

public void setInterval(java.lang.String interval)
set the Interval

Parameters:
interval - determines DAY, WEEK, or MONTH for time bins

getInterval

public int getInterval()
Get the chart interval as a date code from java.util.Calendar.


setWriteDirectory

public void setWriteDirectory(java.lang.String writeDirectory)
set the write Directory

Parameters:
writeDirectory - Where to write the plot

setPlotType

public void setPlotType(java.lang.String plotType)
set the plot type

Parameters:
plotType - String with the plot type

addField

public void addField(java.lang.String field)
add field for display


getFields

public java.util.Vector getFields()
return the fields labels


getNumber

public int getNumber()
return the number of observations that were found


setFields

public void setFields(java.lang.String[] inFields)
replace the fields with these (but retain Date_Time as first field no matter what)

Parameters:
inFields -

getObservations

public org.omg.DsObservationAccess.ObservationDataStruct[] getObservations(java.lang.String facility,
                                                                           java.lang.String syndromeName,
                                                                           java.lang.String start,
                                                                           java.lang.String stop,
                                                                           boolean fullData)
get the observations from the server


getObservations

public java.util.ArrayList getObservations(java.lang.String[] facilities,
                                           java.lang.String syndromeName,
                                           java.lang.String start,
                                           java.lang.String stop,
                                           boolean fullData)
Get observations from the server, merging results from multiple facilities.

Parameters:
facilities - List of facilities to get data for, or null to get all facilities.
syndromeName - Syndrome name to get observations for.
start - Start of interval.
stop - End of interval.
fullData - Whether to return full observation data (otherwise return qualifiers only).
Returns:
List of ObservationDataStruct.

getChart

public java.lang.String getChart(java.lang.String[] facilities,
                                 java.lang.String syndromeName,
                                 java.lang.String start,
                                 java.lang.String stop,
                                 boolean fullData)
Compute the time history chart

Parameters:
syndromeName - Syndrome to be looked up
start - begining of interval
stop - end of interval
Returns:
plot file name

getRangedChart

public java.lang.String getRangedChart(java.lang.String[] facilities,
                                       java.lang.String syndromeName,
                                       java.lang.String start,
                                       java.lang.String stop,
                                       boolean fullData)
Get a chart with control chart information superimposed.

Parameters:
facilities - Facilities to get data for.
syndromeName - Syndrome name to plot
start - Beginning of interval
stop - End of interval
fullData - Whether to query full observation data (not just qualifiers)
Returns:
Plot file name

getStackedChart

public java.lang.String getStackedChart(java.lang.String[] facilities,
                                        java.lang.String[] syndromeNames,
                                        java.lang.String start,
                                        java.lang.String stop,
                                        boolean fullData)
Compute the time history chart

Parameters:
facilities - Facilities to get data for.
syndromeNames - Syndromes to be looked up
start - begining of interval
stop - end of interval
fullData - Whether to query full observation data (not just qualifiers)
Returns:
plot file name

removeDuplicates

public static java.util.ArrayList removeDuplicates(java.util.ArrayList observations)
Remove duplicate observations (as determined by the OBSERVATION_ID) from the data set, keeping only the most recent (as determined by DATE_RECORDED)


getRecords

public java.util.Vector getRecords()
return a Collection of Events organized by row with date/syndrome/facility/clinician in the row


getRecord

public java.lang.String getRecord(int no)
return XML string of the specified record

Parameters:
no - record number to be retrieved

getDom

public org.w3c.dom.Document getDom(int no)
return Dom representation of specified record

Parameters:
no - of record to be returned

getObsById

public org.w3c.dom.Document getObsById(int no)
get the ObservationId associated with a data element

Parameters:
no -
Returns:

getGenerators

public DateGraphGenerator[] getGenerators()
Get the generators used to produce the graph data. Only valid after some form of getChart() has been called.


getSortedCountsByDay

public java.util.TreeMap getSortedCountsByDay()
Get an ordered mapping of calendars to Integers containing the number of counts found on that date in the given observation data


getSortedCountsByDay

public static java.util.TreeMap getSortedCountsByDay(org.omg.DsObservationAccess.ObservationDataStruct[] observations)
Get an ordered mapping of calendars to Integers containing the number of counts found on that date in the given observation data


expandCountsMap

public static void expandCountsMap(java.util.TreeMap calendars)
Fill in the missing slots in a Calendar-to-Integer mapping with zeros.


getPageStatisticsByDay

public java.util.TreeSet getPageStatisticsByDay(java.lang.String syndrome,
                                                java.util.Calendar t0Date,
                                                java.util.Calendar endDate)
Get an ordered set of page statistics for the current observations (which are obtained from CountsDaemon)

Parameters:
syndrome - Syndrome name to get Page's statistics for
t0Date - Date to start Page calculations at
endDate - Date to stop Page calculations at

getAllRecords

public java.lang.String getAllRecords()
return XMl string of all contained records



Copyright © 2000 University of California. All Rights Reserved.