Opened 6 years ago

Closed 22 months ago

#1029 closed task (fixed)

MeLuDI should be adapted to support the SCAN-B-rec project

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

Description (last modified by olle)

MeLuDI should be adapted to support the SCAN-B-rec project.

Initially the following should be added:

  • Basic configuration for the SCAN-B-rec project as a BASE project.
  • Support for referral form generation.

Support should also be added for projects NordicTrip and LUCAS, that both use referral form generation.

Change History (318)

comment:1 by olle, 6 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 6 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).
  • MeLuDI v.1.5.0 was introduced in Ticket #911 (MeLuDI should support multiple projects).

comment:3 by olle, 6 years ago

(In [4696]) Refs #1029. Updates due to version number change to "1.6.0-dev".

  1. Version number changed to "1.6.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.
Last edited 6 years ago by olle (previous) (diff)

comment:4 by olle, 6 years ago

Traceability note:

The support for referral form generation in MeLuDI will be based on that for Reggie:

  • Ticket #897 (Generate SCAN-B referral forms in Reggie)
  • Ticket #926 (SCAN-B referral form generation improvements in Reggie)

comment:5 by olle, 6 years ago

Design discussion:

(To be added later)

Version 0, edited 6 years ago by olle (next)

comment:6 by olle, 6 years ago

(In [4697]) Refs #1029. New Java package directory "pdf" added.

comment:7 by olle, 6 years ago

(In [4698]) Refs #1029. New directory META-INF/lib added.

comment:8 by olle, 6 years ago

(In [4706]) Refs #1029. First import of code for referral generation, taken from Reggie project, with minor modifications to allow it to be compiled in MeLuDI (full functionality requires more code changes):

  1. JSP file index.jsp in resources/ updated in section "Personal information wizards" with new sub-section "Referral forms" with entry "Generate referral forms". The entry for generating referral forms is linked to new JSP file generate-referral-forms.jsp in resources/personal/, and requires a PatientCurator role to be used.
  2. New JSP file generate-referral-forms.jsp in resources/personal/ added. It is linked to new javascript file generate-referral-forms.js in resources/personal/.
  3. New javascript file generate-referral-forms.js in resources/personal/ added.
    a. Function initPage() calls ScanBQuarterMonthReportServlet with command "GetSites" to obtain entries for the site menu, created by callback function sitesLoaded(response).
    b. Function initializeStep2(response) calls ReferralGeneratorServlet with command "GetReferralStartInfo" to obtain the SCAN-B ID for the first form set for the selected site. The default number of form sets in the batch to be created is chosen depending on the selected form set variant (50 for Kit 1, 25 for Kit 2).
    c. Clicking on button "Generate referral forms" activates function generateReferralForms(), that calls ReferralGeneratorServlet with command "GenerateReferralForms" and callback function initializeStep3(response).
    d. Function initializeStep3(response) activates buttons for downloading created form batch files and updating used SCAN-B ID list.
    e. Function downloadFormBatch(batchType) calls ReferralGeneratorServlet with command "DownloadFormBatchFile" to download the corresponding form batch file to the local system.
    f. Function updateUsedScanbIdList() calls ReferralGeneratorServlet with command "UpdateUsedScanbIdList" to updated the used SCAN-B ID list.
  4. New java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ added.
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) supports command "GetReferralStartInfo", that calls private method JSONObject fetchReferralstartInfo() to obtain a JSONObject to return with info on the start SCAN-B ID values for different sites.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) supports command "UpdateUsedScanbIdList", that retrieves the used start SCAN-B ID and the number of form sets generated, after which the used SCAN-B ID list file is updated for the current site with the value returned by private method String nextScanbId(String scanbId, Integer incr).
    c. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) supports command "GenerateReferralForms", that calls a number of private convenience methods to create the desired referral form batch PDF files, with support from utility class PdfUtil.
    d. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) supports command "DownloadFormBatchFile", which retrieves a path to the desired form batch PDF file by calling private method String fetchReferralFormBatchFilePath(int batchType), after which it sends the file contents to an output stream, for download by the user.
    e. Private method String fetchReferralStartInfoFilePath() returns a path to the referral start info file.
    f. Private method JSONObject fetchReferralstartInfo() returns a JSONObject with info on the start SCAN-B ID values for different sites.
    g. Private method String fetchReferralFormBatchFilePath(int batchType) returns a path to the desired form batch PDF file.
    h. Private method tring fetchReferralFormBatchFileName(int batchType, String startScanbId, String endScanbId) returns name to be used for the referral form batch file.
    i. Private method String fetchReferralFormTemplateFilePath(String formTemplateName) returns path to be used for referral form template file.
    j. Private method String fetchReferralFormTemplateFilename(String formTemplateName) returns name of referral form template file, obtained from MeLuDI configuration file.
    k. Private method String fetchReferralFormTemplateFileDirPath() returns directory path for referral form template files, obtained from MeLuDI configuration file.
    l. Private method String nextScanbId(String scanbId, Integer incr) returns the next SCAN-B ID for a site (same prefix) after a desired incrementation. Any optional suffix is retained.
    m. Private method PdfUtil createPatientInfoForm(PdfUtil pdfUtil, String scanbId) creates PDF contents for a patient info form.
    n. Private method PdfUtil createConsentReportForm(PdfUtil pdfUtil, String scanbId) creates PDF contents for a consent report form.
    o. Private method PdfUtil createClinChemForm(PdfUtil pdfUtil, String scanbId, String pdfTemplatePath) creates PDF contents for a clinical chemistry form using the desired template (standard or biopsy).
    p. Private method PdfUtil createClinPathologyForm(PdfUtil pdfUtil, String scanbId, String pdfTemplatePath) creates PDF contents for a clinical pathology form using the desired template (standard or biopsy).
    q. Private method byte[] createBarcode(String barcodeText, String barcodeType, Integer dpi, Boolean humanReadable, String textPlacement, String fontName, Integer fontSize) returns a byte array of a barcode image corresponding to desired contents. Java library Barcode4J is used to generate the barcode.
    r. Private static method Configuration buildBarcodeCfg(String type, Boolean humanReadable, String textPlacement, String fontName, Integer fontSize) configures the Barcode4J barcode generator.
  5. XML configuration file servlets.xml in META-INF updated by adding new java servlet class ReferralGeneratorServlet to the servlet list.
  6. New utility library PdfUtil.java in src/net/sf/basedb/meludi/pdf/ added.
  7. New data access object ClientApp.java in src/net/sf/basedb/meludi/dao/ added.
  8. New iText library itextpdf-5.5.3.jar with license file itext-license.txt in meludi/META-INF/lib/ added.
  9. Outermost Ant build file build.xml in / updated by adding file set META-INF/lib to class path for compiling.
  10. Properties file build.properties in / updated by adding dependency on JAR files in base/www/WEB-INF/lib/.
  11. Java classpath file .classpath in / updated by adding META-INF/lib/itextpdf-5.5.3.jar.
  12. Meludi.java in src/net/sf/basedb/meludi/ updated:
    a. New private static method String fetchProjectName(int activeProjectId) added.
    b. New public static method String fetchReferralFormTemplatesDir(int activeProjectId) added.
    c. New public static method String fetchReferralFormTemplatesOldDir(int activeProjectId) added.
    d. New public static method String fetchSecondaryAnalysisDir(int activeProjectId) added.

comment:9 by olle, 6 years ago

(In [4714]) Refs #1029. MANIFEST.MF file in META-INF/ updated with new line defining class path lib/itextpdf-5.5.3.jar.

comment:10 by olle, 6 years ago

(In [4715]) Refs #1029. New directory fonts/ added to META-INF/ with OpenSans fonts.

comment:11 by olle, 6 years ago

Design update:

MeLuDI should be updated with new configuration flag uses-site-prefix, indicating if the project uses some of the first digits in the serial number of the case/sample name to indicate what hospital site, the case/sample belongs to.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <uses-site-prefix>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method Boolean fetchUsesSitePrefix(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 value "uses-site-prefix" 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 variable and corresponding public accessor methods for new configuration value.
  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 value for flag indicating use of site prefix for active project in returned JSONObject for JSON key "usesSitePrefix".

comment:12 by olle, 6 years ago

(In [4716]) Refs #1029. MeLuDI updated with new configuration flag uses-site-prefix, indicating if the project uses some of the first digits in the serial number of the case/sample name to indicate what hospital site, the case/sample belongs to.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <uses-site-prefix>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method Boolean fetchUsesSitePrefix(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 value "uses-site-prefix" 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 variable and corresponding public accessor methods for new configuration value.
  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 value for flag indicating use of site prefix for active project in returned JSONObject for JSON key "usesSitePrefix".

comment:13 by olle, 6 years ago

Discussion regarding site prefix:

  • Currently the only MeLuDI project using a site prefix is the SCAN-B-rec project. Although the aim is to make the corresponding functionality general enough for other projects to use it, initially the design will be based on the requirements of the SCAN-B-rec project.
  • The SCAN-B-rec project will use the first two digits in the serial number of the case/sample name to indicate the hospital site.
  • Use of the first two digits in the serial number of the case/sample name as site prefix is the same convention as use for the site prefix in the SCAN-B project (although in the latter project, there are restrictions on what samples are connected to a case). A desire has been expressed to use the same site prefixes in SCAN-B-rec, as for SCAN-B, for sites used in both projects (no risk of confusion regarding the project owner for a specific sample exists, since the SCAN-B-rec project will use project prefix "REC" for case/sample numbers). Sites currently only used in the SCAN-B project will be added to MeLuDI.
  • Site prefixes for hospital sites currently unique to MeLuDI, but not used in the SCAN-B project, will be assigned a preliminary site prefix in MeLuDI, to be fixed before the start of the SCAN-B-rec project.

Design discussion.

  • For a project using site prefix, the current MeLuDI sample registration feature of showing the next available case name in the input field for the latter, needs to be removed, since the site is unknown, and will affect the number part of the case name.
  • For a project using site prefix, the site menu in MeLuDI sample registration should have the site corresponding to the site index in the case name as default, and the site menu should be disabled. This way a case and sample will be connected to the proper site, using the traditional MeLuDI site definition.
Last edited 6 years ago by olle (previous) (diff)

comment:14 by olle, 6 years ago

Design update:

  • MeLuDI should be updated with new configuration flag site-prefix-hash-list. If the project uses site prefixes, the new variable should contain a comma-separated list, where each odd entry is a site prefix, and the following entry is the corresponding site key. It is expected that both site prefixes and keys are unique, i.e. a site cannot be represented by more than one site prefix.
  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <site-prefix-hash-list>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    1. New public static method String fetchSitePrefixHashList(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
    2. New public static method HashMap<String,String> fetchSitePrefixSiteKeyHashMap(int activeProjectId). It returns a site prefix/site key hash map for the desired project.
    3. New public static method HashMap<String,String> HashMap<String,String> fetchSiteKeySitePrefixHashMap(int activeProjectId). It returns a site key/site prefix hash map for the desired project.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration value "site-prefix-hash-list" 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 variable and corresponding public accessor methods for new configuration value.
  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 value for site prefix/site key hash list for active project in returned JSONObject for JSON key "sitePrefixHashList".
Last edited 6 years ago by olle (previous) (diff)

comment:15 by olle, 6 years ago

(In [4722]) Refs #1029. MeLuDI updated with new configuration flag site-prefix-hash-list. If the project uses site prefixes, the new variable should contain a comma-separated list, where each odd entry is a site prefix, and the following entry is the corresponding site key. It is expected that both site prefixes and keys are unique, i.e. a site cannot be represented by more than one site prefix.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <site-prefix-hash-list>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    1. New public static method String fetchSitePrefixHashList(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
    2. New public static method HashMap<String,String> fetchSitePrefixSiteKeyHashMap(int activeProjectId). It returns a site prefix/site key hash map for the desired project.
    3. New public static method HashMap<String,String> HashMap<String,String> fetchSiteKeySitePrefixHashMap(int activeProjectId). It returns a site key/site prefix hash map for the desired project.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration value "site-prefix-hash-list" 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 variable and corresponding public accessor methods for new configuration value.
  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 value for site prefix/site key hash list for active project in returned JSONObject for JSON key "sitePrefixHashList".

comment:16 by olle, 6 years ago

Design update:

  • MeLuDI should be updated in case/sample registration wizards for projects using site prefix:
    i. The case ID input field should be empty (for other projects the next available case ID is set as default value).
    ii. The site menu should have the site corresponding to the site prefix in the case ID as default value, and the menu should be disabled. If a case ID with an unknown site prefix has been entered, the site menu should have "unknown" as default value.
  1. Javascript file persinfo.js in resources/personal/ updated:
    a. Function onConfiguration(request) updated to set value of variable usesSitePrefix from loaded configuration.
    b. Function caseInfoLoadedStep1(response) updated to not enter a default value in case ID input field, if value of variable usesSitePrefix is true.
    c. Function onCaseInfoLoaded(response) updated for case info having a not-null value for variable siteDefault to set the default for the site menu to the value in question, and to disable the site menu.
  2. Javascript file specimentube.js in resources/sampleproc/ updated:
    a. Function onConfiguration(request) updated to set value of variable usesSitePrefix from loaded configuration.
    b. Function caseInfoLoadedStep1(response) updated to not enter a default value in case ID input field, if value of variable usesSitePrefix is true.
    c. Function caseInfoLoaded(response) updated for case info having a not-null value for variable siteDefault to set the default for the site menu to the value in question, and to disable the site menu.
  3. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to check for an unknown case if the site should be found from site prefix, in which case the site key is returned for JSON key "siteDefault".
  4. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to check for an unknown case if the site should be found from site prefix, in which case the site key is returned for JSON key "siteDefault".
Last edited 6 years ago by olle (previous) (diff)

comment:17 by olle, 6 years ago

(In [4723]) Refs #1029. MeLuDI updated in case/sample registration wizards for projects using site prefix:
i. The case ID input field should be empty (for other projects the next available case ID is set as default value).
ii. The site menu should have the site corresponding to the site prefix in the case ID as default value, and the menu should be disabled. If a case ID with an unknown site prefix has been entered, the site menu should have "unknown" as default value.

  1. Javascript file persinfo.js in resources/personal/ updated:
    a. Function onConfiguration(request) updated to set value of variable usesSitePrefix from loaded configuration.
    b. Function caseInfoLoadedStep1(response) updated to not enter a default value in case ID input field, if value of variable usesSitePrefix is true.
    c. Function onCaseInfoLoaded(response) updated for case info having a not-null value for variable siteDefault to set the default for the site menu to the value in question, and to disable the site menu.
  2. Javascript file specimentube.js in resources/sampleproc/ updated:
    a. Function onConfiguration(request) updated to set value of variable usesSitePrefix from loaded configuration.
    b. Function caseInfoLoadedStep1(response) updated to not enter a default value in case ID input field, if value of variable usesSitePrefix is true.
    c. Function caseInfoLoaded(response) updated for case info having a not-null value for variable siteDefault to set the default for the site menu to the value in question, and to disable the site menu.
  3. Java servlet class/file PersonalRegistrationServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to check for an unknown case if the site should be found from site prefix, in which case the site key is returned for JSON key "siteDefault".
  4. Java servlet class/file SpecimenTubeServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to check for an unknown case if the site should be found from site prefix, in which case the site key is returned for JSON key "siteDefault".

comment:18 by olle, 6 years ago

Design update:

  • Referral generation should be updated:
    i. The MeLuDI main page should be updated in personal information section by only adding entry for sub-section "Referral forms" with wizard "Generate referral forms" for projects using the feature.
    ii. Referral form generation should be updated in text and variable names not to refer to the SCAN-B project.
    iii. Referral form generation should be updated to be compatible with the MeLuDI item name standard of project-specific prefix plus number.
    iv. Referral form generation should be updated to use site prefixes from the configuration file.
  1. JSP file index.jsp in resources/ updated in personal information section by only adding entry for sub-section Referral forms with wizard "Generate referral forms" if the project uses the feature. Currently variable boolean isUsingReferralGeneration is set to true based on the name of the active project, but this should preferably be exchanged for use of configuration values for the project.
  2. JSP file generate-referral-forms.jsp in resources/personal/ updated in text and variable names not to refer to the SCAN-B project.
  3. Javascript file generate-referral-forms.js in resources/personal/ updated:BR}a. Code updated in text and variable names not to refer to the SCAN-B project.
    b. Function initPage() updated to call servlet ReferralGeneratorServlet with command "GetSites" to obtain a JSON object with options for the referral generation "Site" menu.
    c. New functions loadConfiguration() and onConfiguration(request) load MeLuDI configuration data for the project and set values for variables usesSitePrefix, sampleItemPrefix, and sampleItemNumDigits.
  4. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Code updated in text and variable names not to refer to the SCAN-B project.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with new command "GetSites", that calls new method fetchJSONSites(...) to obtains a JSON object returned with JSON key "sites".
    c. New public static method JSONArray fetchJSONSites(Comparator<Site> comparator, int activeProjectId) added. It calls class Site to obtain an alphabetic list of all sites, and then uses the project configuration site key/site prefix hash map to return a JSON object with the site prefix as JSON key.
    d. A number of private methods for generating PDF referral files updated to fit requirements for the referral templates in the SCAN-B-rec project.
Last edited 6 years ago by olle (previous) (diff)

comment:19 by olle, 6 years ago

(In [4724]) Refs #1029. Referral generation updated:
i. The MeLuDI main page updated in personal information section by only adding entry for sub-section "Referral forms" with wizard "Generate referral forms" for projects using the feature.
ii. Referral form generation updated in text and variable names not to refer to the SCAN-B project.
iii. Referral form generation updated to be compatible with the MeLuDI item name standard of project-specific prefix plus number.
iv. Referral form generation updated to use site prefixes from the configuration file.

  1. JSP file index.jsp in resources/ updated in personal information section by only adding entry for sub-section Referral forms with wizard "Generate referral forms" if the project uses the feature. Currently variable boolean isUsingReferralGeneration is set to true based on the name of the active project, but this should preferably be exchanged for use of configuration values for the project.
  2. JSP file generate-referral-forms.jsp in resources/personal/ updated in text and variable names not to refer to the SCAN-B project.
  3. Javascript file generate-referral-forms.js in resources/personal/ updated:BR}a. Code updated in text and variable names not to refer to the SCAN-B project.
    b. Function initPage() updated to call servlet ReferralGeneratorServlet with command "GetSites" to obtain a JSON object with options for the referral generation "Site" menu.
    c. New functions loadConfiguration() and onConfiguration(request) load MeLuDI configuration data for the project and set values for variables usesSitePrefix, sampleItemPrefix, and sampleItemNumDigits.
  4. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Code updated in text and variable names not to refer to the SCAN-B project.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with new command "GetSites", that calls new method fetchJSONSites(...) to obtains a JSON object returned with JSON key "sites".
    c. New public static method JSONArray fetchJSONSites(Comparator<Site> comparator, int activeProjectId) added. It calls class Site to obtain an alphabetic list of all sites, and then uses the project configuration site key/site prefix hash map to return a JSON object with the site prefix as JSON key.
    d. A number of private methods for generating PDF referral files updated to fit requirements for the referral templates in the SCAN-B-rec project.

comment:20 by olle, 6 years ago

(In [4725]) Refs #1029. MeLuDI updated by adding sites "Halmstad" and "Jönköping":

  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 "Halmstad (member of "RCC syd") and "Jönköping" (not member 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:21 by olle, 6 years ago

(In [4726]) Refs #1029. Referral generation updated in servlet by exchanging hard-coded site prefix length 2 for new private static variable int sitePrefixLength with default value set to 2. The change is a preparation for obtaining the site prefix length from the project configuration in the future.

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated by exchanging hard-coded site prefix length 2 for new static variable sitePrefixLength with default value set to 2.

comment:22 by olle, 6 years ago

(In [4727]) Refs #1029. MeLuDI updated in most wizards by specifying that a current "site" represents a hospital site, in order to simplify adding data for internal sites like metastasis sites in the future:

  1. JSP file persinfo.jsp in resources/personal/ updated by referring to currents sites as hospital sites.
  2. JSP file specimentube.jsp in resources/sampleproc/ updated by referring to currents sites as hospital sites.
  3. JSP file case_summary.jsp in resources/reports/ updated by referring to currents sites as hospital sites.
  4. JSP file meludi_quarter_month_report_generator.jsp in resources/reports/ updated by referring to currents sites as hospital sites.
  5. Javascript file samplereportgenerator.js in resources/reports/ updated by referring to currents sites as hospital sites.

comment:23 by olle, 6 years ago

(In [4729]) Refs #1029. MeLuDI updated by extending list of menu options for "Specimen input type" with "RNAlater" and "FFPE block". Also, description of previous FFPE options updated by adding Swedish notation in parenthesis:

  1. JSP file persinfo.jsp in resources/personal/ updated by adding options "RNAlater" and "FFPE block" to input menu for specimen input type. Also, description of previous FFPE options updated by adding Swedish notation in parenthesis.
  2. JSP file specimentube.jsp in resources/sampleproc/ updated by adding options "RNAlater" and "FFPE block" to input menu for specimen input type. Also, description of previous FFPE options updated by adding Swedish notation in parenthesis.
  3. 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 include "rna_later" and "ffpe_block" in value options for annotation type SPECIMEN_INPUT_TYPE.
  4. Java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/meludi/servlet/ updated in private method fetchSpecimenInputType(String rawSpecimenInputType) by including support for options "RNAlater" and "FFPE block".

comment:24 by olle, 6 years ago

(In [4730]) Refs #1029. Specimen tube registration updated in the set of mutation analysis options by adding new option "TST170" (TruSight Tumor 170, a sequencing assay covering 170 genes). The new option should not be included in the set of options affected by the "Select all" button.

  1. JSP file specimentube.jsp in resources/sampleproc/ updated in check box options for mutation analysis to display the new option.
  2. Javascript file specimentube.js in resources/sampleproc/ updated in function streg.submit() to obtain the mutation analysis selection for the new option from the form in JSP file specimentube.jsp and transfer it to servlet SpecimenTubeServlet.
  3. JSP file persinfo.jsp in resources/personal/ updated in check box options for mutation analysis to display the new option.
  4. Javascript file persinfo.js in resources/personal/ updated in function persinfo.submit() to obtain the mutation analysis selection for the new option from the form in JSP file persinfo.jsp and transfer it to servlet PersonalRegistrationServlet.
  5. Java class/file InstallServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) with new value option for Annotationtype.MUTATION_ANALYSIS.
  6. Java 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 obtain a list of selected mutation analysis values, that includes the new value option.
  7. Java 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 a list of selected mutation analysis values, that includes the new value option.

comment:25 by olle, 6 years ago

(In [4731]) Refs #1029. MeLuDI updated in sample report servlet code with debug output intended to help fix bug that causes sample report generation to crash, when obtaining site data. However, the bug that should be investigated, disappeared after the update!

  1. Java servlet class/file SampleReportServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "overviewreport" by adding debug output containing the sites obtained from call of Site.getAllReportSites().
Last edited 6 years ago by olle (previous) (diff)

comment:26 by olle, 6 years ago

(In [4732]) Refs #1029. Specimen tube registration updated in the case section with new menu "Metastasis site". The new menu is placed below the "Project focus" menu.

  1. JSP file specimentube.jsp in resources/sampleproc/ updated in case section with new menu "Metastasis site".
  2. Javascript file specimentube.js in resources/sampleproc/ updated in function streg.submit() to obtain the metastasis site selection from the form in JSP file specimentube.jsp and transfer it to servlet SpecimenTubeServlet.
  3. JSP file persinfo.jsp in resources/personal/ updated in case section with new menu "Metastasis site".
  4. Javascript file persinfo.js in resources/personal/ updated in function persinfo.submit() to obtain the metastasis site selection from the form in JSP file specimentube.jsp and transfer it to servlet PersonalRegistrationServlet. Also, for an already registered case, the new menu will be disabled.
  5. JSP file case_summary.jsp in resources/reports/ updated in case section with new data row for value of metastasis site.
  6. Javascript file case_summary.js in resources/reports/ updated in function cs.caseInfoLoaded(response) to enter the value for metastasis site obtained for the case from servlet CaseSummaryServlet and make it available for display in the case summary JSP page.
  7. Java class/file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated with new public static final Annotationtype METASTASIS_SITE.
  8. Java class/file InstallServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method