Changes between Initial Version and Version 1 of Ticket #723, comment 4


Ignore:
Timestamp:
Jan 15, 2015, 7:54:51 AM (8 years ago)
Author:
olle
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #723, comment 4

    initial v1  
    22
    33 1. JSP file `index.jsp` in `resources/` is updated with new entry "`Retraction follow-up`" under header "`Retraction wizard`" in section "`Personal information wizards`". The entry has a link to new JSP file `retraction_followup_form.jsp` in `resources/personal/` and a new data-counter "`patientitems-ready-for-retraction-followup`". In addition, a new inactive entry "`Destruction`" is also added, with a data-counter "`patientitems-ready-for-destruction`".
    4  2. JSP file `retraction_followup_form.jsp` in `resources/personal/` is coupled to Javascript file `retraction_followup_form.js`, also in `resources/personal/`.[[BR]]a. The JSP file has an input field for entering a case name or personal number. After initial validation of the case name/personal number, function `rf.caseNameOnChange()` calls servlet `RetractionFollowUpFormServlet` with command "`GetCaseInfo`" to obtain a JSONObject with information on all cases for the patient in question, that is processed by function `rf.onCaseInfoLoaded(response)`, to determine if the patient biosource type is correct ("`Retracted`" or "`RetroNo`" are allowed for the follow-up step).[[BR]]c. Function `rf.initializeStep2()` then calls servlet `RetractionFollowUpFormServlet` with command "`GetCaseInfo`" a second time, where the response is processed by function `rf.caseInfoLoaded(response)`, which fills retract data retrieved from the database into input fields in the form. The second step of the form contains input fields for seven retraction request and response dates for the patient in question.[[BR]]d. The date fields are coupled to validation checks by functions `rf.labDateOnChange()`, `rf.bloodDateOnChange()`, `rf.frozenDateOnChange()`, and `rf.forwardedDateOnChange()`.[[BR]]e. Button "Register" is coupled to function `rf.submit()`, that sends the retract request and response date values in the form together with the input case name/personal number to servlet `RetractionFollowUpFormServlet` with command "`RegisterRetraction`".
    5  3. New java servlet class/file `RetractionFollowUpFormServlet.java` in `src/net/sf/basedb/reggie/servlet/` accepts `GET` requests for command "`GetCaseInfo`", and `POST` request for command "`RegisterRetraction`". It accesses the database to retrieve the requested information, or update the contents, and sends the results back in JSON format. The functionality for command "`GetCaseInfo`" is basically identical to that of servlet `RetractionFormServlet`, while command "`RegisterRetraction`" stores date values from the form in new annotations for patient items of biosource type "`Retracted`" or "`RetroNo`". If all seven dates are set, new enumerable string annotation "`RetractStatus`" is set to value "`ReadyForDestruction`" (default value is `null`).
     4 2. JSP file `retraction_followup_form.jsp` in `resources/personal/` is coupled to Javascript file `retraction_followup_form.js`, also in `resources/personal/`.[[BR]]a. The JSP file has an input field for entering a case name or personal number. After initial validation of the case name/personal number, function `rf.caseNameOnChange()` calls servlet `RetractionFollowUpFormServlet` with command "`GetCaseInfo`" to obtain a JSONObject with information on all cases for the patient in question, that is processed by function `rf.onCaseInfoLoaded(response)`, to determine if the patient biosource type is correct ("`Retract`" or "`RetroNo`" are allowed for the follow-up step).[[BR]]c. Function `rf.initializeStep2()` then calls servlet `RetractionFollowUpFormServlet` with command "`GetCaseInfo`" a second time, where the response is processed by function `rf.caseInfoLoaded(response)`, which fills retract data retrieved from the database into input fields in the form. The second step of the form contains input fields for seven retraction request and response dates for the patient in question.[[BR]]d. The date fields are coupled to validation checks by functions `rf.labDateOnChange()`, `rf.bloodDateOnChange()`, `rf.frozenDateOnChange()`, and `rf.forwardedDateOnChange()`.[[BR]]e. Button "Register" is coupled to function `rf.submit()`, that sends the retract request and response date values in the form together with the input case name/personal number to servlet `RetractionFollowUpFormServlet` with command "`RegisterRetraction`".
     5 3. New java servlet class/file `RetractionFollowUpFormServlet.java` in `src/net/sf/basedb/reggie/servlet/` accepts `GET` requests for command "`GetCaseInfo`", and `POST` request for command "`RegisterRetraction`". It accesses the database to retrieve the requested information, or update the contents, and sends the results back in JSON format. The functionality for command "`GetCaseInfo`" is basically identical to that of servlet `RetractionFormServlet`, while command "`RegisterRetraction`" stores date values from the form in new annotations for patient items of biosource type "`Retract`" or "`RetroNo`". If all seven dates are set, new enumerable string annotation "`RetractStatus`" is set to value "`ReadyForDestruction`" (default value is `null`).
    66 4. XML servlet configuration file `servlets.xml` in `META-INF/` updated with entry for new servlet `RetractionFollowUpFormServlet`.
    77 5. Java class/file `Annotationtype.java` in `src/net/sf/basedb/reggie/dao/` updated with seven new retract date annotations:[[BR]]RETRACT_REQUEST_SENT_TO_LABORATORY_DATE[[BR]]RETRACT_RESPONSE_RECEIVED_FROM_LABORATORY_DATE[[BR]]RETRACT_REQUEST_SENT_FOR_BLOOD_SAMPLES_DATE[[BR]]RETRACT_RESPONSE_RECEIVED_FOR_BLOOD_SAMPLES_DATE[[BR]]RETRACT_REQUEST_SENT_FOR_FROZEN_SAMPLES_DATE[[BR]]RETRACT_RESPONSE_RECEIVED_FOR_FROZEN_SAMPLES_DATE[[BR]]RETRACT_REQUEST_FORWARDED_TO_RELATED_PROJECTS_DATE[[BR]]In addition, a new enumerable string annotation `RETRACT_STATUS` is defined with two options "`ReadyForDestruction`" and "`RetractionCompleted`".
    88 6. Java class/file `InstallServlet.java` in `src/net/sf/basedb/reggie/servlet/` updated in `protected` method `void doGet(HttpServletRequest req, HttpServletResponse resp)` to create the new annotation type items, if not existing.
    9  7. Java class/file `CounterService.java` in `src/net/sf/basedb/reggie/counter/` updated:[[BR]]a. Method `void count()` updated to call new private methods `void CountPatientsReadyForRetractionFollowUp(DbControl dc, JSONObject json)` and `void CountPatientsReadyForDestruction(DbControl dc, JSONObject json)`.[[BR]]b. New private method `void CountPatientsReadyForRetractionFollowUp(DbControl dc, JSONObject json)` added.[[BR]]c. New private method `void CountPatientsReadyForDestruction(DbControl dc, JSONObject json)` added.
     9 7. Java class/file `CounterService.java` in `src/net/sf/basedb/reggie/counter/` updated:[[BR]]a. Method `void count()` updated to call new private methods `void CountPatientsReadyForRetractionFollowUp(DbControl dc, JSONObject json)` and `void CountPatientsReadyForDestruction(DbControl dc, JSONObject json)`.[[BR]]b. New private method `void CountPatientsReadyForRetractionFollowUp(DbControl dc, JSONObject json)` added. It counts the number of biosource items of type "`Retract`" or "`RetroNo`" with annotation `RETRACT_STATUS` set to `null`.[[BR]]c. New private method `void CountPatientsReadyForDestruction(DbControl dc, JSONObject json)` added. It counts the number of biosource items of type "`Retract`" or "`RetroNo`" with annotation `RETRACT_STATUS` set to "`ReadyForDestruction`".