Opened 11 years ago
Closed 11 years ago
#563 closed enhancement (fixed)
Report servlet code should be refactored for blood sample filter
Reported by: | olle | Owned by: | olle |
---|---|---|---|
Priority: | minor | Milestone: | Reggie v2.15 |
Component: | net.sf.basedb.reggie | Keywords: | |
Cc: |
Description
Report servlet code should be refactored for blood sample filter. As the filter is used in several reports, the servlet code should use a common method for the filter. Sample lists with use in more than one place, should also preferably be created by separate methods.
Change History (5)
comment:1 by , 11 years ago
Status: | new → assigned |
---|
comment:2 by , 11 years ago
Traceability note:
- 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 report generator was introduced in Ticket #339 (Report generator). It included a sample count report.
- The overview report was introduced in Ticket #438 (Overview report).
- The missing sample was introduced in Ticket #439 (Missing sample data report).
comment:3 by , 11 years ago
Design description.
Updates in java servlet SampleReportServlet.java
in reggie/src/net/sf/basedb/reggie/servlet/
:
- Private method
JSONObject createMissingSampleDataReport(...)
should be updated to call new private methodList<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter)
to create the sample list to use. The latter method calls new private methodboolean passBloodSampleFilter(DbControl dc, SnapshotManager manager, String bloodSampleFilter, Sample s)
to apply an optional blood sample filter. - Private methods
List<Sample> createSampleCountSampleList(...)
andJSONObject createOverviewReport(...)
should be updated to call new private methodboolean passBloodSampleFilter(DbControl dc, SnapshotManager manager, String bloodSampleFilter, Sample s)
to apply an optional blood sample filter.
comment:4 by , 11 years ago
(In [2203]) Refs #563. Refs #505. Java servlet SampleReportServlet.java
in reggie/src/net/sf/basedb/reggie/servlet/
refactored:
- Private method
JSONObject createMissingSampleDataReport(...)
updated to call new private methodList<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter)
to create the sample list to use. The latter method calls new private methodboolean passBloodSampleFilter(DbControl dc, SnapshotManager manager, String bloodSampleFilter, Sample s)
to apply an optional blood sample filter. - Private methods
List<Sample> createSampleCountSampleList(...)
andJSONObject createOverviewReport(...)
updated to call new private methodboolean passBloodSampleFilter(DbControl dc, SnapshotManager manager, String bloodSampleFilter, Sample s)
to apply an optional blood sample filter. - New private method
List<Sample> createSampleListForMissingSampleDataReport(DbControl dc, String sampleType, String bloodSampleFilter)
added. It creates a sample list to use in the missing sample data report, and calls new private methodboolean passBloodSampleFilter(DbControl dc, SnapshotManager manager, String bloodSampleFilter, Sample s)
to apply an optional blood sample filter. - New private method
boolean passBloodSampleFilter(DbControl dc, SnapshotManager manager, String bloodSampleFilter, Sample s)
added. It applies an optional blood sample filter.
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed since the described code has been refactored.
Ticket accepted.