| 14 | |
| 15 | Updates in java servlet `SampleReportServlet.java` in `reggie/src/net/sf/basedb/reggie/servlet/`: |
| 16 | |
| 17 | * Static string constants defined for options in "Table alternatives" and "Blood sample filter" menus. |
| 18 | * Protected method `void doGet(HttpServletRequest req, HttpServletResponse resp)` updated to retrieve the values of the new menus and transfer them as arguments to methods creating JSON objects of report data. |
| 19 | * Private method `JSONObject createSampleCountReport(...)` updated with two new arguments `String tableAlternatives` and `String bloodSampleFilter`. The value of the latter is transferred as argument to methods creating sample lists and JSON objects of report data. If "Table alternatives" equals "9 tables with different blood sample choices", 8 extra calls are made to create JSON report data for the different blood sample type choices. The extra JSON report objects are added as child items to the original report object, with a name key identifying the type of report. |
| 20 | * New private method `JSONObject createSampleCountReport(List<Sample> sampleList, Date startDate, Date endDate, String viewType, String sampleType, String tableAlternatives, String bloodSampleFilter)` added. It creates JSON report data from an input sample list. |
| 21 | * New private method `List<Sample> createSampleCountSampleList(DbControl dc, SnapshotManager manager, List<Sample> rawSampleList, String bloodSampleFilter)` added. It creates a sample list from a raw list by applying an input blood sample filter. |
| 22 | * Private method `JSONObject createOverviewReport(...)` updated with new argument `String bloodSampleFilter`. The code is updated to apply the filter when creating the JSON report. The method is also updated to collect data for a "Blood samples follow-up" column. |
| 23 | * Private method `JSONObject createMissingSampleDataReport(...)` updated with new argument `String bloodSampleFilter`. The code is updated to apply the filter when creating the JSON report. |