Opened 10 years ago

Closed 10 years ago

#574 closed enhancement (fixed)

Missing data sample list export from consent and missing sample data reports

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

Description

Missing data sample list export should be available from the consent and missing sample data reports, but only for users with PatientCurator role.

  1. For users with PatientCurator role, the consent and missing sample data reports should have two new buttons to the right of the "Restart" button at the end, "Export preview" and "Export".
  2. The "Export preview" and "Export" buttons should produce the same results as the "Preview" and "Export" buttons in the "Export missing data sample list" and "Export missing consent data sample list" wizards described in Ticket #565 and #569, respectively.

Change History (5)

comment:1 by olle, 10 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 10 years ago

Traceability note:

  • The consent count report was introduced in Ticket #426 (Consent count report generator).
  • Sample list export for missing consent data was introduced in Ticket #569 (Sample list export for missing consent data).
  • The missing sample data report was introduced in Ticket #439 (Missing sample data report).
  • Sample list export for missing sample data was introduced in Ticket #565 (Missing sample data report should support sample list export).

comment:3 by olle, 10 years ago

Design description:

Java servlet SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ update:

  1. Private method JSONObject createConsentCountReport(DbControl dc, JSONObject json, Date startDate, Date endDate) should be updated to check if the user does not have permission to read patient names, and transfer the result in the returned JSON object in variable with key "permissionDeniedForPatientName". The same flag is already returned by private method JSONObject createMissingSampleDataReport(DbControl dc, JSONObject json, Date startDate, Date endDate, String sampleType, String bloodSampleFilter).

JSP script samplereportgenerator.jsp in reggie/resources/reports/ update:

  1. Function goCreate() updated with argument exportOpt:
    a. If the value of argument exportOpt is "preview" or "export", the consent count and missing sample data report wizards directs the Ajax request to servlet ExportServlet.java to obtain data for corresponding the missing data sample list.
    b. If the value of argument exportOpt is "preview", a preview is shown created by the one of the new functions createMissingConsentDataSampleListPreview(allLines, previewTitle, previewList) or createMissingDataSampleListPreview(allLines, sampleTypes, previewTitle, previewList), that corresponds to the used report wizard.
    c. If the value of argument exportOpt is "export", the output from the Export servlet request is redirected to be downloaded or opened with a program of the user's choice.
  2. Function goCreate(exportOpt) updated for the consent and missing sample data reports to check if the user has permission to read patient names, and if so, add two new buttons to the right of the "Restart" button at the end, "Export preview" and "Export", coupled to calling function goCreate(exportOpt) with argument exportOpt having values "preview" and "export", respectively.
  3. New function createMissingConsentDataSampleListPreview(allLines, previewTitle, previewList) added. It creates a sample list preview like the one created by JSP script export_missing_consent_data_sample_list.jsp in reggie/resources/personal/, as described in Ticket #569 (Sample list export for missing consent data).
  4. New function createMissingDataSampleListPreview(allLines, sampleTypes, previewTitle, previewList) added. It creates a sample list preview like the one created by JSP script export_missing_data_sample_list.jsp in reggie/resources/personal/, as described in Ticket #565 (Missing sample data report should support sample list export).
  5. HTML part updated with new style section for the sample list preview, button definitions for the "Export preview" and "Export" buttons, and new div tags for the optional export preview.

comment:4 by olle, 10 years ago

(In [2223]) Refs #574. Refs #565. Refs #569. Consent and missing sample data report wizards updated to support missing data sample list export for users with PatientCurator role:

Java servlet SampleReportServlet in reggie/src/net/sf/basedb/reggie/servlet/ update:

  1. Private method JSONObject createConsentCountReport(DbControl dc, JSONObject json, Date startDate, Date endDate) updated to check if the user does not have permission to read patient names, and transfer the result in the returned JSON object in variable with key "permissionDeniedForPatientName". The same flag is already returned by private method JSONObject createMissingSampleDataReport(DbControl dc, JSONObject json, Date startDate, Date endDate, String sampleType, String bloodSampleFilter).

JSP script samplereportgenerator.jsp in reggie/resources/reports/ update:

  1. Function goCreate() updated with argument exportOpt:
    a. If the value of argument exportOpt is "preview" or "export", the consent count and missing sample data report wizards directs the Ajax request to servlet ExportServlet.java to obtain data for corresponding the missing data sample list.
    b. If the value of argument exportOpt is "preview", a preview is shown created by the one of the new functions createMissingConsentDataSampleListPreview(allLines, previewTitle, previewList) or createMissingDataSampleListPreview(allLines, sampleTypes, previewTitle, previewList), that corresponds to the used report wizard.
    c. If the value of argument exportOpt is "export", the output from the Export servlet request is redirected to be downloaded or opened with a program of the user's choice.
  2. Function goCreate(exportOpt) updated for the consent and missing sample data reports to check if the user has permission to read patient names, and if so, add two new buttons to the right of the "Restart" button at the end, "Export preview" and "Export", coupled to calling function goCreate(exportOpt) with argument exportOpt having values "preview" and "export", respectively.
  3. New function createMissingConsentDataSampleListPreview(allLines, previewTitle, previewList) added. It creates a sample list preview like the one created by JSP script export_missing_consent_data_sample_list.jsp in reggie/resources/personal/, as described in Ticket #569 (Sample list export for missing consent data).
  4. New function createMissingDataSampleListPreview(allLines, sampleTypes, previewTitle, previewList) added. It creates a sample list preview like the one created by JSP script export_missing_data_sample_list.jsp in reggie/resources/personal/, as described in Ticket #565 (Missing sample data report should support sample list export).
  5. HTML part updated with new style section for the sample list preview, button definitions for the "Export preview" and "Export" buttons, and new div tags for the optional export preview.

comment:5 by olle, 10 years ago

Resolution: fixed
Status: assignedclosed

Ticket closed as the requested functionality has been added.

Note: See TracTickets for help on using tickets.