Opened 10 years ago

Last modified 10 years ago

#565 closed enhancement

Missing sample data report should support sample list export — at Version 6

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

Description (last modified by olle)

Missing sample data report should support sample list export. An "Export" button should be added beside the "Restart" button at the end of the report view. Clicking the "Export" button should create a sample list, that can be downloaded or opened by a viewer program.

The export list should have the following properties:

  1. The list should consist of tab-separated columns.
  2. When sample type "Specimen" or "No specimen" is selected, a common export list should be created, while a separate list should be created when sample type "Blood" is selected.
  3. The export list should include all samples with missing data of the sample types in question, irrespective of any blood sample filter (only relevant for blood samples).
  4. The export list for sample types "Specimen" and "No specimen" should include the following columns:
    a. Sample name
    b. Subtype
    c. Personal number
    d. All first names
    e. Family name
    f. PAD
    g. Laterality
    h. Sampling date
    i. RNALater date
    j. Biopsy type
  5. The export list for sample type "Blood" should include the following columns:
    a. Sample name
    b. Subtype
    c. Personal number
    d. All first names
    e. Family name
    f. Blood sampling date
    g. Blood freezer date
    h. Blood sample type

Change History (6)

comment:1 by olle, 10 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 10 years ago

Traceability note:

  • The missing sample data report was introduced in Ticket #439 (Missing sample data report).
  • The blood sample filter was introduced in Ticket #505 (Sample source reports should be updated to support follow-up blood samples), where it was added to the sample count, overview, and missing items reports.
  • The monthly operation list export was introduced in Ticket #385 (Export information needed by the tumor registry).
  • INCA export was introduced in Ticket #487 (Export information intended for INCA).
Last edited 10 years ago by olle (previous) (diff)

comment:3 by olle, 10 years ago

Description: modified (diff)

Ticket description updated regarding values to report and their order. Also clarification of text.

comment:4 by olle, 10 years ago

Design discussion.

  1. In the last step before a report is generated, the "Generate" button is coupled to function goCreate() in JSP script samplereportgenerator.jsp in reggie/resources/reports/, which in turn sends an Ajax request to java servlet SampleReportServlet.java in reggie/src/net/sf/basedb/reggie/servlet/. The new "Export" button will be coupled to the same function, but java servlet ExportServlet.java should be called instead of SampleReportServlet.java, in order to separate code for export from that for generating data for screen tables. This can be accomplished by adding a boolean flag exportData as argument to function goCreate(), and let button "Generate" call goCreate(false), while button "Export" calls goCreate(true). Function goCreate(exportData) will be updated to call java servlet ExportServlet.java instead of SampleReportServlet.java, when argument ExportData has value true.
  2. Java servlet ExportServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ should be updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) should be updated for command "ExportMissingSampleDataSampleList" to call new private method Set<MissingSampleDataExportData> createMissingSampleDataExport(DbControl dc, String sampleType, String bloodSampleFilter) to create a missing sample data sample list for export.
    b. New private method Set<MissingSampleDataExportData> createMissingSampleDataExport(DbControl dc, String sampleType, String bloodSampleFilter) calls new private method List<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter) to obtain a list of samples of the desired sample type(s). This list will be processed to obtain a list, that only contains samples with missing data. The missing data sample list is used to create a list of MissingSampleDataExportData objects, that will returned.
    c. New private method List<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter) performs a database query and creates a sample list for the missing sample data report. The list will both include samples with and without missing data, and has to be processed afterwards to obtain a list, that only contains samples with missing data.
    d. New inner class MissingSampleDataExportData added. Its public method String toString() will a return a tab-separated line with data for the missing sample data export list, with contents depending on the subtype attribute.

comment:5 by olle, 10 years ago

(In [2206]) Refs #565. Missing sample data report updated with sample list export:

  1. JSP script samplereportgenerator.jsp in reggie/resources/reports/ updated with a new "Export" button beside the "Restart" button at the end of the report view. The new "Export" button is coupled to the same function goCreate() as the "Generate" button in the last step before a report is generated, but java servlet ExportServlet.java should be called instead of SampleReportServlet.java. This is accomplished by adding a boolean flag exportData as argument to function goCreate(), and let button "Generate" call goCreate(false), while button "Export" calls goCreate(true). Function goCreate(exportData) is updated to call java servlet ExportServlet.java instead of SampleReportServlet.java, when argument ExportData has value true.
  2. Java servlet ExportServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "ExportMissingSampleDataSampleList" to call new private method Set<MissingSampleDataExportData> createMissingSampleDataExport(DbControl dc, String sampleType, String bloodSampleFilter) to create a missing sample data sample list for export.
    b. New private method Set<MissingSampleDataExportData> createMissingSampleDataExport(DbControl dc, String sampleType, String bloodSampleFilter) calls new private method List<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter) to obtain a list of samples of the desired sample type(s). This list is processed to obtain a list, that only contains samples with missing data. The missing data sample list is used to create a list of MissingSampleDataExportData objects, that will returned.
    c. New private method List<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter) performs a database query and creates a sample list for the missing sample data report. The list will both include samples with and without missing data, and has to be processed afterwards to obtain a list, that only contains samples with missing data.
    d. New inner class MissingSampleDataExportData added. Its public method String toString() will a return a tab-separated line with data for the missing sample data export list, with contents depending on the subtype attribute.

comment:6 by olle, 10 years ago

Description: modified (diff)

Ticket description updated by fixing typo.

Note: See TracTickets for help on using tickets.