Opened 12 years ago

Closed 12 years ago

#433 closed enhancement (fixed)

Patient count report generator

Reported by: olle Owned by: olle
Priority: major Milestone: Reggie v2.9
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

The reggie report generator should be updated to include a patient count report. The report should allow time period selection, and selection of resolution of time step for the table, in the same manner as used for the sample count report.

Each patient may be related to several samples, of type Specimen, No specimen, or Blood. All samples of the three types should be checked, and the earliest sample date should be used as date for the patient in the report.

Change History (4)

comment:1 by olle, 12 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 12 years ago

Traceability note:

  • The report generator was introduced in Ticket #339 (Report generator). It included a sample count report.
  • The sample count report was updated in Ticket #419 (Allow user to select resolution in sample count report), Ticket #420 (Sample count report should have two columns for summed data), and Ticket #421 (Sample count report does not always handle all views correctly).
  • The report generator was updated to include a consent count report in Ticket #426 (Consent count report generator). It was updated in Ticket #430 (Consent count report should allow time period selection).
  • The general layout of the reports was updated in Ticket #428 (Reports should have sites in alphabetic order and a column with latest item dates).

comment:3 by olle, 12 years ago

Design discussion:

  • Samples of subtypes SPECIMEN, NO_SPECIMEN or BLOOD are included.
  • When obtaining patient data for a sample, it must observed that for a blood sample, the patient is the parent item, while for a specimen or no specimen, the patient is the grandparent item.
  • JSP script index.jsp in reggie/resources/ should be updated to show a new entry "Patient count report" in the "report generator" list.
  • JSP script samplereportgenerator.jsp in reggie/resources/ should be updated to include a new entry "Patient count report" in the report generator pop-up menu. The original entry "Sample count report" should remain the default choice.
  • JSP script samplereportgenerator.jsp in reggie/resources/ should be updated to replace function createSampleCountReport(report) with function createItemCountReport(report, reportType), that will allow several reports like sample count report and patient count report to have the main table created by the same function. The new argument reportType allows table header text to be adapted for the current data type.
  • Servlet SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ should be updated to call a new private method JSONObject createPatientCountReport(DbControl dc, JSONObject json) to generate the data for the consent count report. A number of new convenience methods will be added, in order to make the code more readable.
  • Servlet class/file SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ should be updated in private method JSONObject createJSONStatistics(ItemResultIterator<Sample> sampleIterator, Date startDate, Date endDate, String viewType) to take Iterator<Sample> sampleIterator as first argument instead of ItemResultIterator<Sample> sampleIterator (this requires an update in private method JSONObject createSampleCountReport(...)). This will allow several methods to filter a raw sample list retrieved from the database, and use method createJSONStatistics(...) to generate the table data for the filtered list.
Version 0, edited 12 years ago by olle (next)

comment:4 by olle, 12 years ago

Resolution: fixed
Status: assignedclosed

(In [1744]) Fixes #433. First version of the patient count report generator added.

Note: See TracTickets for help on using tickets.