#426 closed enhancement (fixed)
Consent 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 consent count report.
Each sample of tissue or blood in the scientific study should be covered by a written consent form, normally filled out by the patient's physician or nurse. The consent form has the following characteristics:
- The consent categories are "Yes", "No", and "Not asked".
- The consent form should have a date, but the latter may be missing. Missing dates are more common for the "No" and "Not asked" categories.
- A consent form may arrive before a patient is registered in reggie with a patient id.
- Since every sample should be covered by a consent, it is important to note when a consent is missing.
- More than one consent may be registered for a patient, at different dates, in case the patient has suffered from breast cancer in both breasts at different times.
The first version of the consent count report should display a table showing the number and percentage of consents in each category/subcategory for each site, as well as the summed number for each site, category/subcategory, and total. Due to the relatively large amount of consents without date, the first version of the report will not include any date restrictions for the shown data.
Change History (9)
comment:1 by , 12 years ago
Status: | new → assigned |
---|
comment:2 by , 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).
comment:3 by , 12 years ago
Design discussion (general):
- Consents are stored as annotations to samples. The consent category is stored as
Annotationtype.CONSENT
, and the consent date asAnnotationtype.CONSENT_DATE
. - Samples of subtypes
CASE
orBLOOD
are included. - Since several samples may be registered to the same consent, consents with the same patient id and date should only be counted once. Therefore the application should keep track of processed patient id/date pairs, in order to be able to check for duplicates.
- The following consent categories/subcategories will be reported:
- Yes (has date, patient id)
- Yes (has date, no patient id)
- Yes (no date)
- No (has date)
- No (no date)
- Not asked (has date)
- Not asked (no date)
- Missing - Percent value will be displayed to the right of a number. Number of decimals for reported percentage values will be 0 in the first version. The percentage values are calculated by site and for combined sites, and should add to 100% in each row (with reservation for rounding errors).
- The summary should include the total number of consents without known date (these should include the missing consents).
- Since patients with two consents for different dates may be of interest, and it is not straightforward to find these by filtering the BASE Biosources table, the first version of the consent report should report the number of these patients, together with a table showing the dates for each of the patients. Clicking the patient id in the table should show the patient record in question from the BASE Biosources table.
comment:4 by , 12 years ago
Design discussion (implementation):
Currently the report is generated by servlet SampleReportServlet
in reggie/src/net/sf/basedb/reggie/servlet/
and JSP script samplereportgenerator.jsp
in reggie/resources/
. The JSP script handles user input, which is transferred to the servlet, which collects and processes data, that is transferred back to the script. The servlet and script communicate via JSON objects.
- JSP script
index.jsp
inreggie/resources/
should be updated to show a new entry "Consent count report" in the "report generator" list. The first version should not include any parameter choices, but a step 2 for this purpose should still be included, in order to keep the user interface consistent, and simplify for future additions. - JSP script
samplereportgenerator.jsp
inreggie/resources/
should be updated to include a new entry "Consent count report" in the report generator pop-up menu. The original entry "Sample count report" should remain the default choice. - Servlet
SampleReportServlet
inreggie/src/net/sf/basedb/reggie/servlet/
should be updated to call a new private methodJSONObject createConsentCountReport(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. - JSP script
samplereportgenerator.jsp
inreggie/resources/
should be updated to call new functioncreateConsentCountReport(report)
to create the consent report. A number of convenience functions will be added, in order to make the code more readable. - The html code for the clickable patient id in the table of patients with multiple consents should be of the type
<span class="link" onclick="Main.itemOnClick(event, 'f703f794ef4538af', 'BIOSOURCE', 9081, false)" title="View this sample">PAT000791</span>
where "f703f794ef4538af
" is the session id, "9081
" the Biosource id, and "PAT000791
" the patient id (entries have been faked for this example).
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 by , 12 years ago
comment:7 by , 12 years ago
comment:8 by , 12 years ago
(In [1738]) Fixes #430. Refs #426. Consent count report updated to allow a time period to be selected. Results are now shown in two tables, one for consents with dates in the selected time period (plus a column for items, where the date is unknown), and one special table for items with unknown dates.
comment:9 by , 11 years ago
(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)
andaddDataRowsToConsentTable(report, reportTable, numDecimals)
renamedcreateConsentCountHasDateTable(report)
andaddDataRowsToConsentTableHasDate(report, reportTable, numDecimals)
, respectively. - Functions
createConsentCountReport(report)
andaddDataRowsToConsentTable(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.
Ticket accepted.