Changes between Version 1 and Version 2 of Ticket #792, comment 12


Ignore:
Timestamp:
Jun 22, 2015, 2:39:25 PM (9 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #792, comment 12

    v1 v2  
    1515 4. For a DNA or RNA entry, it should be checked that no extract with input name and type already exists in the database.
    1616 5. For specimen entries with a given input name, the number of existing specimens with this name should be checked. The suffices for the new specimen entries should start by adding one to the highest suffix number of existing specimen items with the given name. As an example, if two new specimens with input names "`Test_Item_0A`" should be added, and specimens "`Test_Item_0A.1`" and "`Test_Item_0A.2`" already exist, the new specimens should get item names "`Test_Item_0A.3`" and "`Test_Item_0A.4`".
     17
     18Design update:
     19
     20 1. JSP file `index.jsp` in `resources/` should be updated in the case registration section by adding a link to a wizard for registering new extra material. The link should be to new JSP file `extramaterial.jsp` in `resources/sampleproc/`.
     21 2. New JSP file `extramaterial.jsp` in `resources/sampleproc/` added. It contains two steps and is coupled to new javascript file `extramaterial.js` in `resources/sampleproc/`.
     22 3. New javascript file `extramaterial.js` in `resources/sampleproc/` added. It contains the following functions (among other):[[BR]]a. Function `initPage()` adds event and button click handlers, enters today's date as default arrival date, and displays step one of the wizard.[[BR]]b. Function `validateStep1(event)` calls function `nofExtraMaterialOnChange()` to check that the number of extra materials is OK.[[BR]]c. Function `initializeStep2()` creates a table with one input row for each new extra material to be added, and adds event handlers for type radio buttons and arrival date fields.[[BR]]d. Function `nameOnChange()` performs consistency checks on the input name, and calls servlet `SpecimenTubeServlet` with command "`GetExtraMaterialInfo`" and callback function `extraMaterialInfoLoaded(response)` to perform checks requiring the database and create an item name.[[BR]]e. Function `extraMaterialInfoLoaded(response)` performs checks requiring the database and creates an item name, if no errors are found. For DNA and RNA items are checked that no previous item with same name and type exists. Suffix numbers for new specimen items are obtained by adding one to the highest suffix number of existing specimen items with the given name. For a new specimen, function `updateSpecimenItemNames(currentName, highestSpecimenNumber)` is called to update item names.[[BR]]f. Function `updateSpecimenItemNames(currentName, highestSpecimenNumber)` updates all item names for specimens with given name by adding numbers above those already used for specimens in the database.[[BR]]g. Function `typeOnChange(event)` calls function `nameOnChange(event)`, since a change of type implies a change in suffix for item name.[[BR]]h. Function `arrivalDateOnChange(event)` performs date consistency checks for arrival date entries.[[BR]]i. Function `validateStep2(event)` performs basic validation checks (currently only that the number of extra material is valid).[[BR]]j. Function `submit()` stores the input data in a JSON array and submits it to servlet `SpecimenTubeServlet` with command "`CreateExtraMaterial`" and callback function `submissionResults(response)` using a "`POST`" request.[[BR]]k. Function `submissionResults(response)` displays the response message after registration.