Opened 11 years ago

Closed 11 years ago

#484 closed enhancement (fixed)

Consent count report should have an initial summary table

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

Description

Consent count report should have an initial summary table with columns "Yes", "No", and "Not asked". Consents with unknown date should be treated as if belonging to the selected time period for this table.

Change History (4)

comment:1 by olle, 11 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 11 years ago

Traceability note:

  • The consent count report was introduced in Ticket #426 (Consent count report generator).
  • It was updated in Ticket #428 (Reports should have sites in alphabetic order and a column with latest item dates).
  • The consent count report was updated in Ticket #430 (Consent count report should allow time period selection).
  • The consent count report was updated in Ticket #452 (Consent count report should not count missing constents as consents with unknown date).

comment:3 by olle, 11 years ago

Design discussion:

The consent count report is managed by servlet SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ and JSP script samplereportgenerator in reggie/resources/reports/. Previously, private method JSONObject createConsentCountReport(DbControl dc, JSONObject json, Date startDate, Date endDate) in SampleReportServlet has assigned a main single JSON key to a consent item, and updated some special JSON counter separately, such as the total number of consents with unknown date. With the new summary table, the three tables will have some columns that contain entries from several columns in the other tables, e.g. the "Yes" column in the summary table will contain items from columns "Yes (has PAT#)" and "Yes (no PAT#)" in table 2 and column "Yes (no date)" in table 3.

  • It was decided to let the servlet make all assignments, and was therefore updated to assign a list of JSON keys to each consent item (in some cases, the list may still consist of a single key).
  • In order to increase code clarity, keys have been renamed to avoid confusion. A problem is that in English the word "no" may mean both "not yes" and "none". As an example, it is natural to assign consents with answer "Yes" to JSON key "yes" and consents with answer "No" to JSON key "no". If string "Date" is added to JSON keys for items with known date, JSON key "noDate" would represent consents with a "No" answer and known date, but may be misunderstood as "no date", indicating a consent with unknown date (this is actually the normal meaning of this JSON key in the program). The main JSON keys were renamed to start with strings "yes", "no", or "notAsked", indicating the consent answer. JSON keys indicating if a patient number (PAT#) or date exists for a consent, are then constructed by appending strings "PatientExists", "PatientUnknown", "DateExists", or "DateUnknown" to the main JSON key string indicating the consent answer. This might still result in the unfortunate "noDateExists" for a consent with answer "No" and known date, but the meaning should now be clear, as appended specifications to the JSON keys now consists of combinations of two words. JSON key "noDate" will be used for all items with unknown date for historical reasons.

Servlet SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ updates:

  • Private method JSONObject createConsentCountReport(DbControl dc, JSONObject json, Date startDate, Date endDate) updated to assign a list of JSON keys to each consent item (in some cases, the list may still consist of a single key), and to use updated JSON key names.

JSP script samplereportgenerator in reggie/resources/reports/ updates:

  • Function goCreate() should be updated to create an initial summary table for the consent count report.
  • Functions createConsentCountReport(report) and addDataRowsToConsentTable(report, reportTable, numDecimals) should be renamed createConsentCountHasDateTable(report) and addDataRowsToConsentTableHasDate(report, reportTable, numDecimals), respectively.
  • Functions createConsentCountReport(report) and addDataRowsToConsentTable(report, reportTable, numDecimals) should be updated to create the initial summary table.
  • All functions related to the consent count report should be updated to use the new JSON key names.

comment:4 by olle, 11 years ago

Resolution: fixed
Status: assignedclosed

(In [1926]) Fixes #484. Refs #426. Consent count report updated with an initial summary table with columns "Yes", "No", and "Not asked". Consents with unknown date are treated as if belonging to the selected time period for this table.

Servlet SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ updates:

  • Private method JSONObject createConsentCountReport(DbControl dc, JSONObject json, Date startDate, Date endDate) updated to assign a list of JSON keys to each consent item (in some cases, the list may still consist of a single key), and to use updated JSON key names.

JSP script samplereportgenerator in reggie/resources/reports/ updates:

  • Function goCreate() updated to create an initial summary table for the consent count report.
  • Functions createConsentCountReport(report) and addDataRowsToConsentTable(report, reportTable, numDecimals) renamed createConsentCountHasDateTable(report) and addDataRowsToConsentTableHasDate(report, reportTable, numDecimals), respectively.
  • Functions createConsentCountReport(report) and addDataRowsToConsentTable(report, reportTable, numDecimals) updated to create the initial summary table.
  • All functions related to the consent count report updated to use the new JSON key names.
Note: See TracTickets for help on using tickets.