Opened 8 years ago

Closed 6 years ago

Last modified 19 months ago

#911 closed task (fixed)

MeLuDI should support multiple projects

Reported by: olle Owned by: olle
Priority: major Milestone: MeLuDI v1.5.0
Component: net.sf.basedb.meludi Keywords:
Cc:

Description (last modified by olle)

MeLuDI should support multiple projects using the same major pipeline of laboratory registration steps. The projects should be run on the same BASE installation, but as separate BASE project items.

MeLuDI should allow each project to have:

  • Its own set of item counters.
  • Its own counter for sample label generation purposes.
  • Its own sample name prefix.
  • Its project name printed on protocols generated by MeLuDI.

Change History (93)

comment:1 by olle, 8 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 8 years ago

Traceability note:

  • MeLuDi v.1.0 was introduced in Ticket #690 (MeLuDi - Registration wizard for melanoma-lung cancer projects).
  • MeLuDi v.1.1 was introduced in Ticket #718 (MeLuDi v.1.0 bug fixes and improvements).
  • MeLuDi v.1.2 was introduced in Ticket #725 (MeLuDi v.1.1 bug fixes and improvements).
  • MeLuDI v.1.2.1 was introduced in Ticket #759 (MeLuDi v.1.2 bug fixes and improvements).
  • MeLuDI v.1.2.2 was introduced in Ticket #767 (MeLuDI v.1.2.1 bug fixes and improvements).
  • MeLuDI v.1.2.3 was introduced in Ticket #768 (MeLuDI v.1.2.2 bug fixes and improvements).
  • MeLuDI v.1.2.4 was introduced in Ticket #777 (MeLuDI v.1.2.3 bug fixes and improvements).
  • MeLuDI v.1.2.5 was introduced in Ticket #786 (MeLuDI v.1.2.4 bug fixes and improvements).
  • MeLuDI v.1.3.1 was introduced in Ticket #792 (MeLuDI v.1.2.5 bug fixes and improvements).
  • First version of library preparation wizards was introduced in Ticket #801 (MeLuDI library preparation wizards first version).
  • MeLuDI v.1.3.2 was introduced in Ticket #802 (MeLuDI v.1.3.1 bug fixes and improvements).
  • MeLuDI v.1.3.3 was introduced in Ticket #815 (MeLuDI v.1.3.2 bug fixes and improvements).
  • MeLuDI v.1.4.0 was introduced in Ticket #816 (MeLuDI v.1.3.3 bug fixes and improvements).
  • MeLuDI v.1.4.1 was introduced in Ticket #836 (MeLuDI v.1.4.0 bug fixes and improvements).
  • MeLuDI v.1.4.2 was introduced in Ticket #837 (MeLuDI v.1.4.1 bug fixes and improvements).
  • MeLuDI v.1.4.3 was introduced in Ticket #880 (MeLuDI v.1.4.2 bug fixes and improvements).

comment:3 by olle, 8 years ago

(In [4125]) Refs #911. Updates due to version number change to "1.5.0-dev".

  1. Version number changed to "1.5.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file samplereportgenerator.js in resources/reports/ updated.
    e. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:4 by olle, 8 years ago

Design discussion:

  • Allowing each BASE project to have its own set of item counters is not trivial, since the counters are managed by a service, that in the original version assumed that only one project, named "MeLuDI", was of interest (Reggie makes the same assumption for the "SCAN-B" project). A solution where the service calculates item counters for all projects, and the set for the currently active project is then return from the SessionServlet, has been tested and seems to work:
  1. Java class/file Meludi.java in src/net/sf/basedb/meludi/ is updated with new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) added. It returns a hash map of session controls, where each project is active, with project id as key. It is meant to be used instead of public static synchronized method SessionControl getRootSessionControl(SessionControl systemSc) for item counting purposes.
  2. Java class/file CounterService.java in src/net/sf/basedb/meludi/counter/ updated to count items for all projects, and return counters for a requested project, given the id value for the latter. Old code is retained, but commented out, for comparison:
    a. Private volatile instance variable JSONObject currentCounts replaced by private volatile instance variable JSONObject currentCountsAllProjects (in principle the old variable could have been used, but since the data contents have changed, a new name seemed more appropriate).
    b. Public synchronized methods void start(SessionControl systemSc, Extension ext) and void stop() updated to use the new JSONObject instance variable currentCountsAllProjects instead of currentCounts.
    c. Public method JSONObject getCurrentCounts() commented out, as it is replaced by new public method JSONObject getCurrentProjectCounts(Integer projectId).
    d. New public method JSONObject getCurrentProjectCounts(Integer projectId) added. It returns a JSONObject with item counts for the active project stored in new private volatile instance variable JSONObject currentCountsAllProjects, with project id values as keys.
    e. Package private method void count() updated to call Meludi new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) to get a hash map of session controls for different active projects, and then calculate item counts for each project and store the results in JSONObject instance variable currentCountsAllProjects with the project id values as keys.
  3. Java servlet class/file SessionServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCounters" to call CounterService new public method JSONObject getCurrentProjectCounts(Integer projectId) to get a JSONObject with item counts for the active project, instead of JSONObject getCurrentCounts().

comment:5 by olle, 8 years ago

(In [4127]) Refs #911. MeLuDI updated to display item counters for the active project:

  1. Java class/file Meludi.java in src/net/sf/basedb/meludi/ is updated with new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) added. It returns a hash map of session controls, where each project is active, with project id as key. It is meant to be used instead of public static synchronized method SessionControl getRootSessionControl(SessionControl systemSc) for item counting purposes.
  2. Java class/file CounterService.java in src/net/sf/basedb/meludi/counter/ updated to count items for all projects, and return counters for a requested project, given the id value for the latter. Old code is retained, but commented out, for comparison:
    a. Private volatile instance variable JSONObject currentCounts replaced by private volatile instance variable JSONObject currentCountsAllProjects (in principle the old variable could have been used, but since the data contents have changed, a new name seemed more appropriate).
    b. Public synchronized methods void start(SessionControl systemSc, Extension ext) and void stop() updated to use the new JSONObject instance variable currentCountsAllProjects instead of currentCounts.
    c. Public method JSONObject getCurrentCounts() commented out, as it is replaced by new public method JSONObject getCurrentProjectCounts(Integer projectId).
    d. New public method JSONObject getCurrentProjectCounts(Integer projectId) added. It returns a JSONObject with item counts for the active project stored in new private volatile instance variable JSONObject currentCountsAllProjects, with project id values as keys.
    e. Package private method void count() updated to call Meludi new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) to get a hash map of session controls for different active projects, and then calculate item counts for each project and store the results in JSONObject instance variable currentCountsAllProjects with the project id values as keys.
  3. Java servlet class/file SessionServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCounters" to call CounterService new public method JSONObject getCurrentProjectCounts(Integer projectId) to get a JSONObject with item counts for the active project, instead of JSONObject getCurrentCounts().

comment:6 by olle, 8 years ago

Description: modified (diff)

Ticket description updated by adding missing "label" specification in second item in request list.

comment:7 by olle, 8 years ago

(In [4128]) Refs #911. MeLuDI updated to add a table row at top of protocol header showing the active project on created lab tracking protocol for FFPE extraction:

  1. JSP file extraction_protocol2.jsp in resources/sampleproc/ updated:
    a. Initial java code block extended by getting name of active project in variable String projectName.
    b. Div tag with id "page-data" extended with attribute "data-projectname" set to value of java variable String projectName.
    c. Protocol header extended with table row at top of protocol header for showing the active project name in cell with id "projectnameid".
  2. Javascript file extraction_protocol.js in resources/sampleproc/ updated:
    a. New global variable projectName added.
    b. Function initPage() updated to set value of new global variable projectName to that stored for key "projectname" on "page-data" div tag in JSP file.
    c. Function initializeProtocol(submitInfoJsonStr) updated to set contents of protocol header table cell with id "projectnameid" to value of new global variable projectName.

comment:8 by olle, 8 years ago

(In [4129]) Refs #911. MeLuDI updated to add a table column at top of protocol header showing the active project on created dilution and lab protocols for library preparation:

  1. JSP file libprep_dilution_protocol2.jsp in resources/libprep/ updated:
    a. Initial java code block extended by getting name of active project in variable String projectName.
    b. Div tag with id "page-data" extended with attribute "data-projectname" set to value of java variable String projectName.
    c. Protocol header extended with table column at right of protocol header for showing the active project name in cell with id "projectnameid".
  2. Javascript file libprep_dilution_protocol.js in resources/libprep/ updated:
    a. New global variable projectName added.
    b. Function initPage() updated to set value of new global variable projectName to that stored for key "projectname" on "page-data" div tag in JSP file.
    c. Function initializeProtocol(submitInfoJsonStr) updated to set contents of protocol header table cell with id "projectnameid" to value of new global variable projectName.
  3. JSP file libprep_plate_protocol2.jsp in resources/libprep/ updated:
    a. Initial java code block extended by getting name of active project in variable String projectName.
    b. Div tag with id "page-data" extended with attribute "data-projectname" set to value of java variable String projectName.
    c. Protocol header extended with table column at right of protocol header for showing the active project name in cell with value set to that of variable String projectName.

comment:9 by olle, 8 years ago

Design note:

The displayed project name in JSP files extraction_protocol2.jsp and libprep_dilution_protocol2.jsp could have been taken directly from the java variable String projectName, as done for JSP file libprep_plate_protocol2.jsp, without involving the javascript files. The used solution was chosen to get consistency in the code for each protocol, but might be changed in the future.

comment:10 by olle, 8 years ago

Design discussion:

  • Currently MeLuDI label generation only stores the highest case number used for a single project. The value is stored on a single line in a file named "Case_Label_Info.csv", which is placed in BASE user files directory. In order to support several projects, this file should store one line per project, where the line contents consist of two tab-separated columns, with the project name and highest used case number for the project, respectively.
  1. Java servlet class/file LabelGenerationServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLastLabelCase" to call updated private method long fetchLabelCaseCount(String projectName) with name of the active project as argument.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLabelFile" to call updated private method void updateLabelCaseCount(String projectName, int endCaseNumber) with name of the active project as first argument.
    c. Private method long fetchLabelCaseCount(String projectName) updated to require name of the active project as argument. It now calls new private method HashMap<String,String> fetchLabelCaseFileContents() to obtain a hash map of project names and highest used case number for the projects, from which the highest used case number for the active project is returned.
    d. New private method HashMap<String,String> fetchLabelCaseFileContents() added. It parses the label case number file and returns a hash map of project names and highest used case number for the projects.
    e. Private method void updateLabelCaseCount(String projectName, int endCaseNumber) updated to require name of the active project as first argument. It now calls new private method HashMap<String,String> fetchLabelCaseFileContents() to obtain a hash map of project names and highest used case number for the projects. It re-writes the data to the file, except for the active project, where the new updated case number given as second argument is used instead. If the name of the active project is not found in the previous file contents, a new line is added with case number information for this project.

comment:11 by olle, 8 years ago

(In [4131]) Refs #911. MeLuDI label generation updated to store information on the highest used case number for all projects. The data is stored in a file named "Case_Label_Info.csv", which is placed in BASE user files directory. This file should now store one line per project, where the line contents consist of two tab-separated columns, with the project name and highest used case number for the project, respectively.

  1. Java servlet class/file LabelGenerationServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLastLabelCase" to call updated private method long fetchLabelCaseCount(String projectName) with name of the active project as argument.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLabelFile" to call updated private method void updateLabelCaseCount(String projectName, int endCaseNumber) with name of the active project as first argument.
    c. Private method long fetchLabelCaseCount(String projectName) updated to require name of the active project as argument. It now calls new private method HashMap<String,String> fetchLabelCaseFileContents() to obtain a hash map of project names and highest used case number for the projects, from which the highest used case number for the active project is returned.
    d. New private method HashMap<String,String> fetchLabelCaseFileContents() added. It parses the label case number file and returns a hash map of project names and highest used case number for the projects.
    e. Private method void updateLabelCaseCount(String projectName, int endCaseNumber) updated to require name of the active project as first argument. It now calls new private method HashMap<String,String> fetchLabelCaseFileContents() to obtain a hash map of project names and highest used case number for the projects. It re-writes the data to the file, except for the active project, where the new updated case number given as second argument is used instead. If the name of the active project is not found in the previous file contents, a new line is added with case number information for this project.

comment:12 by olle, 8 years ago

Design discussion:

  • Allowing a project to have its own name prefix for samples etc. is one of the more challenging tasks in providing multiple project support for MeLuDI, since choices for the original MeLuDI project were hard-coded in several places in the code.
  • Settings for different projects can also be stored in a number of ways:
    a. Hard-coding settings should be avoided if possible, since a change would require a new program version to be released.
    b. Direct coupling to a BASE project item would be preferable, but annotations cannot at present be coupled to the latter. Otherwise such a solution would have allowed a person with administrator permission to add and configure a new project, without the need to restart the BASE server.
    c. Storing project settings in a configuration file requires an administrator to add and configure a new project, and the BASE server has to be restarted.

The first version of project-specific name prefixes in MeLuDI will be based on storing the settings in a configuration file. In order to allow as much flexibility as possible for future changes, the solution will be based on the configuration file management in Reggie, where settings are stored in XML format. In Reggie the file is named reggie-config.xml, and will be named meludi-config.xml in MeLuDI.

Last edited 7 years ago by olle (previous) (diff)

comment:13 by olle, 8 years ago

(In [4132]) Refs #911. MeLuDI updated with support for a configuration file meludi-config.xml in XML format:

  1. Class path file .classpath in / updated with entry for new library lib/compile/jdom-2.0.5.jar.
  2. New directory /config added with two files, meludi-config.xml (stub only) and readme.txt.
  3. New library file jdom-2.0.5.jar added to lib/compile/.
  4. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with support for configuration file meludi-config.xml.
  5. Java class/file XmlConfig.java in src/net/sf/based/meludi/ added. It is a copy of the corresponding file in Reggie, apart from necessary changes in package name etc.

comment:14 by olle, 7 years ago

Design discussion - Configuration file (continued):

Configuration file meludi-config.xml contains the settings for each MeLuDI project. The first version will have the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<meludi>
	<projects>
		<project>
			<name>...</name>
			<sample-item-prefix>...</sample-item-prefix
			<start-list-item-prefix>...</start-list-item-prefix>
			<start-plate-item-prefix>...</start-plate-item-prefix>
			<patient-item-prefix>...</patient-item-prefix>
		</project>
		...
	</projects>
</meludi>

Configuration values for each project:

XML tag name Description Value for original MeLuDI project
name Name of the project item in BASE. MeLuDi
sample-item-prefix Prefix for sample items in project. ML
start-list-item-prefix Prefix for start list items in project. SL
start-plate-item-prefix Prefix for start plate items in project. LP
patient-item-prefix Prefix for patient items in project. MLP

Note: The "name" tag value is used by MeLuDI to identify the project item in BASE, so it is essential that it corresponds exactly to the project item name in BASE.

  • The use of a list of equally named <project> XML tags corresponds more to the configuration of the LabEnv extension that Reggie ("Laboratory Environment", original ticket #529 "Retrieve and store temperature and humidity measurements"), so part of the configuration solution for the former project will be adapted to MeLuDI.
Last edited 7 years ago by olle (previous) (diff)

comment:15 by olle, 7 years ago

(In [4142]) Refs #911. MeLuDI updated in configuration management to load data into a new data access object, which is used by other classes to retrieve configuration values for the active project:

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated with a block <projects> containing a list of <project> blocks, where a block contains settings for a single project. Initially prefixes for item names of samples, start lists, start plates, and patients are stored.
  2. Javascript file meludi-2.js in resources/ updated in function isValidCaseName(caseName) with a second argument itemNamePrefix to isValidCaseName(caseName, itemNamePrefix).
  3. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    a. Public static constants String ITEM_NAME_PREFIX, Pattern CASE_NAME_PATTERN, and String START_LIST_NAME_PREFIX replaced by new public static methods String fetchSampleItemPrefix(int activeProjectId), Pattern fetchCaseNamePattern(int activeProjectId), and String fetchStartListItemPrefix(int activeProjectId), respectively.
    b. New public static methods String fetchStartPlateItemPrefix(int activeProjectId), String fetchPatientItemPrefix(int activeProjectId), and String fetchRootItemName(String itemName, int activeProjectId) added.
    c. New private instance variable MeludiConfiguration meludiConfiguration with public getter method MeludiConfiguration getMeludiConfiguration() added. The latter method creates an instance of MeludiConfiguration, if the latter is null, before returning it.
    d. New private static method ProjectConfig fetchProjectConfig(int activeProjectId) added. It creates a new instance of MeludiConfiguration and then calls its public method ProjectConfig findByName(String name) to obtain a ProjectConfig object to return.
    e. Public static method boolean itemIsMeludiItem(String itemName) updated with a second argument int activeProjectId to boolean itemIsMeludiItem(String itemName, int activeProjectId), and calls new public method String fetchSampleItemPrefix(int activeProjectId) to get the item name prefix.
  4. New java class/file MeludiConfiguration in src/net/sf/based/meludi/ added. It has a private instance variable List<ProjectConfig> projectConfigList with public accessor methods. The constructor calls private method void fetchConfiguration(), if projectConfigList is null. Private method void fetchConfiguration() reads MeLuDI configuration file meludi-config.xml, and creates a list of ProjectConfig objects with attributes set to the values in the configuration file for the different projects. Public method ProjectConfig findByName(String name) returns the project configuration for the given project name.
  5. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ added. It stores name, sample item prefix, start list item prefix, start plate item prefix, and patient item prefix for a project. It should be updated with new private instance variables and corresponding public accessor methods, if new project configuration values are added to configuration file meludi-config.xml.

comment:16 by olle, 7 years ago

(In [4143]) Refs #911. Increasing safety of creating and closing DbControl items in class Meludi:

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated in private static method ProjectConfig fetchProjectConfig(int activeProjectId) by placing creation of a new DbControl item inside a try-catch-finally block, and closing the DbControl item in the finally block.

comment:17 by olle, 7 years ago

(In [4144]) Refs #911. MeLuDI updated in label generation to support multiple projects:

  1. Javascript file labelgeneration.js in resource/sampleproc/ updated:
    : a. Function caseInfoLoaded(response) updated to use project-specific sample item prefix when generating start case name.
    : b. Function caseNameOnChange() updated to use project-specific sample item prefix when checking a case name.
  2. Java servlet class/file LabelGenerationServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for commands "CountCases" and "GetLastLabelCase" to return sample item prefix for JSON key "sampleItemPrefix" in JSON response.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLabelFile" to use project-specific sample item prefix, when generating names.

comment:18 by olle, 7 years ago

(In [4145]) Refs #911. MeLuDI updated in counter service to support project-specific prefixes when counting start lists:

  1. Java class/file CounterService.java in src/net/sf/based/meludi/counter/ updated:
    a. Package private method void count() updated to call updated private method void countItemLists(DbControl dc, JSONObject json, int projectId) with new argument int projectId.
    b. Private method void countItemLists(DbControl dc, JSONObject json, int projectId updated with new argument int projectId, which is used when obtaining start list item prefix by calling public static method String Meludi.fetchStartListItemPrefix(int activeProjectId).

comment:19 by olle, 7 years ago

(In [4147]) Refs #911. MeLuDI updated in specimen tube registration to support multiple projects:

  1. JSP file specimentube.jsp updated in step 1 by replacing description of specimen item name with new div tag with id "caseNameText".
  2. Javascript file specimentube.js in resource/sampleproc/ updated:
    a. New global variable sampleItemPrefix added.
    b. Function caseInfoLoadedStep1(response), where response comes from calling LabelGenerationServlet with command "CountCases", updated to set value of new global variable sampleItemPrefix to that obtained from response for JSON key "sampleItemPrefix". Start case name set to value of new global variable sampleItemPrefix plus start number. Value of new div tag with id "caseNameText" set to text referring to prefix equal to value of new global variable sampleItemPrefix.
    c. Function validateStep1(event) updated to call function isValidCaseName(caseName, itemNamePrefix) in javascript file meludi-2.js in resources/ with itemNamePrefix set to value of new global variable sampleItemPrefix. Optional error text for invalid case name updated to refer to prefix equal to value of new global variable sampleItemPrefix.
  3. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCaseInfo" to use sample item prefix for active project, when calculating length of case name without extra suffix.

comment:20 by olle, 7 years ago

(In [4148]) Refs #911. MeLuDI updated in personal registration servlet to use new Meludi method to obtain case name without suffixes for active project:

  1. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCaseInfo" to call static method String Meludi.fetchRootItemName(String itemName, int activeProjectId) to obtain case name without suffixes for active project.

comment:21 by olle, 7 years ago

(In [4149]) Refs #911. MeLuDI updated in java data access object classes to support multiple projects:

  1. Java data access object class/file Case.java in src/net/sf/based/meludi/dao/ updated:
    a. Public static method Case findByName(DbControl dc, String name) updated to use sample item prefix for active project when obtaining root name without suffixes.
    b. Public static method List<String> findAllCaseNumbersByPatient(DbControl dc, Patient patient) updated to use sample item prefix for active project when obtaining root name without suffixes.
  2. Java data access object class/file Library.java in src/net/sf/based/meludi/dao/ updated in public static method List<Library> findByCaseName(DbControl dc, String name) to use sample item prefix for active project when obtaining root name without suffixes.
  3. Java data access object class/file PooledLibrary.java in src/net/sf/based/meludi/dao/ updated in public static method List<PooledLibrary> findByCaseName(DbControl dc, String name) to use sample item prefix for active project when obtaining root name without suffixes.
  4. Java data access object class/file StartList.java in src/net/sf/based/meludi/dao/ updated:
    a. Public method List<String> fetchExtractSourceNameListFromItemList(DbControl dc, boolean meludiItemsFirst) updated to use sample item prefix for active project, when checking if items are MeLuDI items or extra material.
    b. Public method List<String> fetchItemNameListFromItemList(DbControl dc, String itemType, boolean meludiItemsFirst) updated to use sample item prefix for active project, when checking if items are MeLuDI items or extra material.
    c. Public method List<Extract> fetchExtractListFromItemList(DbControl dc, String itemType, boolean meludiItemsFirst) updated to use sample item prefix for active project, when checking if items are MeLuDI items or extra material.

comment:22 by olle, 7 years ago

(In [4150]) Refs #911. MeLuDI updated in extraction registration to support multiple projects:

  1. Java servlet class/file ExtractionServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetUnprocessedItems" to use sample item prefix for active project, when checking if items are MeLuDI items or extra material.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetListOfItemsFromStartItemLists" to use sample item prefix for active project, when checking if items are MeLuDI items or extra material.
    c. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetNextStartListName" to use start list item prefix for active project, when obtaining next start list name.
    d. Private method JSONArray fetchStartItemLists(DbControl dc, Boolean processed, Boolean orderDesc, Boolean anItemNotOnLibPlate, Boolean ignoreQpcrBranch) updated to use start list item prefix for active project, when obtaining start item lists, and to use sample item prefix, when checking if items are MeLuDI items or extra material.
    e. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "CreateStartListsFromStartPlates" to use start plate and start list item prefixes for active project, when creating start lists from start plates.

comment:23 by olle, 7 years ago

(In [4151]) Refs #911. MeLuDI updated in case summary to support multiple projects for sample and extract parts:

  1. Javascript file index.js in resources/ updated:
    a. New global variable sampleItemPrefix added.
    b. Function initPage() updated to call new function loadConfiguration().
    c. New function loadConfiguration() calls SessionServlet with new command "GetConfiguration" and callback function onConfiguration(request).
    d. New function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and sets value of new global variable sampleItemPrefix to configuration value for JSON key "sampleItemPrefix", after which pop-up hint for case summary input field is set to text referring to case prefix for active project.
    e. Function caseSummary() updated in notification to refer to sample item prefix for active project.
  2. Javascript file case_summary.js in resources/reports/ updated:
    a. New global variable sampleItemPrefix added.
    b. Function caseInfoLoaded(response) updated to set value of new global variable sampleItemPrefix to value for JSON key "sampleItemPrefix" in JSONObject response from sending "GET" request to CaseSummaryServlet with command "GetCaseInfo".
    c. Function caseSummary(event) updated in case name notification text to refer to sample item prefix equal to value of new global variable sampleItemPrefix.
  3. Java class/file CaseSummaryButtonFactory.java in src/net/sf/based/meludi/extensions/ updated:
    a. Public method boolean prepareContext(InvokationContext<? super ButtonAction> context) updated to call public method Pattern Meludi.fetchCaseNamePattern(int activeProjectId) to obtain a pattern to match case names against, using sample item prefix for the active project.
    b. Public method ButtonAction[] getActions(InvokationContext context) updated to call static method String Meludi.fetchRootItemName(String itemName, int activeProjectId) to obtain case name without suffixes for active project.
  4. Java class/file CaseSummarySectionFactory.java in src/net/sf/based/meludi/extensions/ updated in public method boolean prepareContext(InvokationContext<? super SectionAction> context) updated to call public method Pattern Meludi.fetchCaseNamePattern(int activeProjectId) to obtain a pattern to match case names against, using sample item prefix for the active project.
  5. Java class/file MeludiListColumnsFactory.java in src/net/sf/based/meludi/extensions/ updated in public method String getValue(DbControl dc, BioMaterial bm) to call public method Pattern Meludi.fetchCaseNamePattern(int activeProjectId) to obtain a pattern to match case names against, using sample item prefix for the active project, and to call static method String Meludi.fetchRootItemName(String itemName, int activeProjectId) to obtain case name without suffixes for active project.
  6. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to return sample item prefix for active project in returned JSONObject for JSON key "sampleItemPrefix".
    b. Private method boolean caseNameIsValid(String caseName) updated with second argument int activeProject to boolean caseNameIsValid(String caseName, int activeProject), and to call public method Pattern Meludi.fetchCaseNamePattern(int activeProjectId) to obtain a pattern to match case names against, using sample item prefix for the active project.
    c. Private method ItemList fetchStartList(DbControl dc, String name) updated to call public static method String fetchStartListItemPrefix(int activeProjectId) to obtain the start list item prefix for the active project.
  7. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) with new command "GetConfiguration" to return a JSON Object for JSON key "configuration". The configuration JSONObject contains prefixes for sample, start list, start plate, and patient items for JSON keys "sampleItemPrefix", "startListItemPrefix", "startPlateItemPrefix", and "patientItemPrefix", respectively.

comment:24 by olle, 7 years ago

(In [4155]) Refs #911. MeLuDI updated in pathology referral form (patient + case) registration to support multiple projects:

  1. Javascript file persinfo.js in resource/personal/ updated:
    a. New global variable sampleItemPrefix added.
    b. Function caseInfoLoadedStep1(response), where response comes from calling LabelGenerationServlet with command "CountCases", updated to set value of new global variable sampleItemPrefix to that obtained from response for JSON key "sampleItemPrefix". Start case name set to value of new global variable sampleItemPrefix plus start number.
    c. Function caseNameOnChange() updated to call function isValidCaseName(caseName, itemNamePrefix) in javascript file meludi-2.js in resources/ with itemNamePrefix set to value of new global variable sampleItemPrefix. Optional error text for invalid case name updated to refer to prefix equal to value of new global variable sampleItemPrefix.
  2. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetPatientInfo" to use patient item prefix for active project, when generating next patient name to use.

comment:25 by olle, 7 years ago

(In [4158]) Refs #911. MeLuDI updated to try to increase stability, when getting project configuration for active project:

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated in private static method ProjectConfig fetchProjectConfig(int activeProjectId) by inserting commands using a DbControl item into a try-catch-finally block, and writing a log message if an exception occurred.

comment:26 by olle, 7 years ago

(In [4159]) Refs #911. MeLuDI updated to display name of active project in red at center of wizard header, as a reminder to users working with several MeLuDI projects:

  1. Javascript file meludi-2.js in resources/ updated:
    a. Function initWizard() updated to call new function getActiveProjectName(simpleElement) to obtain the name of the active project, if any, and then display it the wizard header inside an HTML <span> tag with id equal to "meludi-project". Function argument simpleElement is a boolean variable, indicating if the wizard page is the outer index page.
    b. New function getActiveProjectName(simpleElement) added. It call SessionServlet with new command "GetActiveProjectName" to obtain the name of the active project. Argument simpleElement is a boolean variable, indicating if the wizard page is the outer index page, and if used to find the correct path to SessionServlet.
  2. Cascading style sheet file meludi-2.css in resources/css/ updated with settings for tag with id equal to "meludi-project". The text will be displayed in red at center of the line.
  3. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) with new command "GetActiveProjectName" , that will obtain the ID of the active project from the session controller, and return the name of the former (if no project has been selected, the string "- no active project -" is returned).

comment:27 by olle, 7 years ago

Code discussion:

  • The following part of the CSS definition to center the project name is tricky:
    #meludi-project
    {
            ...
            left: 50%;
     	margin-right: -50%;
     	transform: translate(-50%, -50%)
    }
    

It was taken from https://www.w3.org/Style/Examples/007/center.en.html, and an explanation is given near the end of the page. (None of the previous methods mentioned on the page resulted in a properly placed project name.)

comment:28 by olle, 7 years ago

Functional specification update:

  • New configuration variables should be defined for default values of "Project focus" and "Specimen type" for each project, which are used when creating new cases. The possible values should correspond to the menu option values in the JSP file[s].

New configuration values for each project:

XML tag name Description Value for original MeLuDI project
project-focus-default Cancer type studied in the project. <empty string> (unknown)
specimen-type-default Primary tumor or metastasis. <empty string> (unknown)

The menu option values in the JSP file[s] were originally only intended for internal use in the code, and are not in consistent format for both menus. For reference, the current values are therefore listed here:

Project focus
Menu option value Menu option text
unknown
melanoma Melanoma
lungcancer Lung cancer
coloncancer Colon cancer
GIST GIST (Gastrointestinal stromal tumour)


Specimen type
Menu option value Menu option text
unknown
Primary Primary tumour
MetastasisDistant Metastasis

comment:29 by olle, 7 years ago

(In [4160]) Refs #911. MeLuDI updated with configuration values for default menu options of "Project focus" and "Specimen type" for each project; used when creating new cases. The possible values correspond to the menu option values in the JSP file[s].

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags <project-focus-default> and <specimen-type-default>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods String fetchProjectFocusDefault(int activeProjectId) and String fetchSpecimenTypeDefault(int activeProjectId). They call private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values "project-focus-default" and "specimen-type-default" for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects.
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variables and corresponding public accessor methods for new configuration values for project focus default and specimen type default.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration values for project focus default and specimen type default for active project in returned JSONObject for JSON keys "projectFocusDefault" and "specimenTypeDefault", respectively.

comment:30 by olle, 7 years ago

(In [4161]) Refs #911. MeLuDI updated in specimen tube registration with and without corresponding patient information to support project configuration values for project focus default and specimen type default:

  1. Javascript files specimentube.js in resources/sampleproc/ and persinfo.js in resources/personal/ updated:
    a. Function initPage() updated at end by replacing call to LabelGenerationServlet with command "CountCases" with call to new function loadConfiguration().
    b. New function loadConfiguration() calls SessionServlet with command "GetConfiguration" and callback function onConfiguration(request).
    c. New function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and obtains values for JSON keys "projectFocusDefault" and "specimenTypeDefault", after which default options for the project focus and specimen type menus are set to the corresponding values. If default menu options are set for the project focus menu, function projectFocusOnChange() is called. At the end, the call to LabelGenerationServlet with command "CountCases", that was originally at the end of function initPage(), is made.

comment:31 by olle, 7 years ago

(In [4162]) Refs #911. MeLuDI updated to hopefully eliminate problems when trying to obtain name of active project after non-activity during a couple of hours. The problem was caused by a PermissionDeniedException when trying to get a Project item for known ID value in private static method ProjectConfig fetchProjectConfig(int activeProjectId) in java class/file Meludi.java in src/net/sf/based/meludi/. Now the project names for different ID values are stored in a private static hash map instead.

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    a. New private static HashMap<Integer,String> projectIdNameHM is added to store project names for different ID values.
    b. Private static method ProjectConfig fetchProjectConfig(int activeProjectId) updated to get name of active project from the new private static HashMap<Integer,String> projectIdNameHM, instead of from a created Project item.
    c. Public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) updated to create new private static HashMap<Integer,String> projectIdNameHM, if it is null, and populate it with project names for project ID values, as a side effect of the method.

comment:32 by olle, 7 years ago

(In [4163]) Refs #911. MeLuDI updated in sample source reports and sample processing statistics to support multiple projects:

  1. Java servlet class/file SampleReportServlet.java in src/net/sf/based/meludi/servlet/ updated in private methods:
    a. JSONObject createSampleCountReport(...)
    b. JSONObject createPatientCountReport(...)
    c. JSONObject createOverviewReport(...)
    d. JSONObject createSampleListForMissingSampleDataReport(...)
    to call public static method String Meludi.fetchSampleItemPrefix(int activeProjectId) to get sample item prefix to use in sample query.
  2. Java servlet class/file MeludiQuarterMonthReportServlet.java in src/net/sf/based/meludi/servlet/ updated in private method JSONObject createMeludiQuarterMonthReport(...) to call public static method String Meludi.fetchSampleItemPrefix(int activeProjectId) to get sample item prefix to use in sample and extract queries.

comment:33 by olle, 7 years ago

(In [4169]) Refs #911. MeLuDI instruction file readme.txt, accompanying configuration file template meludi-config.xml in config/, updated with instruction to see new web page http://baseplugins.thep.lu.se/wiki/net.sf.basedb.meludi.notes1_5_0 for details on the contents of the configuration file.

comment:34 by olle, 7 years ago

(In [4170]) Refs #911. Updates due to version number change to "1.5.0a1".

  1. Version number change to "1.5.0a1":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file samplereportgenerator.js in resources/reports/ updated.
    e. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:35 by olle, 7 years ago

(In [4171]) Refs #911. Updates due to version number change to "1.5.0-dev".

  1. Version number changed to "1.5.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file samplereportgenerator.js in resources/reports/ updated.
    e. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:36 by olle, 7 years ago

(In [4174]) Refs #911. MeLuDI updated in sample source reports to display name of active project in top line of table header, to the left of program title and version (the latter two entries are now enclosed by square brackets):

  1. Java servlet class/file SampleReportServlet.java in src/net/sf/based/meludi/servlet/ updated in private methods:
    a. JSONObject createSampleCountReport(DbControl dc, JSONObject json, ...)
    b. JSONObject createSampleCountReport(DbControl dc, List<Sample> sampleList, ...)
    c. JSONObject createPatientCountReport(DbControl dc, JSONObject json, ...)
    d. JSONObject createOverviewReport(DbControl dc, JSONObject json, ...)
    e. JSONObject createSampleListForMissingSampleDataReport(DbControl dc, JSONObject json, ...)
    to call new private method JSONObject fetchJsonReportPrimer(DbControl dc) to get initial report JSONObject, with name of active project stored with JSON key "projectName", and sites JSONArray stored with JSON key "sites".
  2. Javascript file samplereportgenerator.js in resources/reports/ updated in functions:
    a. createItemCountReport(report, reportType)
    b. createOverviewReport(report)
    c. createOverviewPatientWithSampleTable(report)
    d. createMissingSampleDataReport(report)
    to get name of active project from report JSONObject with JSON key "projectName", and display it in top line of table header, to the left of program title and version (the latter two entries are now enclosed by square brackets).

comment:37 by olle, 7 years ago

(In [4175]) Refs #911. MeLuDI updated in sample processing statistics to display name of active project in top header line of each diagram, followed by program title and version enclosed by square brackets:

  1. Outermost Ant build file build.xml in / updated for targets update-title and update-version to copy the title and version strings to attributes report.TITLE and report.VERSION in javascript file meludi_quarter_month_report_generator.js in resources/reports/.
  2. Java servlet class/file MeludiQuarterMonthReportServlet.java in src/net/sf/based/meludi/servlet/ updated in private method JSONObject createMeludiQuarterMonthReport(...) to store name of active project in returned JSONObject with JSON key "projectName".
  3. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated:
    a. New attributes report.TITLE and report.VERSION added for software title and version.
    b. Function onPlotGenerated(response) updated to get name of active project from JSON response with JSON key "projectName", and create diagram header line with project name, followed by program title and version enclosed by square brackets.

comment:38 by olle, 7 years ago

Printing note: With the extra project name and software info header line for diagrams in sample processing statistics, a print scale of 86% seems to allow two diagrams per A4 page to be printed.

comment:39 by olle, 7 years ago

(In [4176]) Refs #911. MeLuDI updated to not crash, when a non-configured project is selected as active. Prefixes for sample, start list, start plate, and patient items should be set to an empty string for non-configured projects, and project focus and specimen type defaults to null.

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    a. Public static method fetchSampleItemPrefix(int activeProjectId) updated to return an empty string, if no configuration can be found for the active project.
    b. Public static method fetchStartListItemPrefix(int activeProjectId) updated to return an empty string, if no configuration can be found for the active project.
    c. Public static method fetchStartPlateItemPrefix(int activeProjectId) updated to return an empty string, if no configuration can be found for the active project.
    d. Public static method fetchPatientItemPrefix(int activeProjectId) updated to return an empty string, if no configuration can be found for the active project.
    e. Public static method fetchProjectFocusDefault(int activeProjectId) updated to return null, if no configuration can be found for the active project.
    f. Public static method fetchSpecimenTypeDefault(int activeProjectId) updated to return null, if no configuration can be found for the active project.
Last edited 7 years ago by olle (previous) (diff)

comment:40 by olle, 7 years ago

(In [4178]) Refs #911. MeLuDI updated in case summary to refer to sample prefix for active project in pop-up hint for case summary input field:

  1. Javascript file case_summary.js in resources/reports/ updated in function caseInfoLoaded(response) to set pop-up hint for case summary input field to text referring to case prefix for active project.

comment:41 by olle, 7 years ago

Code comment: The pop-up hint referred to in [4151], part 1.d, concerns the case summary case id input field on the index page, while that in [4178] concerns the "Find another case" case id input field on the case summary page itself.

comment:42 by olle, 7 years ago

(In [4180]) Refs #911. Servlet InstallServlet updated with definitions of string constants for specimen types:

  1. Java servlet class/file InstallServlet.java in src/net/sf/basedb/meludi/servlet/ updated with definitions of public static String constants for specimen types, since the latter are used in more than one place in the code.

comment:43 by olle, 7 years ago

Functional specification update:

  • It was decided to update MeLuDI support for multiple projects with the following:
  1. Storage boxes should be specific for each project, and should therefore also have names with project-specific prefixes.
  2. Library preparation kits should be specific for each project, and should therefore also have names with project-specific prefixes.
  3. a. It should be possible to store the form in which specimens are delivered, e.g. "Fresh frozen", "FFPE section", "FFPE punch", "FFPE slide", or "Cell line". String annotation type SPECIMEN_TYPE is already used to store the biological origin of a specimen, e.g. "Primary tumour" or "Metastasis", so a new string annotation type SPECIMEN_INPUT_TYPE will be defined for the new information.
    b. In order to simplify specimen registration, it should be possible to configure a specimen input type default value for a project.
  4. a. The list of menu options for "Project focus" will be extended with "Breast cancer".
    b. If desired, selection of project focus "Breast cancer" will pre-select a number of mutation analysis items (which items, if any, will be decided later).
    c. Optionally, the mutation analysis list may be extended with new options suitable for breast cancer.
  5. For many projects, a PAD number is known for a case, but no patient data like names or personal number. Currently, it is only possible to register a PAD number in connection with patient data, for which a personal number is required. MeLuDI should be updated to allow a PAD number to be registered in connection with case registration without patient information, provided that the user has patient curator permission (otherwise the PAD input field should be disabled).

comment:44 by olle, 7 years ago

(In [4184]) Refs #911. MeLuDI updated with configuration values for storage box prefix, library preparation kit item prefix, and default menu option of "Specimen input type" for each project.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags <storage-box-prefix>, library-preparation-kit-item-prefix, and <specimen-input-type-default>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods String fetchStorageBoxPrefix(int activeProjectId), String fetchLibraryPreparationKitItemPrefix(int activeProjectId), and String fetchSpecimenInputTypeDefault(int activeProjectId). They call private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values "storage-box-prefix", "library-preparation-kit-item-prefix", and "specimen-input-type-default" for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects.
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variables and corresponding public accessor methods for new configuration values for storage box prefix, library preparation kit item prefix, and specimen input type default.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration values for storage box prefix, library preparation kit item prefix, and specimen input type default for active project in returned JSONObject for JSON keys "storageBoxPrefix", "libraryPreparationKitItemPrefix", and "specimenInputTypeDefault", respectively.

comment:45 by olle, 7 years ago

(In [4186]) Refs #911. MeLuDI updated by exchanging configuration XML tag library-preparation-kit-item-prefix for the shorter libprep-kit-item-prefix.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> by exchanging XML tag library-preparation-kit-item-prefix for libprep-kit-item-prefix.
  2. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain configuration value "libprep-kit-item-prefix" instead of "library-preparation-kit-item-prefix" for each project from the meludi-config.xml configuration file, and store the values in instance variable libraryPreparationKitItemPrefix in ProjectConfig objects for the projects.

comment:46 by olle, 7 years ago

(In [4187]) Refs #911. MeLuDI updated with project-specific prefixes for storage box names when registering new cases without patient information:

  1. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/based/meludi/servlet/ updated in private method JSONArray findFreeWells(DbControl dc, Integer nofTubes, String storageBoxSuffix, Boolean fillGaps) by calling public static method String Meludi.fetchStorageBoxPrefix(int activeProjectId) to obtain prefix for storage box names for the active project.

comment:47 by olle, 7 years ago

(In [4189]) Refs #911. MeLuDI case registration with patient info updated to create storage box items, if needed. This was never added, when this functionality was added for case registration without patient information in change set [3478] in Ticket #802 (MeLuDI v.1.3.1 bug fixes and improvements). Note that javascript persinfo.js in resources/personal/ calls SpecimenTubeServlet with commands "FindStoragePositions" and "ValidateWell", so this functionality needs not be replicated in PersonalRegistrationServlet.

  1. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "CreateCase" to create a HashMap<String, BioPlate> item that is given as argument in calls of updated private methods BioWell fetchBioWell(DbControl dc, JSONObject jsonSpec, HashMap<String, BioPlate> bioPlateNamePlateHashMap) and BioWell fetchBioWell(DbControl dc, JSONObject jsonSpec, HashMap<String, BioPlate> bioPlateNamePlateHashMap, String boxType).
    b. Private method BioWell fetchBioWell(DbControl dc, JSONObject jsonSpec, HashMap<String, BioPlate> bioPlateNamePlateHashMap) updated with new argument HashMap<String, BioPlate> bioPlateNamePlateHashMap, that is used as argument when calling updated private method BioWell fetchBioWell(DbControl dc, JSONObject jsonSpec, HashMap<String, BioPlate> bioPlateNamePlateHashMap, String boxType).
    c. Private method BioWell fetchBioWell(DbControl dc, JSONObject jsonSpec, HashMap<String, BioPlate> bioPlateNamePlateHashMap, String boxType) updated with new argument HashMap<String, BioPlate> bioPlateNamePlateHashMap. If no storage box item with the name specified in argument jsonSpec exists, a check is made if a created item with the desired name exists in the hash map, in which case the former is used, otherwise new private method BioPlate createStorageBox(DbControl dc, String plateName) is called to provide one. If a new storage box item is created, it is marked to be saved in the database by calling dc.saveItem(), with the item as argument, after which it is added as value in the hash map, using the storage box name as key.
    d. New private method BioPlate createStorageBox(DbControl dc, String plateName) added. It preforms database queries to obtain plate geometry and bio plate type items for storage boxes, which are used to create a new BioPlate storage box item with the desired name. The created storage box item is then returned. Database queries are performed for the plate geometry and bio plate type items, instead of creating new items, since the BioPlate storage box item contains links to the former items.

comment:48 by olle, 7 years ago

(In [4190]) Refs #911. MeLuDI updated with project-specific prefixes for library preparation kit names. Note that this only affects suggestion for kit name, when adding a new kit. When sets of kits are imported from a "consumables" CSV text file, the kits get the names specified in the file, and it is therefore best to edit the file, before it is imported.

  1. Javascript add_new_libprep_kit.js in resources/libprep/ updated in function initializeStep1() to not send a "kitNamePrefix" parameter, when calling LibPrepServlet with a "GET" request with command "GetNextAutoGeneratedKitName".
  2. Java servlet class/file LibPrepServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetNextAutoGeneratedKitName" to obtain kit name prefix by calling public static method String Meludi.fetchLibraryPreparationKitItemPrefix(int activeProjectId), instead of from a request parameter.

comment:49 by olle, 7 years ago

(In [4195]) Refs #911. MeLuDI updated with support for new specimen property, "Specimen input type", that indicates the form in which the specimen was delivered, e.g. "Fresh frozen", "FFPE section", etc. Initially is assumed that all specimens delivered for a case have identical specimen input type.

  1. JSP file persinfo.jsp in resources/personal/ updated by adding an input menu for specimen input type, when registering new cases with patient information.
  2. Javascript file persinfo.js in resources/personal/ updated:
    a. Function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and obtains values for JSON key "specimenInputTypeDefault", after which default option for the specimen input type menu is set to the corresponding value.
    b. Function initializeStep3() updated to set value of specimen input type menu to that of specimens for an existing case.
    c. Function submit() updated to include value of specimen input type menu in data sent to PersonalRegistrationServlet.
  3. JSP file case_summary.jsp in resources/reports/ updated by adding an report field for specimen input type in the specimen section, below that for specimen type.
  4. Javascript file case_summary.js in resources/reports/ updated in function caseInfoLoaded(response) to set value for specimen input type field to that for the reported specimen.
  5. JSP file specimentube.jsp in resources/sampleproc/ updated by adding an input menu for specimen input type, when registering new cases without patient information.
  6. Javascript file specimentube.js in resources/sampleproc/ updated:
    a. Function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and obtains values for JSON key "specimenInputTypeDefault", after which default option for the specimen input type menu is set to the corresponding value.
    b. Function submit() updated to include value of specimen input type menu in data sent to SpecimenTubeServlet.
  7. Java data access object class/file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated with new SpecimenInputType annotation type for samples (specimen).
  8. Java servlet class/file InstallServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for commands "Validate" and "Install" to add value options "fresh_frozen", "ffpe_section", "ffpe_punch", "ffpe_slide", and "cell_line" for new annotation type SpecimenInputType, and to add the annotation type to the specimen annotation type category.
  9. Java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. New private method String fetchSpecimenInputType(DbControl dc, SnapshotManager manager, Sample s) added. It returns specimen input type for the sample, based on the latter's specimen input type annotation.
    b. New private method String fetchSpecimenInputType(String rawSpecimenInputType) added. It returns a more readable string of a specimen input type.
    c. Private method void loadSpecimenInfo(DbControl dc, SnapshotManager manager, SpecimenTube specimen) updated to set the value of annotation specimen input type for SpecimenTube data access object to that of the annotation for corresponding sample item.
  10. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCaseInfo" to set the value of annotation specimen input type for SpecimenTube data access object to that of the annotation for corresponding sample item.
    b. Private method void setAnnotations(DbControl dc, Annotatable item, JSONObject jsonCase, int nofSections, String operatorComment) updated to obtain value of specimen input type from JSONObject jsonCase via JSON key "specimenInputType", and set the corresponding annotation for current annotatable item to the obtained value.
  11. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/basedb/meludi/servlet/ updated in private method void setAnnotations(DbControl dc, Annotatable item, JSONObject jsonCase, int nofSections, String operatorComment) to obtain value of specimen input type from JSONObject jsonCase via JSON key "specimenInputType", and set the corresponding annotation for current annotatable item to the obtained value.

comment:50 by olle, 7 years ago

(In [4196]) Refs #911. MeLuDI updated by extending list of menu options for "Project focus" with "Breast cancer":

  1. JSP file persinfo.jsp in resources/personal/ updated by adding option "Breast cancer" to input menu for project focus.
  2. JSP file meludi_quarter_month_report_generator.jsp in resources/reports/ updated by adding option "Breast cancer" to input menu for project focus filter.
  3. JSP file samplereportgenerator.jsp in resources/reports/ updated by adding option "Breast cancer" to input menu for project focus filter.
  4. Javascript file samplereportgenerator.js in resources/reports/ updated in function getProjectFocusFilterDisplayText(projectFocusFilter) by adding support for option "Breast cancer".
  5. JSP file specimentube.jsp in resources/sampleproc/ updated by adding option "Breast cancer" to input menu for project focus.
  6. Java servlet class/file InstallServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. New public static String constant PROJECTFOCUS_BREAST_CANCER defined with value "breastcancer", that corresponds to the menu value for option "Breast cancer" in the project focus menu.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for commands "Validate" and "Install" to include PROJECTFOCUS_BREAST_CANCER in value options for annotation type PROJECT_FOCUS.
  7. Java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/meludi/servlet/ updated in private method String fetchProjectFocus(DbControl dc, SnapshotManager manager, Sample s) by including support for option "Breast cancer".
  8. Java servlet class/file MeludiQuarterMonthReportServlet.java in src/net/sf/basedb/meludi/servlet/ updated in private method String fetchProjectFocusFilterName(String projectFocusFilter) by including support for option "Breast cancer".

comment:51 by olle, 7 years ago

(In [4198]) Refs #911. MeLuDI updated to allow a PAD number to be included, when registering a new case without other patient information, provided that the user has PatientCurator or Administrator permissions, otherwise the PAD input field will be disabled.

  1. JSP file specimentube.jsp in resources/sampleproc/ updated by adding an input field for PAD/CL number before the number of tubes, when registering new cases without other patient information.
  2. Javascript file specimentube.js in resources/sampleproc/ updated:
    a. New global JSONObject variable myPermissions added.
    b. Function initPage() updated to connect PAD/CL field to new event handler padOnChange(), and call new function initPermissions() before loadConfiguration().
    c. New function initPermissions() added. It is based on the function with same name in javascript file index.js in resources/. It calls InstallServlet with command "GetPermissions" and callback function onPermissionsLoaded().
    d. New function onPermissionsLoaded(request) added. It is based on the first part of the function with same name in javascript file index.js in resources/, and only sets the value of global JSONObject variable myPermissions to the returned permissions.
    e. Function caseInfoLoadedStep1(response) updated to check with global variable myPermissions if the logged-in user has Administrator or PatientCurator permissions, and if not, disable the PAD/CL input field.
    f. New function padOnChange() added. It displays a warning if the PAD/CL value is missing, but only if the field has been in focus.
    g. Function submit() updated to include the PAD/CL number in the case info JSONObject sent to SpecimenTubeServlet with command "CreateSpecimenTubes".
  3. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doPost(HttpServletRequest req, HttpServletResponse resp) for command "CreateSpecimenTubes" to check if the logged-in user has PatientCurator role by calling public static method void MeludiRole.checkPermission(DbControl dc, String message, MeludiRole... roles) for roles MeludiRole.PATIENT_CURATOR and MeludiRole.ADMINISTRATOR in a try-catch block, and setting value of new boolean variable hasPatientCuratorRole to false, if a PermissionDeniedException is thrown, else true. If hasPatientCuratorRole is true, annotation PAD for the created specimens are set to the submitted PAD value.

comment:52 by olle, 7 years ago

(In [4199]) Refs #911. Outermost README file in / updated with instruction to repeat running the MeLuDI installation wizard for each of the configured projects as active project.

comment:53 by olle, 7 years ago

(In [4200]) Refs #911. MeLuDI updated with project-specific prefixes for start plate names:

  1. Javascript file select_dna.js in resources/libprep/ updated:
    a. New global variable startPlatePrefix added.
    b. Function initPage() updated to call new function loadConfiguration().
    c. New function loadConfiguration() calls SessionServlet with command "GetConfiguration" and callback function onConfiguration(request).
    d. New function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and sets value of new global variable startPlatePrefix to configuration value for JSON key "startPlateItemPrefix", after which DnaServlet is called with command "GetNextAutoGeneratedPlateName", and parameter "bioPlatePrefix" set to value of new global variable startPlatePrefix.
  2. Javascript file select_dna_for_start_plate.js in resources/libprep/ updated:
    a. New global variable startPlatePrefix added.
    b. Function initPage() updated to call new function loadConfiguration().
    c. New function loadConfiguration() calls SessionServlet with command "GetConfiguration" and callback function onConfiguration(request).
    d. New function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and sets value of new global variable startPlatePrefix to configuration value for JSON key "startPlateItemPrefix".
    d. Function initializeStep4(event) updated to call DnaServlet with command "GetNextAutoGeneratedPlateName", and parameter "bioPlatePrefix" set to value of new global variable startPlatePrefix.
  3. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated in private method BioPlate fetchStartPlate(DbControl dc, String name) to call public static method String Meludi.fetchStartPlateItemPrefix(int activeProjectId) to get prefix for start plate name.
  4. Java servlet class/file DnaServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doPost(HttpServletRequest req, HttpServletResponse resp) for command "CreateDnaOrLibPlate" to obtain start plate name prefix by calling public static method String Meludi.fetchStartPlateItemPrefix(int activeProjectId).
  5. Java servlet class/file ExtractionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for commands "GetStartPlates", "GetProcessedStartPlates", and "GetNextStartPlateName" to obtain start plate name prefix by calling public static method String Meludi.fetchStartPlateItemPrefix(int activeProjectId).

comment:54 by olle, 7 years ago

(In [4201]) Refs #911. Updates due to version number change to "1.5.0a2".

  1. Version number change to "1.5.0a2":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:55 by olle, 7 years ago

(In [4202]) Refs #911. Updates due to version number change to "1.5.0-dev".

  1. Version number change to "1.5.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:56 by olle, 7 years ago

(In [4204]) Refs #911. MeLuDI updated when inspecting start plates to use project-specific sample/extract item prefixes when reporting number of MeLuDI- and extra material items for start plates in selection menu:

  1. Java servlet class/file DnaServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetStartPlates" to use project-specific sample/extract item prefixes when reporting number of MeLuDI- and extra material items for start plates in selection menu.

comment:57 by olle, 7 years ago

Functional specification update:

  • MeLuDI library preparation kit data edit dialog should be updated to allow unused FPA plate locations to be input in a GUI-style plate grid of checkboxes, instead of as a string of comma-separated well names:
    a. The table editor for unused FPA plate locations is placed in its own tab in the editor dialog box.
    b. The editor tab should display two tables, the left with checkboxes in each cell (checkboxes are checked for cells with unused FPA reagents), and the right with color-coded default (original) settings.

Code notes:
a. For unknown reason, attempts to call LibPrepServlet from the dialog javascript file edit_libprep_kit_details.js to obtain a JSON plate representation of a kit were unsuccessful. This was solved by making the call from the host javascript file inspect_libprep_kit_data.js (from which an edit dialog managed by edit_libprep_kit_details.js may be opened) and store the returned JSON data in a global variable, from which edit_libprep_kit_details.js could obtain the data by calling a new function in inspect_libprep_kit_data.js.
b. Attempts to add extra class names to table cells in he left table with checkboxes, in order for the background of each cell to be color-coded in the same manner as in the right table, led to read-only checkboxes, so this feature was postponed to a future update.

Design update:

  1. JSP file edit_libprep_kit_details.jsp in resources/libprep/ updated:
    a. Style section updated with CSS settings for the color-coded plate representation, taken from JSP file inspect_libprep_used_kits.jsp.
    b. Input field for unused FPA plate locations removed from tab "details".
    c. New tab "unusedFpaLocs2" added with title "Unused FPS plate locations". The second row contains columns with div tags with id values "kitplatetablecontent" and "kitplatetablecontentdefault", respectively.
  2. Javascript file edit_libprep_kit_details.js in resources/libprep/ updated:
    a. New global variable bioplateGlobal added.
    b. Function initPage() updated to not enter string representation of unused FPA plate locations in an input field, and to call new function kitPlateInfoLoaded() at end.
    c. New function kitPlateInfoLoaded() calls function fetchKitPlateInfo() in javascript file inspect_libprep_kit_data.js to obtain JSON data for a plate representation of the unused FPA plate locations for the selected kit, and then calls new function buildKitInfoPlate(plate, addCheckboxes) to obtain HTML table representations of the latter, with and without checkboxes.
    d. New function buildKitInfoPlate(plate, addCheckboxes) added. It is based on function buildKitInfoPlate(plate) in javascript file inspect_libprep_used_kits.js, but extended to allow checkboxes in table cells.
    e. New function fetchUnusedFpaPlateLocations() added. It returns a string of comma-separated well names for unused FPA plate locations, based on current values for checkboxes in the new table.
    f. Function saveDetails() updated to call new function fetchUnusedFpaPlateLocations() to obtain a string of comma-separated well names for unused FPA plate locations.
  3. Javascript file inspect_libprep_kit_data.js in resources/libprep/ updated:
    a. New global JSONObject variable kitPlateInfo added.
    b. Function editLibPrepKitDetails(event) updated to call LibPrepServlet with new command "GetLibPrepKitAsPlate" and callback function kitPlateInfoLoaded(response), and include row index and kit name as parameters.
    c. New function kitPlateInfoLoaded(response) added. It obtains the JSON kit plate info and the row index from the response, sets the value of new global JSONObject variable kitPlateInfo to the former, and then continues with the rest of the code in the original function editLibPrepKitDetails(event), that opens a dialog window for editing the selected kit data.
    d. New function fetchKitPlateInfo() added. It returns the value of new global JSONObject variable kitPlateInfo.
  4. Java servlet class/file LibPrepServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) with new command "GetLibPrepKitAsPlate". It is based on code for command "GetLibPrepKitsAsPlates", but takes library kit name as input parameter, plus an integer index value, that is included in the returned JSON data.

comment:58 by olle, 7 years ago

(In [4206]) Refs #911. MeLuDI library preparation kit data edit dialog updated to allow unused FPA plate locations to be input in a GUI-style plate grid of checkboxes, instead of as a string of comma-separated well names:
a. The table editor for unused FPA plate locations is placed in its own tab in the editor dialog box.
b. The editor tab displays two tables, the left with checkboxes in each cell (checkboxes are checked for cells with unused FPA reagents), and the right with color-coded default (original) settings.

  1. JSP file edit_libprep_kit_details.jsp in resources/libprep/ updated:
    a. Style section updated with CSS settings for the color-coded plate representation, taken from JSP file inspect_libprep_used_kits.jsp.
    b. Input field for unused FPA plate locations removed from tab "details".
    c. New tab "unusedFpaLocs2" added with title "Unused FPS plate locations". The second row contains columns with div tags with id values "kitplatetablecontent" and "kitplatetablecontentdefault", respectively.
  2. Javascript file edit_libprep_kit_details.js in resources/libprep/ updated:
    a. New global variable bioplateGlobal added.
    b. Function initPage() updated to not enter string representation of unused FPA plate locations in an input field, and to call new function kitPlateInfoLoaded() at end.
    c. New function kitPlateInfoLoaded() calls function fetchKitPlateInfo() in javascript file inspect_libprep_kit_data.js to obtain JSON data for a plate representation of the unused FPA plate locations for the selected kit, and then calls new function buildKitInfoPlate(plate, addCheckboxes) to obtain HTML table representations of the latter, with and without checkboxes.
    d. New function buildKitInfoPlate(plate, addCheckboxes) added. It is based on function buildKitInfoPlate(plate) in javascript file inspect_libprep_used_kits.js, but extended to allow checkboxes in table cells.
    e. New function fetchUnusedFpaPlateLocations() added. It returns a string of comma-separated well names for unused FPA plate locations, based on current values for checkboxes in the new table.
    f. Function saveDetails() updated to call new function fetchUnusedFpaPlateLocations() to obtain a string of comma-separated well names for unused FPA plate locations.
  3. Javascript file inspect_libprep_kit_data.js in resources/libprep/ updated:
    a. New global JSONObject variable kitPlateInfo added.
    b. Function editLibPrepKitDetails(event) updated to call LibPrepServlet with new command "GetLibPrepKitAsPlate" and callback function kitPlateInfoLoaded(response), and include row index and kit name as parameters.
    c. New function kitPlateInfoLoaded(response) added. It obtains the JSON kit plate info and the row index from the response, sets the value of new global JSONObject variable kitPlateInfo to the former, and then continues with the rest of the code in the original function editLibPrepKitDetails(event), that opens a dialog window for editing the selected kit data.
    d. New function fetchKitPlateInfo() added. It returns the value of new global JSONObject variable kitPlateInfo.
  4. Java servlet class/file LibPrepServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) with new command "GetLibPrepKitAsPlate". It is based on code for command "GetLibPrepKitsAsPlates", but takes library kit name as input parameter, plus an integer index value, that is included in the returned JSON data.

comment:59 by olle, 7 years ago

(In [4207]) Refs #911. MeLuDI extra material registration updated to refer to project-specific sample item prefix:

  1. JSP file extramaterial.jsp in resources/sampleproc/ updated in step 2 by exchanging prefix naming instruction for new div tag with id "instructSamplePrefix".
  2. Javascript file extramaterial.js in resources/sampleproc/ updated:
    a. New global variable sampleItemPrefix added.
    b. Function initPage() updated to call LabelGenerationServlet with command "CountCases" and callback function projectInfoLoaded(response).
    c. New function projectInfoLoaded(response) obtains sample item prefix for active project from servlet JSON response for JSON key "sampleItemPrefix", and sets global variable sampleItemPrefix to this value, after which it updates prefix naming instruction to correspond to the current sample item prefix.
    d. Function nameOnChange(event) updated to use sample item prefix for active project, when checking proposed name for extra material item.

comment:60 by olle, 7 years ago

(In [4211]) Refs #911. MeLuDI updated by adding sites "Umeå" and "Uppsala";

  1. JSP file persinfo.jsp in resources/personal/ updated by adding options for new sites in site menu. Site menu options are now placed in alphabetical order to make it simpler to find a desired item.
  2. JSP file specimentube.jsp in resources/sampleproc/ updated by adding options for new sites in site menu. Site menu options are now placed in alphabetical order to make it simpler to find a desired item.
  3. Java class/file Site.java in src/net/sf/based/meludi/ updated by adding entries for new sites "Umeå and "Uppsala" (neither are members of "RCC syd").
  4. Java servlet class/file InstallServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for commands "Validate" and "Install" by including the new sites in value options for Annotationtype.SITE.

comment:61 by olle, 7 years ago

Functional specification update:

  • It was decided to update MeLuDI support for multiple projects with the following:
  1. It should be possible to configure the number of digits in the following item names for each project:
    a. Sample items (includes extracts).
    b. Storage boxes.
    c. Start list items.
    d. Start plate items.
    e. Patient items.
  2. If no number of digits has been configured for an item for a project, the value used for the original MeLuDI project should be used.
  3. Support for configurable number of digits might not be added for all item types at the same time. The first item types to have support for configurable number of digits in item names are sample items and storage boxes.
Item type #Digits in item name for original MeLuDI project
Sample 5
Storage box 4
Start list 5
Start plate 5
Patient 6

comment:62 by olle, 7 years ago

(In [4213]) Refs #911. MeLuDI updated with configuration values for number of digits in item names of samples, storage boxes, start lists, start plates, and patient items for each project.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags
    <sample-item-num-digits>,
    <storage-box-num-digits>,
    start-list-item-num-digits,
    start-plate-item-num-digits, and
    <patient-item-num-digits>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods
    Integer fetchSampleItemNumDigits(int activeProjectId),
    Integer fetchStorageBoxNumDigits(int activeProjectId),
    Integer fetchStartListItemNumDigits(int activeProjectId),
    Integer fetchStartPlateItemNumDigits(int activeProjectId), and
    Integer fetchPatientItemNumDigits(int activeProjectId). They call private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values of number of digits for the selected items for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects. If no configuration value is found, the number of digits for the original MeLuDI project is used.
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variables and corresponding public accessor methods for new configuration values for number of digits for the selected items.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration values for number of digits for the selected items for active project in returned JSONObject for JSON keys
    "sampleItemNumDigits",
    "storageBoxNumDigits",
    "startListItemNumDigits",
    "startPlateItemNumDigits", and
    "patientItemNumDigits", respectively.

comment:63 by olle, 7 years ago

(In [4214]) Refs #911. MeLuDI updated in index page to use project-specific number of digits for sample item in hint for case summary input field for case name:

  1. Javascript file index.js in resources/ updated:
    a. New global variable sampleItemNumDigits added, with default value 5.
    b. Function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and sets value of new global variable sampleItemNumItems to configuration value for JSON key "sampleItemNumDigits", after which pop-up hint for case summary input field is set to text referring to case prefix for active project.
    c. Function caseSummary() updated in notification to refer to sample item number of digits for active project, when case summary is called with no case name entered.

comment:64 by olle, 7 years ago

(In [4215]) Refs #911. MeLuDI updated in label generation to support project-specific number of digits in sample item name:

  1. Javascript file meludi-2.js in resources/ updated with new function isValidCaseName2(caseName, itemNamePrefix, itemNumDigits) to use values for sample item prefix and number of digits in regular expression to determine is a case name is valid.
  2. Javascript file labelgeneration.js in resources/sampleproc/ updated:
    a. New global variable sampleItemNumDigits added, with default value 5.
    b. Function caseInfoLoaded(response) updated to obtain number of digits for sample item name from JSON response for JSON key "sampleItemNumDigits" and set the new global variable sampleItemNumDigits to this value, after which the start number for label generation is constructed to include the correct number of digits.
    : c. Function caseNameOnChange() updated to call new function Meludi.isValidCaseName2(caseName, itemNamePrefix, itemNumDigits) with project-specific value of sample item prefix and sample item number of digits to check if a case name is valid.
  3. Java servlet class/file LabelGenerationServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for commands "CountCases" and "GetLastLabelCase" to return sample item number of digits for JSON key "sampleItemNumDigits" in JSON response.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLabelFile" to use project-specific sample item number of digits, when generating names.

comment:65 by olle, 7 years ago

(In [4216]) Refs #911. MeLuDI updated in convenience methods in class Meludi to support project-specific number of digits in sample and extract item names:

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated in public static methods Pattern fetchCaseNamePattern(int activeProjectId) and String fetchRootItemName(String itemName, int activeProjectId) to support project-specific number of digits in sample and extract item names.

comment:66 by olle, 7 years ago

(In [4217]) Refs #911. MeLuDI updated to use project-specific number of digits in storage box names, when registering new cases:

  1. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Private method JSONArray findFreeWells(DbControl dc, Integer nofTubes, String storageBoxSuffix, Boolean fillGaps) updated to call public static method Integer Meludi.fetchStorageBoxNumDigits(int activeProjectId) to obtain the number of digits in the storage box name, and use this value as new argument when calling updated private method BioPlate createStorageBox(DbControl dc, String platePrefix, Integer plateNumDigits, String plateSuffix, int plateNumber).
    b. Private method BioPlate createStorageBox(DbControl dc, String platePrefix, Integer plateNumDigits, String plateSuffix, int plateNumber) updated with new argument Integer plateNumDigits, specifying the number of digits to use in the created storage box name. If the value of argument plateNumDigits is null or < 1, the number of digits is set to the value used in the original MeLuDI project, 4.

comment:67 by olle, 7 years ago

(In [4218]) Refs #911. MeLuDI updated in class/file MeludiListColumnsFactory.java in src/net/sf/basedb/meludi/extensions/ by adapting case name comment to project-specific settings.

comment:68 by olle, 7 years ago

(In [4219]) Refs #911. MeLuDI updated in classes/files CaseSummaryButtonFactory.java and CaseSummarySectionFactory.java in src/net/sf/basedb/meludi/extensions/ by adapting case name comments to project-specific settings.

comment:69 by olle, 7 years ago

(In [4220]) Refs #911. MeLuDI updated in java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/meludi/servlet/ by adapting case name comment to project-specific settings.

comment:70 by olle, 7 years ago

(In [4221]) Refs #911. MeLuDI updated in case summary to support project-specific number of digits in sample item name:

  1. Javascript file case_summary.js in resources/reports/ updated:
    a. New global variable sampleItemNumDigits added, with default value 5.
    b. Function caseInfoLoaded(response) updated to obtain number of digits for sample item name from JSON response for JSON key "sampleItemNumDigits" and set the new global variable sampleItemNumDigits to this value, after which the pop-up hint for the case name input field is updated to refer to the project-specific number of digits.
    c. Function caseSummary(event) updated to refer to the project-specific number of digits in notification shown for an empty case name input field.
  2. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCaseInfo" to return sample item number of digits for JSON key "sampleItemNumDigits" in JSON response.

comment:71 by olle, 7 years ago

(In [4223]) Refs #911. MeLuDI updated in patient data access object to restrict queries for existing patient items for a given personal number to only search for patient items in current project:

  1. Data access object class/file Patient.java in src/net/sf/basedb/meludi/dao/ updated:
    a. Public static method Patient findByPersonalNumber(DbControl dc, String pnr) updated in patient query to restrict the query to items in the current project by calling method void setIncludes(Meludi.INCLUDE_IN_CURRENT_PROJECT) for the query object.
    b. Public static method void ensureNotExistingPatient(DbControl dc, String pnr, String name) updated in patient query to restrict the query to items in the current project by calling method void setIncludes(Meludi.INCLUDE_IN_CURRENT_PROJECT) for the query object, instead of void include(Meludi.INCLUDE_IN_CURRENT_PROJECT).

comment:72 by olle, 7 years ago

(In [4224]) Refs #911. MeLuDI updated in case registration with and without patient information to support project-specific number of digits in sample and patient item names:

  1. Javascript file persinfo.js in resources/personal/ updated:
    a. New global variable sampleItemNumDigits added, with default value 5.
    b. Function caseInfoLoadedStep1(response) updated to obtain number of digits for sample item name from JSON response for JSON key "sampleItemNumDigits" and set the new global variable sampleItemNumDigits to this value, after which the next case name is created with the correct number of digits.
    c. Function caseNameOnChange() updated to call function Meludi.isValidCaseName2(caseName, itemNamePrefix, itemNumDigits) with project-specific value of sample item prefix and sample item number of digits to check if a case name is valid. If the case name is invalid, the displayed error message is updated to refer to the project-specific number of digits in the case name.
  2. Javascript file specimentube.js in resources/sampleproc/ updated:
    a. New global variable sampleItemNumDigits added, with default value 5.
    b. Function caseInfoLoadedStep1(response) updated to obtain number of digits for sample item name from JSON response for JSON key "sampleItemNumDigits" and set the new global variable sampleItemNumDigits to this value, after which the next case name is created with the correct number of digits. The help text for the case name input field is updated to refer to the project-specific number of digits in the case name.
    c. Function validateStep1(event) updated to call function Meludi.isValidCaseName2(caseName, itemNamePrefix, itemNumDigits) with project-specific value of sample item prefix and sample item number of digits to check if a case name is valid. If the case name is invalid, the displayed error message is updated to refer to the project-specific number of digits in the case name.
  3. Java data access object class/file Patient.java in src/net/sf/based/meludi/dao/ updated in public static method String generateNextName(DbControl dc, String prefix, Subtype subtype) to call public static method Integer Meludi.fetchPatientItemNumDigits(int activeProjectId) to obtain the number of digits in the patient item name, and use this value as last argument when calling method String MD5.leftPad(String arg0, char arg1, int arg2) with arguments Integer.toString(nextPatientNumber), '0', and patientItemNumDigits.

comment:73 by olle, 7 years ago

(In [4225]) Refs #911. MeLuDI updated to use project-specific number of digits in start list and start plate names:

  1. Java servlet class/file DnaServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for commands "GetNextAutoGeneratedPlateName" and "GetStartPlates" to call public static method Integer Meludi.fetchStartPlateItemNumDigits(int activeProjectId) to obtain the number of digits for start plate item names for active project and set the corresponding attribute in used BioplateType object to this value.
  2. Java servlet class/file ExtractionServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetNextStartPlateName" to call public static method Integer Meludi.fetchStartPlateItemNumDigits(int activeProjectId) to obtain the number of digits for start plate item names for active project and ensure that the next start plate name gets the correct number of digits.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetNextStartListName" to call public static method Integer Meludi.fetchStartListItemNumDigits(int activeProjectId) to obtain the number of digits for start list item names for active project and ensure that the next start list name gets the correct number of digits.

comment:74 by olle, 7 years ago

(In [4227]) Refs #911. MeLuDI updated with configuration values for number of digits in library preparation kit item names for each project.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag `<libprep-kit-item-num-digits>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method Integer fetchLibraryPreparationKitItemNumDigits(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values of number of digits for library preparation kit items for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects. If no configuration value is found, the number of digits for the original MeLuDI project is used (3).
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variables and corresponding public accessor methods for new configuration values for number of digits for library preparation kit items.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration values for number of digits for library preparation kit items for active project in returned JSONObject for JSON keys
    "libraryPreparationKitItemNumDigits".

comment:75 by olle, 7 years ago

(In [4228]) Refs #911. MeLuDI updated by renaming constant for default number of digits in library preparation kit item names for each project:

  1. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated by changing name of constant for default number of digits in library preparation kit item names from LIBPREP_ITEM_NUM_DIGITS_DEFAULT to the more proper LIBPREP_KIT_ITEM_NUM_DIGITS_DEFAULT.

comment:76 by olle, 7 years ago

(In [4230]) Refs #911. MeLuDI updated to support project-specific number of digits in library preparation kit item names:

  1. Javascript class/file add_new_libprep_kit.js in resources/libprep/ updated in function initializeStep1() when calling LibPrepServlet with command "GetNextAutoGeneratedKitName" to no longer add value for number of digits in kit item name, since the latter will now be taken from the configuration.
  2. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated by making static integer constants for default number of digits in different item names public, so they can be accessed by other classes.
  3. Java servlet class/file LibPrepServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetNextAutoGeneratedKitName" to call public static method Integer Meludi.fetchLibraryPreparationKitItemNumDigits(int activeProjectId) to obtain the number of digits for library preparation kit items. If the obtained value is not null, it is used to get the correct number of digits in the generated kit item name, otherwise the value in MeludiConfiguration.LIBPREP_KIT_ITEM_NUM_DIGITS_DEFAULT is used.

comment:77 by olle, 7 years ago

(In [4231]) Refs #911. MeLuDI updated by adding sites "Göteborg" and "Stockholm";

  1. JSP file persinfo.jsp in resources/personal/ updated by adding options for new sites in site menu. Site menu options are now placed in alphabetical order to make it simpler to find a desired item.
  2. JSP file specimentube.jsp in resources/sampleproc/ updated by adding options for new sites in site menu. Site menu options are now placed in alphabetical order to make it simpler to find a desired item.
  3. Java class/file Site.java in src/net/sf/based/meludi/ updated by adding entries for new sites "Göteborg and "Stockholm" (neither are members of "RCC syd").
  4. Java servlet class/file InstallServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for commands "Validate" and "Install" by including the new sites in value options for Annotationtype.SITE.

comment:78 by olle, 7 years ago

(In [4232]) Refs #911. Updates due to version number change to "1.5.0a3".

  1. Version number change to "1.5.0a3":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:79 by olle, 7 years ago

(In [4233]) Refs #911. Updates due to version number change to "1.5.0-dev".

  1. Version number change to "1.5.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:80 by olle, 7 years ago

(In [4235]) Refs #911. MeLuDI updated in support for project-specific number of digits in item names to use the number of digits used for the original MeLuDI project, if no project configuration could be found (previously null was returned, which caused problems):

  1. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated in public static methods
    a. Integer fetchSampleItemNumDigits(int activeProjectId)
    b. Integer fetchStorageBoxNumDigits(int activeProjectId)
    c. Integer fetchStartListItemNumDigits(int activeProjectId)
    d. Integer fetchStartPlateItemNumDigits(int activeProjectId)
    e. Integer fetchPatientItemNumDigits(int activeProjectId)
    f. Integer fetchLibraryPreparationKitItemNumDigits(int activeProjectId)
    to return the number of digits used for the original MeLuDI project, if no project configuration could be found.

comment:81 by olle, 7 years ago

(In [4241]) Refs #911. MeLuDI updated in case summary with a new project section, containing basic information on the active project. It initially contains two values, the name of the project, with a link to the BASE project item, and the project description:

  1. JSP file case_summary.jsp in resources/reports/ updated with new <div> tag block with class "info-section" and ID "project-info" before the case information section.
  2. Javascript file case_summary.js in resources/reports/ updated in function caseInfoLoaded(response) to obtain JSONObject with project information from response and JSON key "projInfo". If project information is supplied, the name is added with link to BASE project item in HTML element with ID "project.name", and the description in HTML element with ID "project.description", else a message is displayed. (Normally project information will be available.)
  3. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCaseInfo" to obtain information on the active project, and to return database ID, project name, and description in a JSONObject with JSON key "projInfo" in the JSON response.

comment:82 by olle, 7 years ago

(In [4244]) Refs #911. MeLuDI updated in sample preparation wizards to open file selection dialogs for data in tabular format with hint to show files with file extension ".csv" or ".tsv":

  1. JSP file extraction_preparation.jsp in /resources/´sampleproc/ updated in input field for opening a consumables lot number file to accept files with file extension ".csv" or ".tsv".
  2. JSP file extraction_registration.jsp in /resources/sampleproc/ updated in input field for opening a reagent lot number file to accept files with file extension ".csv" or ".tsv".

comment:83 by olle, 7 years ago

Functional specification update:

  • MeLuDI should be updated in registration of new cases with and without patient information to allow flexibility in for what specimens, that DNA/RNA items are extracted:
    a. Option 1: DNA/RNA extract items should be prepared for all specimen tubes and locations in storage boxes should be allocated for the extracts (option used for original MeLuDI project).
    b. Option 2: DNA/RNA extract items should be prepared just for the first specimen tube. The other specimen tubes are kept as reserves, from which DNA/RNA might be extracted, if there is some problem with the extracts from the first specimen.
    c. The case registration wizards should include a new check box "Extracts from first specimen only" for selecting between the two options.
    d. The "Lab tracking protocol for FFPE extraction" wizard should be updated in step 1 to only include specimens with extract items in the extract source item selection menu.
    e. Likewise, the counter for the above wizard, should be updated to only count specimens with extract items, when performing the extract source item count.
    f. It should be possible to configure a project-specific default value of the "Extracts from first specimen only" check box. If not configured, the default for the original MeLuDI project should be used (unchecked).
    g. The case registration section should be updated with a new wizard "Optional - Create extract items for extra specimen", that in step 1 should display a specimen selection menu including specimens without extracts, and step 2 where proposed storage positions are shown for DNA/RNA extracts for selected specimens. At registration, DNA/RNA extract items are created for the latter. If wizard "Lab tracking protocol for FFPE extraction" is opened, the specimens with newly-created extracts will now appear in the extract source item selection menu in step 1.

comment:84 by olle, 7 years ago

(In [4246]) Refs #911. MeLuDI updated in registration of new cases with and without patient information to allow flexibility in for what specimens, that DNA/RNA items are extracted:
a. Option 1: DNA/RNA extract items should be prepared for all specimen tubes and locations in storage boxes should be allocated for the extracts (option used for original MeLuDI project).
b. Option 2: DNA/RNA extract items should be prepared just for the first specimen tube. The other specimen tubes are kept as reserves, from which DNA/RNA might be extracted, if there is some problem with the extracts from the first specimen.
c. The case registration wizards include a new check box "Extracts from first specimen only" for selecting between the two options.
d. The "Lab tracking protocol for FFPE extraction" wizard updated in step 1 to only include specimens with extract items in the extract source item selection menu.
e. Likewise, the counter for the above wizard is updated to only count specimens with extract items, when performing the extract source item count.

  1. JSP file persinfo.jsp in resources/personal/ updated in case registration with new check box "Extracts from first specimen only" with ID "extractsFromFirstSpecimenOnlyCB".
  2. Javascript file persinfo.js in resources/personal/ updated in case registration:
    a. Function initializeStep4() updated to obtain value of new check box "Extracts from first specimen only", and only create extract items for first specimen, if it is checked, otherwise from all specimens. The check box value is sent as new attribute "extractsFromFirstSpecimenOnly", when calling SpecimenTubeServlet with command "FindStoragePositions".
    b. Function storagePositionsLoaded(response) updated to obtain value of new check box "Extracts from first specimen only", and only expect storage positions for created extract items.
    c. function submit() updated to include value of new check box "Extracts from first specimen only" in the JSONObject for the case sent to PersonalRegistrationServlet, and only include storage positions in the former for created extract items.
  3. JSP file specimentube.jsp in resources/sampleproc/ updated in case registration with new check box "Extracts from first specimen only" with ID "extractsFromFirstSpecimenOnlyCB".
  4. Javascript file specimentube.js in resources/sampleproc/ updated in case registration:
    a. Function initializeStep3() updated to obtain value of new check box "Extracts from first specimen only", and only create extract items for first specimen, if it is checked, otherwise from all specimens. The check box value is sent as new attribute "extractsFromFirstSpecimenOnly", when calling SpecimenTubeServlet with command "FindStoragePositions".
    b. Function storagePositionsLoaded(response) updated to obtain value of new check box "Extracts from first specimen only", and only expect storage positions for created extract items.
    c. function submit() updated to include value of new check box "Extracts from first specimen only" in the JSONObject for the case sent to PersonalRegistrationServlet, and only include storage positions in the former for created extract items.
  5. Java class/file CounterService.java in src/net/sf/basedb/meludi/counter/ updated in private method void countExtractSourceItems(DbControl dc, JSONObject json) to count the number of unprocessed specimens without extract, and use this to calculate the number of unprocessed extract source items.
  6. Java data access object class/file SpecimenTube.java in src/net/sf/basedb/meludi/dao/ updated:
    a. Public static method List<SpecimenTube> findUnProcessedTubes(DbControl dc) updated to only include specimen tubes with extract items by calling new public static method List<SpecimenTube> findUnProcessedTubes(DbControl dc, Boolean withExtracts) with value of argument withExtracts set to true.
    b. New public static method List<SpecimenTube> findUnProcessedTubes(DbControl dc, Boolean withExtracts) added. Value of argument withExtracts determines whether specimens with or without extracts will be included.
  7. Java servlet class/file ExtractionServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetUnprocessedSpecimens" to obtain value of Boolean parameter "withExtracts" from request, and use the value, when calling public static method SpecimenTube.findUnprocessedTubes(DbControl dc, Boolean withExtracts).
  8. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doPost(HttpServletRequest req, HttpServletResponse resp) for command "CreateCase" to obtain value of Boolean parameter "extractsFromFirstSpecimenOnly" from JSONObject from request, and only create extracts for the desired specimens.
  9. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "FindStoragePositions" to obtain value of Boolean parameter "extractsFromFirstSpecimenOnly" from request, and only create extracts for the desired specimens.
    b. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "CreateSpecimenTubes" to obtain value of Boolean parameter "extractsFromFirstSpecimenOnly" from JSONObject from request, and only create extracts for the desired specimens.
Last edited 7 years ago by olle (previous) (diff)

comment:85 by olle, 7 years ago

(In [4247]) Refs #911. MeLuDI updated in sample processing section by addition of new wizard "Optional - Create extract items for extra specimen" for creating extract items for stored specimen items, that lack the former. Storage locations will be allocated for the created extract items:

  1. JSP file index.jsp in resources/ updated in sample processing section by adding entry for new wizard "Optional - Create extract items for extra specimen" coupled to new JSP file specimen_new_extract_items.jsp in resources/sampleproc/.
  2. New JSP file specimen_new_extract_items.jsp in resources/sampleproc/ added. It defines two steps and is coupled to new javascript file specimen_new_extract_items.js in resources/sampleproc/.
  3. New javascript file specimen_new_extract_items.js in resources/sampleproc/ added. It calls ExtractionServlet with command "GetUnprocessedSpecimens" and value of attribute "withExtracts" set to false, after which the found specimens is presented in a selection menu in step 1. Proposed storage positions for DNA/RNA extracts for the selected specimens, obtained by calling SpecimenTubeServlet with command "FindStoragePositions", are presented in step 2, together with write-protected storage locations for the specimens themselves. Button "Register" is coupled to function submit(), that calls SpecimenTubeServlet in a POST request with new command "CreateExtractsForExtraSpecimens", submitting the selected specimens, extracts, and storage positions in a JSONObject.
  4. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doPost(HttpServletRequest req, HttpServletResponse resp) with new command "CreateExtractsForExtraSpecimens". It creates DNA/RNA extracts for specimens defined in a JSONObject in the request, and allocates storage locations for the extract items in specified places.

comment:86 by olle, 7 years ago

(In [4248]) Refs #911. MeLuDI updated in registration of new cases with and without patient information with project-specific configuration default value for flag indicating whether extract items should be created from first specimen only, or from all specimens.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <project> with new XML tag <extracts-from-first-specimen-only-default>.
  2. Javascript file persinfo.js in resources/personal/ updated in function onConfiguration(request) to obtain value for JSON key "extractsFromFirstSpecimenOnlyDefault", after which default option for check box "Extracts from first specimen only" is set to the corresponding value.
  3. Javascript file specimentube.js in resources/sampleproc/ updated in function onConfiguration(request) to obtain value for JSON key "extractsFromFirstSpecimenOnlyDefault", after which default option for check box "Extracts from first specimen only" is set to the corresponding value.
  4. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method Boolean fetchExtractsFromFirstSpecimenOnlyDefault(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  5. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new default value for flag indicating whether extract items should be created from first specimen only for each project from the meludi-config.xml configuration file, and store the value in new instance variable in ProjectConfig objects for the projects. If no configuration value is found, the choice for the original MeLuDI project is used (false).
  6. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variable and corresponding public accessor methods for new configuration default value for flag indicating whether extract items should be created from first specimen only.
  7. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration default value for flag indicating whether extract items should be created from first specimen only for active project in returned JSONObject for JSON key "extractsFromFirstSpecimenOnlyDefault".

comment:87 by olle, 7 years ago

(In [4249]) Refs #911. Refs #911. MeLuDI updated in DNA/RNA registration/quantification to support project configuration values for RNA and DNA elution volume (µl) default in the deparaffinization section:

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <project> with new XML tags <deparaffinization-rna-volume-microliters-default> and <deparaffinization-dna-volume-microliters-default>.
  2. Javascript file extraction_registration.js in resources/sampleproc/ updated:
    a. New global variables for RNA and DNA elution volumes are defined.
    b. Function initPage() updated at end by replacing call to ExtractionServlet with command "GetUnprocessedStartItemLists" with call to new function loadConfiguration().
    c. New function loadConfiguration() calls SessionServlet with command "GetConfiguration" and callback function onConfiguration(request).
    d. New function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and obtains values for JSON keys "deparaffinizationRnaVolumeMicroLitersDefault" and "deparaffinizationDnaVolumeMicroLitersDefault", after which the new global variables for RNA and DNA elution volumes are set to the corresponding values. At the end, the call to ExtractionServlet with command "GetUnprocessedStartItemLists", that was originally at the end of function initPage(), is made.
    e. Function initializeStep2() updated to set initial values for RNA and DNA elution volume input fields to the values of new global variables for the default volumes, instead of fixed values.
  3. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods Float fetchDeparaffinizationRnaVolumeMicroLitersDefault(int activeProjectId) and Float fetchDeparaffinizationDnaVolumeMicroLitersDefault(int activeProjectId). They call private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration values are returned.
  4. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new default values for RNA and DNA elution volumes (µl) for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects.
  5. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variables Float deparaffinizationRnaVolumeMicroLitersDefault and Float deparaffinizationDnaVolumeMicroLitersDefault with corresponding public accessor methods for new configuration default values for RNA and DNA elution volumes (µl), respectively.
  6. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration default values for RNA and DNA elution volumes (µl) for active project in returned JSONObject for JSON keys "deparaffinizationRnaVolumeMicroLitersDefault" and "deparaffinizationDnaVolumeMicroLitersDefault", respectively.

comment:88 by olle, 7 years ago

(In [4250]) Refs #911. Updates due to version number change to "1.5.0a4".

  1. Version number change to "1.5.0a4":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:89 by olle, 7 years ago

(In [4251]) Refs #911. Updates due to version number change to "1.5.0-dev".

  1. Version number change to "1.5.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:90 by olle, 7 years ago

(In [4252]) Refs #911. MeLuDI updated in label generation with new check box "Extracts from first specimen only" to select whether extract items should be created from first specimen only, or from all specimens:

  1. JSP file labelgeneration.jsp in resources/sampleproc/ updated with new check box "Extracts from first specimen only" with ID "extractsFromFirstSpecimenOnlyCB".
  2. Javascript file labelgeneration.js in resources/sampleproc/ updated:
    a. Function initPage() updated at end by replacing call to LabelGenerationServlet with command "GetLastLabelCase" with call to new function loadConfiguration().
    b. New function loadConfiguration() calls SessionServlet with command "GetConfiguration" and callback function onConfiguration(request).
    c. New function onConfiguration(request) obtains JSON configuration from JSON response for JSON key "configuration", and obtains value for JSON key "extractsFromFirstSpecimenOnlyDefault", after which default option for check box "Extracts from first specimen only" is set to the corresponding value. At the end, the call to LabelGenerationServlet with command "GetLastLabelCase", that was originally at the end of function initPage(), is made.
    d. Function doExport() updated to obtain value of new checkbox with ID "extractsFromFirstSpecimenOnlyCB" and send it as new parameter "extractsFromFirstSpecimenOnly" when calling LabelGenerationServlet with command "GetLabelFile"
  3. Java servlet class/file LabelGenerationServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetLabelFile" to obtain value of new parameter "extractsFromFirstSpecimenOnly" and only create DNA/RNA extract label names for desired specimens.

comment:91 by olle, 6 years ago

Resolution: fixed
Status: assignedclosed

Ticket closed as multiple project support to MeLuDI has been added, and no specific problems have been reported with alpha release 1.5.0a4.

comment:92 by olle, 6 years ago

(In [4690]) Refs #911. Updates due to version number change to "1.5.0".

  1. Version number changed to "1.5.0":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file samplereportgenerator.js in resources/reports/ updated.
    e. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:93 by olle, 19 months ago

Last edited 19 months ago by olle (previous) (diff)
Note: See TracTickets for help on using tickets.