Opened 5 months ago

Last modified 5 weeks ago

#1029 assigned task

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

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.

Change History (118)

comment:1 Changed 5 months ago by olle

  • Status changed from new to assigned

Ticket accepted.

comment:2 Changed 5 months ago by olle

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 Changed 5 months ago by olle

(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 4 months ago by olle (previous) (diff)

comment:4 Changed 5 months ago by olle

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 Changed 5 months ago by olle

Design discussion:

  • First version of SCAN-B-rec referral form generation will be based on the corresponding functionality for Reggie and the SCAN-B project. Some functionality may have to be adapted for the former project, but changes will be easier to describe in comparison with corresponding functionality for the SCAN-B project. Therefore the initial revision will be closely similar to the code base for the latter:
    a. A new sub-section "Referral forms" with entry "Generate referral forms" will be added to section "Personal information wizards", and will require a PatientCurator role to be used.
    b. Step 1 of the SCAN-B referral form generation wizard will have two menus, one for the SCAN-B site, and one for selecting the form variant to generate forms for (initially two choices, "Kit 1 - Standard" and "Kit 2 - Neoadjuvant therapy").
    c. Step 2 should contain two input fields, one for the first SCAN-B ID for the form set batch to be created, and the number of form sets in the batch. One button should be shown, "Generate referral forms".
    d. Step 3 should present three buttons, "Download form batch file 1", "Download form batch file 2", and "Update used SCAN-B ID list". As expected, clicking the first or second button should allow the corresponding form batch PDF file to be downloaded to the local system, while clicking on the third button will update the stored list of used SCAN-B ID to prevent the same set of referral form sets to be created again for the same site, provided that the default start SCAN-B ID has not been modified by the user and that the list has been updated after each created form set batch.

Design update:

  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.
Last edited 5 months ago by olle (previous) (diff)

comment:6 Changed 5 months ago by olle

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

comment:7 Changed 5 months ago by olle

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

comment:8 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

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

comment:11 Changed 5 months ago by olle

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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

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 5 months ago by olle (previous) (diff)

comment:14 Changed 5 months ago by olle

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 5 months ago by olle (previous) (diff)

comment:15 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

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 5 months ago by olle (previous) (diff)

comment:17 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

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 5 months ago by olle (previous) (diff)

comment:19 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 Changed 5 months ago by olle

(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 5 months ago by olle (previous) (diff)

comment:26 Changed 5 months ago by olle

(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 void doGet(HttpServletRequest req, HttpServletResponse resp) for commands "Validate" and "Install" to add chack for new annotation type Annotationtype.METASTASIS_SITE.
  9. 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 metastasis value from form, and set annotation type Annotationtype.METASTASIS_SITE to that value.
  10. 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 metastasis value from form, and set annotation type Annotationtype.METASTASIS_SITE to that value.
  11. Java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to obtain report value of metastasis site from sample by calling new private method String fetchMetastasisSite(DbControl dc, SnapshotManager manager, Sample s), and then set annotation type Annotationtype.METASTASIS_SITE to that value.
    b. New private method String fetchMetastasisSite(DbControl dc, SnapshotManager manager, Sample s) added. It returns a report string to use for a metastasis site value.

comment:27 Changed 5 months ago by olle

Summary of changes to MeLuDI so far:

(To be added later)

comment:28 Changed 5 months ago by olle

(In [4733]) Refs #1029. Code fork introduced for case/sample registration in SCAN-B-rec project:

  1. JSP file index.jsp in resources/ updated to add links to alternative JSP files specimentube_alt_rec.jsp and persinfo_alt_rec.jsp when active project is SCAN-B-rec.
  2. New JSP file specimentube_alt_rec.jsp in resources/sampleproc/ added. It is based on specimentube.jsp, but refers to new Javascript file specimentube_alt_rec.js.
  3. New Javascript file specimentube_alt_rec.js in resources/sampleproc/ added. It is based on `
  4. New JSP file persinfo_alt_rec.jsp in resources/personal/ added. It is based on persinfo.jsp, but refers to new Javascript file persinfo_alt_rec.js.
  5. New Javascript file persinfo_alt_rec.js in resources/personal/ added. It is based on persinfo.js.

comment:29 Changed 5 months ago by olle

(In [4734]) Refs #1029. Case/sample registration in SCAN-B-rec project updated for mutation analysis to only show option "TST170" and "Other", where "TST170" should be selected by default:

  1. JSP file specimentube_alt_rec.jsp in resources/sampleproc/ updated for mutation analysis to only show option "TST170" and "Other".
  2. Javascript file specimentube_alt_rec.js in resources/sampleproc/ updated for mutation analysis to have "TST170" selected by default. Function projectFocusOnChange() update to not set default values for other mutation analysis options.
  3. JSP file persinfo_alt_rec.jsp in resources/personal/ updated for mutation analysis to only show option "TST170" and "Other".
  4. Javascript file persinfo_alt_rec.js in resources/personal/ updated for mutation analysis to have "TST170" selected by default. Function projectFocusOnChange() update to not set default values for other mutation analysis options.

comment:30 Changed 4 months ago by olle

(In [4736]) Refs #1029. Updates due to version number change to "1.6.0a1".

  1. Version number changed to "1.6.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 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:31 Changed 4 months ago by olle

(In [4756]) 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.

comment:32 Changed 4 months ago by olle

(In [4757]) Refs #1029. MeLuDI updated in error message to refer to the correct file, when the configuration file isn't found:

  1. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to refer to file meludi-config.xml instead of labenv-config.xml, when the configuration file isn't found.

comment:33 Changed 4 months ago by olle

Design update of referral form generation:

  • Referral form generation should be updated to suit new referral form template files.
  • Now all referral template forms belong to one of two main types, where all templates of the same type have barcodes at the same position:
    a. Barcode non-sticker forms. Barcodes at top right and left (at slightly different height).
    b. Barcode sticker forms. Barcodes at top right and left (at slightly different height), plus barcodes on nine sticker labels at bottom of form, intended to be placed on sample tubes. The stickers will also have the case ID printed on the top and bottom of the short side of the label.
  • The barcode non-sticker forms will no longer be created with an extra blank page after each form in the PDF file, since all forms are on a single page.
  • Some of the referral forms for which templates exist, should not be included in the forms sets created as a batch job.
  • In the current version, the referral form sets will contain the following forms:
    Form set 1 (with label stickers): Biopsy form, Whole blood form, Follow up form.
    Form set 2: Consent report form.
Last edited 4 months ago by olle (previous) (diff)

comment:34 Changed 4 months ago by olle

(In [4767]) Refs #1029. Referral form generator update:

Design update of referral form generation:

  • Referral form generation updated to suit new referral form template files.
  • Now all referral template forms belong to one of two main types, where all templates of the same type have barcodes at the same position:
    a. Barcode non-sticker forms. Barcodes at top right and left (at slightly different height).
    b. Barcode sticker forms. Barcodes at top right and left (at slightly different height), plus barcodes on nine sticker labels at bottom of form, intended to be placed on sample tubes. The stickers will also have the case ID printed on the top and bottom of the short side of the label.
  • The barcode non-sticker forms will no longer be created with an extra blank page after each form in the PDF file, since all forms are on a single page.
  • Some of the referral forms for which templates exist, should not be included in the forms sets created as a batch job.
  • In the current version, the referral form sets will contain the following forms:
    Form set 1 (with label stickers): Biopsy form, Whole blood form, Follow up form.
    Form set 2: Consent report form.
  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. New private static final Strings REF_FORM_TEMPLATE_WHOLE_BLOOD, REF_FORM_TEMPLATE_FOLLOW_UP, TEMPLATE_FILENAME_START_WHOLE_BLOOD, and TEMPLATE_FILENAME_START_FOLLOW_UP defined.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetReferralTemplateInfo" to call method fetchMultipleTemplateFiles(...) for REF_FORM_TEMPLATE_CLIN_CHEM_BIOPSY, REF_FORM_TEMPLATE_WHOLE_BLOOD, and REF_FORM_TEMPLATE_FOLLOW_UP.
    c. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GenerateReferralForms" to call methods createBiopsyClinChemForm(...), createWholeBloodForm(...), and createFollowUpForm(...).
    d. Private method void initializeRefFormTemplNameStartHashMap() updated by adding key/values pairs REF_FORM_TEMPLATE_WHOLE_BLOOD/TEMPLATE_FILENAME_START_WHOLE_BLOOD and REF_FORM_TEMPLATE_FOLLOW_UP/TEMPLATE_FILENAME_START_FOLLOW_UP.
    e. Private method PdfUtil createConsentReportForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) updated to call new method createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList).
    f. Private method PdfUtil createPadReferralForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) updated to call new method createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList).
    g. Private method PdfUtil createBiopsyClinChemForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) updated to call new method createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, String formTemplateName, List<String> formTemplateFileList).
    h. New private method PdfUtil createWholeBloodForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) calls new method createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, String formTemplateName, List<String> formTemplateFileList).
    i. New private method PdfUtil createFollowUpForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) calls new method createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, String formTemplateName, List<String> formTemplateFileList).
    j. New private method PdfUtil createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) added. It calls new private method PdfUtil createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, List<String> formTemplateFileList).
    k. New private method PdfUtil createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, List<String> formTemplateFileList) added. It creates a referral form without label sticker barcodes.
    l. New private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, String caseId, List<String> formTemplateFileList) added. It calls new private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, List<String> formTemplateFileList).
    m. New private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, List<String> formTemplateFileList) added. It creates a referral form with label sticker barcodes.

comment:35 Changed 4 months ago by olle

(In [4768]) Refs #1029. Referral form generation updated by removing menu for selecting referral variant, since the default "Kit 1 - Standard" will always be used. Also, instruction text for printing updated to recommend one-page printing for both batch 1 & 2 PDF files:

  1. JSP file generate-referral-forms.jsp in resources/personal/ updated:
    a. Instruction text updated to recommend one-page printing for both batch 1 & 2 PDF files.
    b. Step 1 form updated by removing menu for selecting referral variant, since the default "Kit 1 - Standard" will always be used.
  2. Javascript file generate-referral-forms.js in resources/personal/ updated:
    a. New constant refVariantDefault defined, set to value "kit1_standard".
    b. Functions initPage(), siteAndVariantOnChange(), initializeStep2(response), initializeStep2a(response), and generateReferralForms() updated not to refer to menu for selecting referral variant, and to set the value to that of new constant refVariantDefault.

comment:36 Changed 4 months ago by olle

(In [4773]) Refs #1029. Support for consent coupled to case item added, based on that used in Reggie. Code compiles, but might need to be updated, before it can be considered OK:

  1. Data access object file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated:
    a. New annotation type CONSENT added. It is of type String and is a Sample annotation.
    b. New annotation type CONSENT_DATE added. It is of type Date and is a Sample annotation.
  2. Data access object file Case.java in src/net/sf/basedb/meludi/dao/ updated by adding new public method void verifyConsent(DbControl dc, Annotationtype consentType).
  3. New data access object file Consent.java in src/net/sf/basedb/meludi/dao/ added.
  4. 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 checks for new annotation types Annotationtype.CONSENT and Annotationtype.CONSENT_DATE, as well as adding these in check for annotation type category for Subtype.CASE.

comment:37 Changed 4 months ago by olle

(In [4774]) Refs #1029. Referral form generator updated to create a fixed number of follow-up forms for each case ID. The default number of forms to create is 8.

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. New private static final constant int NUM_FOLLOW_UP_FORMS_DEFAULT defined, and set equal to 8.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GenerateReferralForms" to create a fixed number of follow-up forms for each case ID. The default number of forms to create is initially equal to value of constant NUM_FOLLOW_UP_FORMS_DEFAULT.

comment:38 Changed 4 months ago by olle

(In [4775]) Refs #1029. Referral form generator updated for forms with sticker labels to use smaller font size for bold text under barcode at upper right, and to place the text closer to the barcode (same size and distance as for the barcode and text to the upper left, except that the text at upper right is bold):

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated in private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String formTemplateName, List<String> formTemplateFileList) to use smaller font size for bold text under barcode at upper right, and to place the text closer to the barcode (same size and distance as for the barcode and text to the upper left, except that the text at upper right is bold).

comment:39 Changed 4 months ago by olle

(In [4779]) Refs #1029. Bugs fixed in Javascript for sample registration for SCAN-B-rec project (references to removed mutation analysis options are now commented out):

  1. Javascript file specimentube_alt_rec.js in resources/sampleproc/ updated by commenting out references to removed mutation analysis options.
  2. Javascript file persinfo_alt_rec.js in resources/personal/ updated by commenting out references to removed mutation analysis options.

comment:40 Changed 4 months ago by olle

(In [4780]) Refs #1029. Case summary updated to show consent info after hospital site info for case:

  1. JSP file case_summary.jsp in resources/reports/ updated by adding a row for consent data after hospital site info for case.
  2. Javascript file case_summary.js in resources/reports/ updated:
    a. Function caseInfoLoaded(response) updated by adding info on consent for case.
    b. New function asConsent(consent, consentDate) added. It returns info on consent and consent date, or a warning if either is missing.
    c. New function logError(section, err) added. It handles reported errors.
  3. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated in private method void loadCaseInfo(DbControl dc, Case theCase) by loading consent annotations.

comment:41 Changed 4 months ago by olle

(In [4783]) Refs #1029. Referral form generator updated for new form versions. Barcode and text at upper right moved upwards, to leave more space to printed text underneath. Referral/case name at upper short side of sticker labels moved downwards, to leave more padding to upper border of sticker label:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Private method PdfUtil createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String formTemplateName, List<String> formTemplateFileList) updated to move barcode and text at upper right upwards, to leave more space to printed text underneath.
    b. Private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String formTemplateName, List<String> formTemplateFileList) updated to move barcode and text at upper right upwards, to leave more space to printed text underneath. Also, referral/case name at upper short side of sticker labels moved downwards, to leave more padding to upper border of sticker label.

comment:42 Changed 4 months ago by olle

(In [4784]) Refs #1029. Referral form generator updated for non-sticker forms to have text/barcode sizes and placement equal to that for forms sticker labels:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated in private method PdfUtil createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String formTemplateName, List<String> formTemplateFileList) to have text/barcode sizes and placement equal to that for forms sticker labels.

comment:43 Changed 4 months ago by olle

(In [4785]) Refs #1029. Import of code for consent support, 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 "Case & consent registration" with entry "1. Consent form registration" with link to new JSP file consentform.jsp when active project is SCAN-B-rec.
  2. New JSP file consentform.jsp in resources/personal/ added. It is linked to new javascript file consentform.js in resources/personal/.
  3. New javascript file consentform.js in resources/personal/ added.
    a. Function initializeStep2(event) calls ConsentFormServlet with command "GetCaseInfo" to obtain information on the entered case, which is processed by function caseInfoLoaded(response).
    b. Function submit() calls ConsentFormServlet with command "RegisterConsent" to register consent info.
  4. New java servlet class/file ConsentFormServlet.java in src/net/sf/basedb/meludi/servlet/ added.
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) supports command "GetCaseInfo", that returns a JSONObject with case info.
    b. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) supports command "RegisterConsent", that retrieves case info and entered consent data, and creates or updates the case item. This code needs to be updated to desired functionality.
  5. XML configuration file servlets.xml in META-INF updated by adding new java servlet class ConsentFormServlet to the servlet list.
  6. Utility class/file JsonUtil.java in src/net/sf/basedb/meludi/ updated with new public static method JSONObject parseRequest(HttpServletRequest request).
  7. Data access object file Subtype.java in src/net/sf/basedb/meludi/dao/ updated by adding new consent related Subtype items NO, NOT_ASKED, RETRACT, and RETRO_NO.
  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 checks for new sub types Subtype.NO, Subtype.NOT_ASKED, Subtype.RETRACT, and Subtype.RETRO_NO.

comment:44 Changed 4 months ago by olle

(In [4786]) Refs #1029. Consent registration for active project SCAN-B-rec updated to use its own set of JSP and Javascript files, to allow for project specific changes in the future:

  1. JSP file index.jsp in resources/ updated in section "Personal information wizards", sub-section "Case & consent registration" to have entry "1. Consent form registration" link to new JSP file consentform_alt_rec.jsp when active project is SCAN-B-rec.
  2. New JSP file consentform_alt_rec.jsp in resources/personal/ added. It is linked to new javascript file consentform_alt_rec.js in resources/personal/. Apart from this, it is initially identical to consentform.jsp.
  3. New javascript file consentform_alt_rec.js in resources/personal/ added. It is initially identical to consentform_alt_rec.js, except that alert() messages refer to the name of the new file.

comment:45 Changed 4 months ago by olle

(In [4787]) Refs #1029. Support for a pre-entry of a PAD number coupled to case item added. As a PAD number is coupled to a specimen item, the new annotation will allow a PAD number to be entered together with the case consent, and be used as default value for later registration of the specimen PAD number:

  1. Data access object file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated:
    a. New annotation type PAD_PRE_ENTRY added. It is of type String and is a Sample (Case) annotation.
  2. 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 check for new annotation type Annotationtype.PAD_PRE_ENTRY and adding this in check for annotation type category for Subtype.CASE.

comment:46 Changed 4 months ago by olle

(In [4788]) Refs #1029. Case summary for active project SCAN-B-rec updated to use its own set of JSP and Javascript files, to allow for project specific changes. Initially, a data row is added for PAD pre-entry annotation for Case items:

  1. JSP file index.jsp in resources/ updated in section "Statistics and reporting wizards", sub-section "Case summary" to have case summary input field coupled to new JSP file case_summary_alt_rec.jsp when active project is SCAN-B-rec.
  2. Javascript file index.js in resources/ updated by adding event and button click handlers for alternative case name input field and button when active project is SCAN-B-rec.
  3. New JSP file case_summary_alt_rec.jsp in resources/reports/ added. It is linked to new javascript file case_summary_alt_rec.js in resources/reports/. It has a new data row added for a PAD pre-entry in the Case section. The new entry is considered confidential, in analogy with PAD number for specimen, and requires Patient Curator or Administrator role to be shown.
  4. New javascript file case_summary_alt_rec.js in resources/reports/ added.
  5. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated in private method void loadCaseInfo(DbControl dc, Case theCase) by loading annotation Annotationtype.PAD_PRE_ENTRY.

comment:47 Changed 4 months ago by olle

(In [4789]) Refs #1029. Consent registration for active project SCAN-B-rec updated to update consent information for existing case. Also an optional PAD pre-entry value is now handled together with consent data for the above project. Note that part of the code is still unused, and may be removed in the future:

  1. JSP file consentform_alt_rec.jsp in resources/personal/ updated with input field for PAD pre-entry.
  2. Javascript file consentform_alt_rec.js in resources/personal/ updated:
    a. Function caseInfoLoaded(response) updated to enter PAD pre-entry value for existing case item in the PAD pre-entry input field, and disable the latter.
    b. Function submit() updated to include value entered in the PAD pre-entry nput field in the JSON info sent to ConsentFormServlet with JSON key "padPreEntry".
  3. Java servlet class/file ConsentFormServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to load annotation Annotationtype.PAD_PRE_ENTRY for existing case to JSON data with JSON key "padPreEntry".
    b. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "RegisterConsent" to update an existing case with entered data for consent and PAD pre-entry, and to add entered value for PAD pre-entry as value for annotation Annotationtype.PAD_PRE_ENTRY for a newly created case.

comment:48 Changed 4 months ago by olle

(In [4790]) Refs #1029. Consent registration for active project SCAN-B-rec updated by clarifying displayed text, when no consent information is found for a case:

  1. JSP file consentform_alt_rec.jsp in resources/personal/ updated by clarifying displayed text "There is currently no information about this case" to "There is currently no consent information about this case".

comment:49 Changed 4 months ago by olle

(In [4791]) Refs #1029. MeLuDI updated in sample registration JSP files by adding description of FFPE option "block" by adding Swedish notation in parenthesis.:

  1. JSP files persinfo.jsp and persinfo_alt_rec.jsp in resources/personal/ updated by adding description of FFPE option "block" by adding Swedish notation in parenthesis.
  2. JSP files specimentube.jsp and specimentube_alt_rec.jsp in resources/sampleproc/ updated by adding description of FFPE option "block" by adding Swedish notation in parenthesis.

comment:50 Changed 4 months ago by olle

(In [4792]) Refs #1029. Updates due to version number change to "1.6.0a2".

  1. Version number changed to "1.6.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:51 Changed 4 months ago by olle

(In [4793]) 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.

comment:52 Changed 3 months ago by olle

(In [4795]) Refs #1029. Support for blood items added, based on that used in Reggie. Code compiles, but might need to be updated, before it can be considered OK:

  1. Data access object file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated:
    a. New annotation type BLOOD_SAMPLING_DATETIME added. It is of type Timestamp and is a Sample annotation.
  2. New data access object file Blood.java in src/net/sf/basedb/meludi/dao/ added.
  3. New data access object file BloodDna.java in src/net/sf/basedb/meludi/dao/ added.
  4. Data access object file Subtype.java in src/net/sf/basedb/meludi/dao/ updated by adding new blood related Subtype items BLOOD and BLOOD_DNA, of type Item.SAMPLE and Item.EXTRACT, respectively.
  5. 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 checks for new sub types Subtype.BLOOD and Subtype.BLOOD_DNA. Also updated by adding check for new annotation type Annotationtype.BLOOD_SAMPLING_DATETIME.

comment:53 Changed 3 months ago by olle

(In [4796]) Refs #1029. Case summary for active project SCAN-B-rec updated by reporting information on blood and blood DNA items:

  1. JSP file case_summary_alt_rec.jsp in resources/reports/ updated with new data sections for blood and blood DNA info.
  2. Javascript file case_summary_alt_rec.js in resources/reports/ updated in function caseInfoLoaded(response) by adding blood and blood DNA info.
  3. Data access object file Patient.java in src/net/sf/basedb/meludi/dao/ updated by adding new public static method Patient findByBlood(DbControl dc, Blood blood).
  4. 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 add info for blood and blood DNA items.
    b. New private method void loadBloodInfo(DbControl dc, Blood blood) added.
    c. New private method void loadBloodDnaInfo(DbControl dc, BloodDna dna) added.

comment:54 Changed 3 months ago by olle

(In [4807]) Refs #1029. MeLuDI updated with new configuration flags uses-referral-creation and uses-site-specific-referral-templates, indicating if the project uses referral creation, and if so, uses site specific referral templates.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags <uses-referral-creation> and <uses-site-specific-referral-templates>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods Boolean fetchUsesReferralCreation(int activeProjectId) and Boolean fetchUsesSiteSpecificReferralTemplates(int activeProjectId). They call private static methods ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration values are returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values "uses-referral-creation" and "uses-site-specific-referral-templates" 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.
  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 flags indicating use of referral creation and site specific referral templates for active project in returned JSONObject for JSON keys "usesReferralCreation" and "usesSiteSpecificReferralTemplates", respectively.

comment:55 Changed 3 months ago by olle

(In [4808]) Refs #1029. Referral generation updated regarding in what BASE directory to look for referral form template files. Now the referral form template top directory is used, unless configuration flag uses-site-specific-referral-templates has value true, in which case sub-directory named after the site prefix is used:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated in private method List<File> fetchReferralFormTemplateFileList(DbControl dc, String caseIdDigits, String formTemplateName) to look for referral template files in the referral form template top directory, unless configuration flag uses-site-specific-referral-templates has value true, in which case it looks in a sub-directory named after the site prefix.

comment:56 Changed 3 months ago by olle

Design note:

  • The update in change set [4808] will drastically simplify the referral template file management for projects like SCAN-B-rec, that do not use site-specific referral templates. Now a template can be updated by only exchanging a single file in the template top directory in the BASE file system (directory ReferralFormTemplatesInUse/ for the active project), while you previously had to exchange one file per site sub-directory (as an example, project SCAN-B-rec currently has support for 14 hospital sites).

comment:57 Changed 3 months ago by olle

Design update for referral generation:

  • Requests have been made that it should be possible to manually write a date on the lower short side of the adhesive stickers on some of the referral forms. To simplify this, new referral form templates will be provided, with vertical sticker text moved 3-4 mm upwards, and a short horizontal line being added near the bottom of each sticker for the date entry. The following updates are desired for the generated bar code/text:
    a. The bar code and accompanying text should analogously be moved upwards to make room for the date entry.
    b. The horizontal referral/case ID on the top of the sticker should be moved a little upwards, in order to not lie too close to the vertical text on the sticker, after the former was moved upwards.
    c. Both the upper and lower horizontal referral/case ID strings on the sticker need to be moved about 2 mm to the left, in order to lie centered in relation to the added short line near the bottom of the sticker (the line lies about 1 mm above the referral/case ID string on the bottom of the sticker, so the former does not need to be moved downwards).
  • A fixed number of biopsy forms for each case ID should be created. The default number of forms to create is 2.
Last edited 3 months ago by olle (previous) (diff)

comment:58 Changed 3 months ago by olle

(In [4809]) Refs #1029. Referral form generator updated for new form versions. Barcode and text on sticker labels updated, in order to make room for a manually added date entry near the bottom of the sticker:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Private method PdfUtil createBarcodeStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String formTemplateName, List<String> formTemplateFileList) updated to move sticker barcode and text upwards, to make room for a manual date entry. Also, referral/case name at upper short side of sticker labels moved upwards, to leave more padding to the new position of vertical text. Both upper and lower referral/case name at short side of sticker labels moved to the left, in order to lie centered in relation to the added short line near the bottom of the sticker.

comment:59 Changed 3 months ago by olle

(In [4810]) Refs #1029. Referral form generator updated to create a fixed number of biopsy forms for each case ID. The default number of forms to create is 2.

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. New private static final constant int NUM_BIOPSY_FORMS_DEFAULT defined, and set equal to 2.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GenerateReferralForms" to create a fixed number of biopsy forms for each case ID. The default number of forms to create is initially equal to value of constant NUM_BIOPSY_FORMS_DEFAULT.

comment:60 Changed 3 months ago by olle

(In [4811]) Refs #1029. Consent registration updated when creating a new case item to check if the hospital site should be obtained from a site prefix in the case name, in which case the site annotation for the created case item will be set to this value:

  1. Java servlet class/file ConsentFormServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "RegisterConsent" when creating a new case item to check if the hospital site should be obtained from a site prefix in the case name, in which case the site annotation for the created case item will be set to this value.

comment:61 Changed 3 months ago by olle

(In [4812]) Refs #1029. Updates due to version number change to "1.6.0a3".

  1. Version number changed to "1.6.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:62 Changed 3 months ago by olle

(In [4813]) 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.

comment:63 Changed 3 months ago by olle

(In [4822]) Refs #1029. MeLuDI updated with new configuration variables blood-box-prefix and blood-box-num-digits, specifying a prefix for blood storage boxes and number of digits in the serial number part of the name.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags <blood-box-prefix> and <blood-box-num-digits>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods String fetchBloodBoxPrefix(int activeProjectId) and Integer fetchBloodBoxNumDigits(int activeProjectId). They call private static methods ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration values are returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values "blood-box-prefix" and "blood-box-num-digits" 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.
  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 flags indicating use of referral creation and site specific referral templates for active project in returned JSONObject for JSON keys "bloodBoxPrefix" and "bloodBoxNumDigits", respectively.

comment:64 Changed 3 months ago by olle

Design discussion - Icon links to case summary from BASE pages:

  • In change set [4788] case summary for active project SCAN-B-rec was updated to use its own set of JSP and Javascript files, to allow for project specific changes. This was accomplished by letting JSP file index.jsp in resources/ select either JSP file case_summary.jsp or case_summary_alt_rec.jsp as the button target for the case summary input field, depending on whether the active project differed from "SCAN-B-rec" or not (this solution might be changed in the future for one using configuration settings). However, the icon link to case summary in some BASE tables and property tabs, currently link to the original case_summary.jsp JSP file. This should be updated to also select the proper case summary version, depending on the project name.

The following files are instrumental in making case summary accessible via icon link in column in BASE sample lists, or in tool bar in sample property tabs:

resources/reports/case_summary_hook.jsp
resources/scripts/case-summary.js
src/net/sf/basedb/meludi/extensions/CaseSummaryButtonFactory.java
src/net/sf/basedb/meludi/extensions/CaseSummarySectionFactory.java
src/net/sf/basedb/meludi/extensions/MeludiListColumnsFactory.java
  • File src/net/sf/basedb/meludi/extensions/MeludiListColumnsFactory.java controls the case summary icon link in a column in BASE sample lists.
  • Files src/net/sf/basedb/meludi/extensions/CaseSummaryButtonFactory.java and resources/scripts/case-summary.js control the case summary icon link in tool bar in sample property tabs. The first sets values of named parameters, that are used by the second, that selects the case summary JSP file. By updating the extension to set the name of the active project to a new parameter, script case-summary.js can access this and select the case summary version depending on the project name.
  • File resources/reports/case_summary_hook.jsp controls the case summary link in sample overview tabs.
Last edited 3 months ago by olle (previous) (diff)

comment:65 Changed 3 months ago by olle

(In [4827]) Refs #1029. MeLuDI updated in case summary icon link in a column in BASE sample lists to open special version of case summary, if active project is SCAN-B-rec:

  1. Java extension class/file MeludiListColumnsFactory.java in src/net/sf/basedb/meludi/extensions/ updated in public method String getValue(DbControl dc, BioMaterial bm) to give link to JSP file case_summary_alt_rec.jsp in resources/reports/, if active project is SCAN-B-rec.

comment:66 Changed 3 months ago by olle

(In [4828]) Refs #1029. MeLuDI updated in case summary icon link in tool bar in BASE sample property tabs to open special version of case summary, if active project is SCAN-B-rec:

  1. Java extension class/file CaseSummaryButtonFactory.java in src/net/sf/basedb/meludi/extensions/ updated in public method ButtonAction[] getActions(InvokationContext context) to set value of new parameter "data-project-name" to name of active project.
  2. Javascript file case-summary.js in resources/scripts/ updated in function showCaseSummary(event) to obtain name of active project from value of parameter "data-project-name" (addressed as "project-name"), and give link to JSP file case_summary_alt_rec.jsp in resources/reports/, if active project is SCAN-B-rec.

comment:67 Changed 3 months ago by olle

(In [4829]) Refs #1029. MeLuDI updated to present correct project-specific info in hover text for case name input field for case summary in outermost JSP page. This functionality previously existed, but was broken for projects other than SCAN-B-rec, when support for a special case summary JSP file was added, when the latter project was active:

  1. Javascript file index.js in resources/ updated in function onConfiguration(request) to obtain name of active project from configuration information, and modify the hover text of correct case name input field.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method String fetchActiveProjectName(int activeProjectId). It calls private static method String fetchProjectName(int activeProjectId) to obtain the name of the active project, which is then returned.
  3. 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 name of active project in returned JSONObject for JSON key "name".

comment:68 Changed 2 months ago by olle

(In [4830]) Refs #1029. MeLuDI updated in case summary link in BASE sample overview tabs to open special version of case summary, if active project is SCAN-B-rec. The case summary information will open in the same pane as the original link:

  1. JSP file case_summary_hook.jsp in resources/reports/ updated to have case summary link coupled to JSP file case_summary_alt_rec.jsp instead of case_summary.jsp, when active project is SCAN-B-rec.
  2. Javascript file case_summary.js in resources/reports/ updated to check if Doc.element('caseName') differs from null, before referencing it.
  3. Javascript file case_summary_alt_rec.js in resources/reports/ updated to check if Doc.element('caseName') differs from null, before referencing it.

comment:69 Changed 2 months ago by olle

(In [4831]) Refs #1029. Case summary for active project SCAN-B-rec updated to find blood info and what information is reported on blood items:

  1. JSP file case_summary_alt_rec.jsp in resources/reports/ updated in data section for blood by adding row for storage box information.
  2. Javascript file case_summary_alt_rec.js in resources/reports/ updated in function caseInfoLoaded(response) by adding blood storage box info.
  3. Data access object file Blood.java in src/net/sf/basedb/meludi/dao/ updated:
    a. Public static method List<Blood> findAllByCaseName(DbControl dc, String name) updated to not restrict the length of the input case name, before using it in a database query for related blood items.
    b. Protected method void initJSON(JSONObject json) and public method JSONObject loadBioPlateLocation() added, in order to obtain storage box info for a blood item.
  4. 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 call public static method List<Blood> findAllByCaseName(DbControl dc, String name) in data access object class Blood to obtain information on blood items related to the case item.
    b. Private method void loadBloodInfo(DbControl dc, Blood blood) updated to call public method JSONObject loadBioPlateLocation() in data access object class Blood to obtain storage box information on the blood item. Also obtaining value of sampling date annotation.

comment:70 Changed 2 months ago by olle

Base-line registration wizard - Functional specification:

  • The Base-line registration wizard should be placed in the section for "Personal information wizards", as patient information and PAD numbers will be used. The wizard will be based on the personal registration wizard, with the following modifications:

    a. Instead of specimen tubes, a number of tubes with whole blood (default 2) will be expected, with arrival and sampling dates to be stored with it.
    b. The tubes will be assigned locations in a blood box.
    c. The created blood items will inherit the consent of the case item.
    d. Two check boxes for existing CTC (circulating tumor cells) and ctDNA (circulating tumor DNA) will be present. At the time of writing, it has not been decided if the annotations for these Boolean variables should be connected to the case item or the blood items, or both.
    e. A check box indicating that a referral for FFPE sections will be created.
    f. A PAD input field for the FFPE referral should exist, pre-filled with the value of the PAD pre-entry annotation for the case, if existing.

comment:71 Changed 2 months ago by olle

(In [4832]) Refs #1029. First version of the Base-line registration wizard, based on the personal registration wizard. Currently no annotations are created for the CTC/ctDNA values, and no FFPE referral form is created:

  1. JSP file index.jsp in resources/ updated:
    a. Section "Personal information wizards" in sub-section "Case & consent registration" updated with new entry "Base-line registration" with link to new JSP file baseline_alt_rec.jsp when active project is SCAN-B-rec.
    b. Section "Sample processing wizards" updated in sub-section "Case registration" by exchanging wizard links with information text referring to the personal registration wizards.
  2. New JSP file baseline_alt_rec.jsp in resources/personal/ added. It is linked to new javascript file baseline_alt_rec.js in resources/personal/.
  3. New javascript file baseline_alt_rec.js in resources/personal/ added. It calls BaseLineRegistrationServlet.
  4. New java servlet class/file BaseLineRegistrationServlet.java in src/net/sf/basedb/meludi/servlet/ added. It is based on PersonalRegistrationServlet.java.
  5. XML configuration file servlets.xml in META-INF updated by adding new java servlet class BaseLineRegistrationServlet to the servlet list.

comment:72 Changed 2 months ago by olle

(In [4833]) Refs #1029. Base-line registration wizard updated to create FFPE referral form at registration:

  1. Javascript file baseline_alt_rec.js in resources/personal/ updated:
    a. Function submit() updated by placing most of the code in new function submit2(). If check box for FFPE referral is checked, ReferralGeneratorServlet is called with command "GenerateFfpeReferralForm" with start case name set equal to current case name, number of form sets set equal to 1, PAD number equal to value in "PAD" input field, and callback function to submit2(), otherwise function submit2() is called directly.
    b. New function submit2() added, containing bulk of the code previously in function submit().
  2. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. New private static final constant String REF_FORM_TEMPLATE_FFPE_REFERRAL set equal to "ffpe-referral".
    b. New private static final constant String TEMPLATE_FILENAME_START_FFPE_REFERRAL set equal to "SCAN-B-rec_FFPE".
    c. Private method void initializeRefFormTemplNameStartHashMap() updated to updated hash map refFormTemplNameStartHM with key REF_FORM_TEMPLATE_FFPE_REFERRAL and value TEMPLATE_FILENAME_START_FFPE_REFERRAL.
    d. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with new command "GenerateFfpeReferralForm". It calls new private method PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, String caseId, String pad, List<String> formTemplateFileList).
    e. New private method PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, String caseId, String pad, List<String> formTemplateFileList) added. It calls new private method PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String pad, List<String> formTemplateFileList).
    f. New private method PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String pad, List<String> formTemplateFileList). It is based on private method PdfUtil createBarcodeNonStickerForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, List<String> formTemplateFileList), but also adds the chosen PAD number under the case number bar code and text.

comment:73 Changed 2 months ago by olle

(In [4834]) Refs #1029. Updates due to version number change to "1.6.0a4".

  1. Version number changed to "1.6.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:74 Changed 2 months ago by olle

(In [4835]) 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.

comment:75 Changed 2 months ago by olle

(In [4836]) Refs #1029. Base-line registration wizard updated with bug-fix to set correct default values for number of tubes and PAD also when the case item has no specimens:

  1. Javascript file baseline_alt_rec.js in resources/personal/ updated in function initializeStep3() to set correct default values for number of tubes and PAD also when the case item has no specimens.

comment:76 Changed 2 months ago by olle

(In [4837]) Refs #1029. Updates due to version number change to "1.6.0a5".

  1. Version number changed to "1.6.0a5":
    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:77 Changed 2 months ago by olle

(In [4838]) 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.

comment:78 Changed 2 months ago by olle

Design update:

  • At SCAN-B-rec/MeLuDI meeting 2018-06-07 a number of decisions were made, that affect the MeLuDI software. In order to simplify access to other researchers in the future, without revealing the original patient/sample keys, it was decided to try a new item identification model in the LIMS system:
  1. The current referral ID, "Studielöpnummer" ("Study serial number") will be printed on the referrals, and entered in the consent registration wizard, but the created case ID will be created independently. The latter will not have a site ID as part of the name. New configuration variables for the referral ID prefix and number of digits will be needed, but the values will be set the current ones for the case item, while the case name prefix and number of digits will be modified (keeping the case item configuration variables is preferable from a programming view, since the latter are referenced at several places in the existing code).
  2. The consent registration wizard will now include personal number, family name, and all first names of the patient. The patient item will be registered in this wizard, instead of in the baseline registration wizard.
  3. Since the case name now can be different from the referral ID, the former will have to keep track of the latter. Access to the referral ID for a case should be coupled to a more restrictive user role, e.g. patient curator.
  4. Since the case name now won't include a site prefix, while the case item still contains a site annotation, the latter might also have to be coupled to a more restrictive user role, e.g. patient curator.
  5. Not directly related to the non-disclosure of the patient/sample keys, it has been discussed that samples of different types, e.g. specimen and blood, should differ in names by a prefix, instead of the current practice of a suffix to the case name (".1", ".2", etc. for specimen; ".b", ".b2", etc. for blood). The reason this is that it would simplify communication between researchers, according the type of sample was discussed. The specimen can still be identified by a suffix to the case name, while blood samples will have a new prefix (and number series).
Last edited 7 weeks ago by olle (previous) (diff)

comment:79 Changed 2 months ago by olle

(In [4839]) Refs #1029. MeLuDI updated with new configuration variables referral-prefix and referral-num-digits, specifying a prefix for referral ID and number of digits in the serial number part of the name.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags <referral-prefix> and <referral-num-digits>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods String fetchReferralPrefix(int activeProjectId) and Integer fetchReferralNumDigits(int activeProjectId). They call private static methods ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration values are returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values "referral-prefix" and "referral-num-digits" 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.
  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 referral prefix and number of digits for active project in returned JSONObject for JSON keys "referralPrefix" and "referralNumDigits", respectively.

comment:80 Changed 2 months ago by olle

(In [4840]) Refs #1029. Support for a referral ID coupled to case item added. The new annotation allows the case item to have a name unrelated to the referral ID:

  1. Data access object file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated:
    a. New annotation type REFERRAL_ID added. It is of type String and is a Sample (Case) annotation.
  2. 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 check for new annotation type Annotationtype.REFERRAL_ID and adding this in check for annotation type category for Subtype.CASE. The new annotation will be coupled to the Patient Curator role.

comment:81 Changed 2 months ago by olle

(In [4841]) Refs #1029. Case summary for active project SCAN-B-rec updated by adding a data row for a referral ID annotation for Case items:

  1. JSP file case_summary_alt_rec.jsp in resources/reports/ updated by adding a new data row for a referral ID in the Case section. The new entry is considered confidential, and requires Patient Curator or Administrator role to be shown.
  2. Javascript file case_summary_alt_rec.js in resources/reports/ updated in function caseInfoLoaded(response) to add value for JSON key "referralId" to the data row for this Case annotation.
  3. Java servlet class/file CaseSummaryServlet.java in src/net/sf/based/meludi/servlet/ updated in private method void loadCaseInfo(DbControl dc, Case theCase) by loading annotation Annotationtype.REFERRAL_ID and couple the value to JSON key "referralId".

comment:82 Changed 2 months ago by olle

(In [4842]) Refs #1029. Case summary updated in the Case section to place data row for hospital site below row for consent, and for active project equal to SCAN-B-rec to regard the information as confidential, requiring Patient Curator role to inspect it:

  1. JSP file case_summary.jsp in resources/reports/ to place data row for hospital site below row for consent.
  2. JSP file case_summary_alt_rec.jsp in resources/reports/ to place data row for hospital site below row for consent, and to regard the information as confidential, requiring Patient Curator role to inspect it.

comment:83 Changed 2 months ago by olle

(In [4860]) Refs #1029. Consent registration for active project SCAN-B-rec updated to use independent referral ID and case name, and to support simultaneous registration of patient data:

  1. JSP file consentform_alt_rec.jsp in resources/personal/ updated:
    a. Step 1 updated to expect input of a referral ID.
    b. Step 2 updated with fields for corresponding case name and personal number, as well as calendar link for entering consent data.
    c. New step 3 will allow input of patient data.
  2. Javascript file consentform_alt_rec.js in resources/personal/ updated:
    a. Function initPage() updated with event handlers for new input fields and wizard steps.
    b. Function onConfiguration(request) updated to call servlet ConsentFormServlet instead of LabelGenerationServlet with command "CountCases".
    c. Function caseInfoLoadedStep1(response) updated to expect input of referral ID separate from case name.
    d. Function validateStep1(event) updated to check valid input of referral ID instead of case name.
    e. New function referralIdOnChange() added. It checks that input referral ID is valid, after it calls servlet ConsentFormServlet with command "GetCaseInfo".
    f. Function initializeStep2(event) updated to send referral ID with call of servlet ConsentFormServlet with command "GetCaseInfo".
    g. Function caseInfoLoaded(response) updated to get case name from response instead of input field, and to add case and patient data into input fields, if the former are obtained from the response.
    h. New function personalNumberOnChange() added. It checks and processes the input personal number.
    i. New function initializeStep3(event) added. It calls servlet ConsentFormServlet with command "GetPatientInfo".
    j. New function patientInfoLoaded(response) added. It enters obtained patient data into input fields.
    k. New function nameOnChange(event) added.
    l. New function validateStep3(event) added.
    m. Function submit() updated to obtain referral ID and patient data and transfer those when calling servlet ConsentFormServlet with command "RegisterConsent".
  3. Data access object file Case.java in src/net/sf/basedb/meludi/dao/ updated with new public static method Case findByReferralId(DbControl dc, String referralId).
  4. Java servlet class/file ConsentFormServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with command "CountCases".
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated in command "GetCaseInfo" to get case info from referral ID and to include patient info.
    c. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with command "GetPatientInfo".
    d. New private method String fetchNewCaseName(DbControl dc) added. It calls new private method String fetchHighestCaseName(DbControl dc) to get the current highest case name, after which it returns a new case name with incremented serial number.
    e. New private method String fetchHighestCaseName(DbControl dc) added. It returns the highest case name for the active project.
    f. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "RegisterConsent" to call new private method BioSource getOrCreatePatient(DbControl dc, JSONObject jsonPat, JSONArray jsonMessages) to obtain a new patient item, if needed. Also, a new case item is updated with the referral ID as annotation, and the hospital site value is set from the value of the latter.
    g. New private method BioSource getOrCreatePatient(DbControl dc, JSONObject jsonPat, JSONArray jsonMessages) added. It creates a patient item from the given patient data.

comment:84 Changed 2 months ago by olle

(In [4861]) Refs #1029. Link to already existing label generation wizard re-activated:

  1. JSP file index.jsp in resources/ updated in section "Sample processing wizards" in sub-section "Case registration" with entry "Create label file for a number of new cases" with link to JSP file labelgeneration.jsp in resources/sampleproc/.

comment:85 Changed 2 months ago by olle

(In [4862]) Refs #1029. Base-line registration wizard updated to obtain info on blood samples:

  1. Java servlet class/file BaseLineRegistrationServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to obtain info on blood samples related to the case item, among other methods by calling new private method void loadBloodInfo(DbControl dc, Blood blood).
    b. New private method void loadBloodInfo(DbControl dc, Blood blood) added. It adds blood sample data as annotations to the blood item.

comment:86 Changed 2 months ago by olle

(In [4865]) Refs #1029. Referral generation updated for input of a referral ID instead of a case ID. Also, patient data is now entered in the generated FFPE referral form:

  1. JSP file generate-referral-forms.jsp in resources/personal/ updated in input text to refer to a referral ID instead of a case ID. Also change of a variable name, in order not to refer to the SCAN-B project.
  2. Javascript file generate-referral-forms.js in resources/personal/ updated to to process the input referral ID using configurations for prefix and number of digits for referrals, instead of sample items.
  3. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated with new public static method String fetchReferralDigits(String referralId, int activeProjectId). It obtains the digit part of a referral ID by removing the optional referral prefix.
  4. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated. Note that in most cases, old variable names referring to a case ID has been retained, although the actual value is now a referral ID. This choice was made, in order to highlight the critical code changes; change of variable names might be performed at a later time:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for commands "UpdateUsedCaseIdDigitsList", "GenerateReferralForms", "GenerateFfpeReferralForm", and "DownloadFormBatchFile" for input of a referral ID instead of a case ID.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GenerateFfpeReferralForm" to obtain patient data from patient related to case related to input referral ID, and transfer the patient data as arguments when calling updated private method PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, String caseId, String pad, String personalNumber, String familyName, String allFirstNames, List<String> formTemplateFileList).
    c. Private method void updateReferralFormLogFile(DbControl dc, String referralVariant, String startcaseIdDigits, int nofFormSets, List<String> formTemplateFileList) updated to expect input of a referral ID instead of a case ID.
    d. Private method PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, String caseId, String pad, String personalNumber, String familyName, String allFirstNames, List<String> formTemplateFileList) updated with new arguments for patient data, and to expect input of a referral ID instead of a case ID, as well as to transfer the argument patient data to arguments in call of updated private method private PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String pad, String personalNumber, String familyName, String allFirstNames, List<String> formTemplateFileList).
    e. Private method private PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String pad, String personalNumber, String familyName, String allFirstNames, List<String> formTemplateFileList) updated with new arguments for patient data, and to expect input of a referral ID instead of a case ID. Also, personal number, family name, and all first names are printed in the upper right section of the created referral form.
    f. Several other private methods updated to expect input of a referral ID instead of a case ID.

comment:87 Changed 2 months ago by olle

(In [4866]) Refs #1029. Referral generation updated for generation of FFPE referral form to print personal number with bold text, and with a hyphen "-" before the last four digits:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GenerateFfpeReferralForm" to add a hyphen "-" before the last four digits in the personal number.
    b. Private method private PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String pad, String personalNumber, String familyName, String allFirstNames, List<String> formTemplateFileList) updated to print personal number with bold text.

comment:88 Changed 2 months ago by olle

(In [4867]) Refs #1029. MeLuDI updated with new configuration variable blood-item-prefix, specifying a specific prefix for a blood item (previously the sample item prefix was used also for the latter).

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <blood-item-prefix>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method String fetchBloodItemPrefix(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 "blood-item-prefix" for each project from the meludi-config.xml configuration file, and store the value in new instance variable 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 the 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 blood item prefix for active project in returned JSONObject for JSON key "bloodItemPrefix".

comment:89 Changed 8 weeks ago by olle

(In [4868]) Refs #1029. Data access object file Blood.java updated in case-related methods to replace sample item prefix with blood item prefix before performing database search:

  1. Data access object file Blood.java in src/net/sf/basedb/meludi/dao/ updated:
    a. Public static method Blood findByCaseName(DbControl dc, String name, boolean useBloodSampleAnnotation) updated to replace sample item prefix with blood item prefix before performing database search.
    b. Public static method List<Blood> findAllByCaseName(DbControl dc, String name) updated to replace sample item prefix with blood item prefix before performing database search.

comment:90 Changed 8 weeks ago by olle

(In [4869]) Refs #1029. Label generation updated to optionally create labels for blood tubes:

  1. JSP file labelgeneration.jsp in resources/sampleproc/ updated by adding a menu for tube content type, with options "Specimen" or "Blood". The default option is "Specimen".
  2. Javascript file labelgeneration.js in resources/sampleproc/ updated in function doExport(preview) to add value for tube content type selection in the data set sent to servlet LabelGenerationServlet with command "GetLabelFile".
  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 command "CountCases" by adding value of blood item prefix for JSON key "bloodItemPrefix".
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetLabelFile" by checking value of parameter "tubeContentType", and if it equals "Blood" exchange sample item prefix for blood item prefix, and add suffix ".b" for sample tubes (not printing digit "1" for the first tube) for the text on the labels.

comment:91 Changed 8 weeks ago by olle

(In [4870]) Refs #1029. Base-line registration wizard updated by removing patient registration (now performed during consent registration) and using new name prefix for blood samples:

  1. JSP file baseline_alt_rec.jsp in resources/personal/ updated by removing fields for patient registration.
  2. Javascript file baseline_alt_rec.js in resources/personal/ updated:
    a. New global variable bloodItemPrefix added.
    b. Function initPage() updated by removing references to the removed patient registration step.
    c. Function onConfiguration(request) updated by setting values of global variables for sample itme prefix, sample item number of digits, and blood item prefix. Call of LabelGenerationServlet exchanged for call of function caseNameOnChange().
    d. Function caseInfoLoadedStep1(response) updated to set value of blood item prefix from response, in case this function should be used again.
    e. Function onCaseInfoLoaded(response) updated by commenting out code related to hospital site and personal number.
    f. Function validateStep1(event) updated by removing references to personal number.
    g. Function initializeStep3() renamed initializeStep2() and commenting out code related to patient info.
    h. Function validateStep3(event) renamed validateStep2(event).
    i. Function initializeStep4(event) renamed initializeStep3(event).
    j. Function fetchTubeName(tubeContentType, caseInfo, tubeIndex) updated when tube content type is blood to exchange sample item prefix for blood item prefix in the tube name.
    k. Function submit() updated to use referral ID when calling ReferralGeneratorServlet to create an FFPE referral form, and to skip patient info.
  3. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to add referral ID for case from annotation value.
    b. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "CreateCase" to create link to existing patient item.
    c. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "UpdateCase" to create link to patient item related to case.

comment:92 Changed 8 weeks ago by olle

(In [4871]) Refs #1029. Referral generation updated for generation of FFPE referral form to print patient names with bold text, and to place them closer to the printed line on the referral template. Also, in order to fit new header locations on the updated referral template, the personal number and referral ID with bar code are moved downwards:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/based/meludi/servlet/ updated:
    a. Private method private PdfUtil createFfpeForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, String caseId, String pad, String personalNumber, String familyName, String allFirstNames, List<String> formTemplateFileList) updated to print patient names with bold text, and to place them closer to the printed line on the referral template. Also, in order to fit new header locations on the updated referral template, the personal number and referral ID with bar code are moved downwards.

comment:93 Changed 8 weeks ago by olle

(In [4872]) Refs #1029. Updates due to version number change to "1.6.0a6".

  1. Version number changed to "1.6.0a6":
    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:94 Changed 8 weeks ago by olle

Design update:

  • A number of modifications of the MeLuDI software has been decided at SCAN-B-rec/MeLuDI meeting 2018-06-26:
  1. The wizard for referral form generation should be placed first in the section for "Personal information wizards", since it is normally the first to be used.
  2. Referral form generation should be extended to create multi-paged PDF forms with patient information. The printing should normally be double-sided on as many standard paper sheets as is necessary.
    a. If the number of pages in the form is odd, an extra blank page will be added at the end of each form, to make sure that no sheet contains pages belonging to forms for different patients.
    b. To allow automatic stapling of sheets belonging to a single patients, these forms should be stored in a separate PDF file, and not included in the PDF file for generated consent forms, that is also to be printed on standard paper.
  3. Blood item names should not have suffix "b", when a unique prefix is used to identify the sample as a blood sample.
    a. Since this configuration might differ between different projects, suffix "b" should only be omitted, when the blood and sample item prefixes differ.
    b. By convention, the first blood sample name previously only had suffix ".b" with an implicit "1" at the end (following blood sample names have suffixes ".b2", ".b3", etc.). If suffix "b" should be omitted, the first blood sample should have suffix ".1", i.e. the previously implicit "1" should now be shown.
  4. Consent registration should be updated with a checkbox for "Diagnosis confirmed".
Last edited 7 weeks ago by olle (previous) (diff)

comment:95 Changed 8 weeks ago by olle

(In [4873]) Refs #1029. Section "Personal information wizards" updated by placing the wizard for referral form generation first, since it is normally the first to be used:

  1. JSP file index.jsp in resources/ updated in section "Personal information wizards" by placing the wizard for referral form generation first.

comment:96 Changed 8 weeks ago by olle

(In [4874]) 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.

comment:97 Changed 7 weeks ago by olle

(In [4875]) Refs #1029. MeLuDI updated with public convenience method to check if configuration values for blood and sample item prefixes differ:

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method boolean bloodAndSampleItemPrefixesDiffer(int activeProjectId). It obtains the blood and sample item prefixes from the configuration, and checks if they differ. For this comparison, a null value for a prefix is considered equal to an empty string.

comment:98 Changed 7 weeks ago by olle

(In [4876]) Refs #1029. Label generation updated to use same suffix for blood and sample item names, if blood and sample item prefixes differ:

  1. Java servlet class/file LabelGenerationServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetLabelFile" by using same suffix for blood and sample item names, if blood and sample item prefixes differ.

comment:99 Changed 7 weeks ago by olle

(In [4877]) Refs #1029. Data access object file Blood.java updated by omitting "b" in item name suffix, when performing a database search for blood samples. and blood and sample item prefixes differ:

  1. Data access object file Blood.java in src/net/sf/basedb/meludi/dao/ updated in public static method Blood findByCaseName(DbControl dc, String name, boolean useBloodSampleAnnotation) by omitting "b" in item name suffix, when performing a database search for blood samples. and blood and sample item prefixes differ.

comment:100 Changed 7 weeks ago by olle

(In [4878]) Refs #1029. Base-line registration wizard updated by omitting "b" and showing otherwise implicit "1" in item name suffix for blood samples, if blood and sample item prefixes differ:

  1. Javascript file baseline_alt_rec.js in resources/personal/ updated in function fetchTubeName(tubeContentType, caseInfo, tubeIndex) by omitting "b" and showing otherwise implicit "1" in item name suffix for blood samples, if blood and sample item prefixes differ.

comment:101 Changed 7 weeks ago by olle

(In [4879]) Refs #1029. Consent registration for active project SCAN-B-rec updated with checkbox for "Diagnosis confirmed", which value is stored in a new Boolean annotation for the Case item.

  1. JSP file consentform_alt_rec.jsp in resources/personal/ updated with new checkbox "Diagnosis confirmed" below consent details. Default is for the checkbox to not be checked.
  2. Javascript file consentform_alt_rec.js in resources/personal/ updated in function submit() to obtain the value of checkbox "Diagnosis confirmed" from the form in JSP file consentform_alt_rec.jsp and transfer it to servlet ConsentFormServlet.
  3. JSP file case_summary_alt_rec.jsp in resources/reports/ updated in case section with new data row for value of "Diagnosis confirmed" checkbox, below row for consent information.
  4. Javascript file case_summary_alt_rec.js in resources/reports/ updated in function caseInfoLoaded(response) to enter the value for the "Diagnosis confirmed" checkbox obtained for the case from servlet CaseSummaryServlet and make it available for display in the case summary JSP page.
  5. Java class/file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated with new public static final Annotationtype.DIAGNOSIS_CONFIRMED entry. It is a Boolean annotation for sample (Case) items.
  6. Java 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 check for new annotation type Annotationtype.DIAGNOSIS_CONFIRMED. Also, the annotation type is added to annotation type category "Case".
  7. Java class/file ConsentFormServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "GetCaseInfo" to load annotation value for Annotationtype.DIAGNOSIS_CONFIRMED for the case item.
    b. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "RegisterConsent" to obtain value of "Diagnosis confirmed" from form, and set annotation type Annotationtype.DIAGNOSIS_CONFIRMED to that value for the case item.
  8. Java servlet class/file CaseSummaryServlet.java in src/net/sf/basedb/meludi/servlet/ updated in private method void loadCaseInfo(DbControl dc, Case theCase) to load value for Annotationtype.DIAGNOSIS_CONFIRMED and couple the value to JSON key "diagnosisConfirmed".

comment:102 Changed 7 weeks ago by olle

Design update:

  • As the result of discussions after the SCAN-B-rec/MeLuDI meeting 2018-06-26, further modifications to the item identification model in MeLuDI, that was started after the SCAN-B-rec/MeLuDI meeting 2018-06-07, were decided:
  1. The referral ID, "Studielöpnummer" ("Study serial number") that will be printed on the referrals, and entered in the consent registration wizard, will be independent of the case ID, that will be created independently. The latter will not have a site ID as part of the name.
  2. As previously, the patient ID will be independent of the referral and case ID values, but a link between a patient ID and the case ID will exist.
  3. A blood item will have an ID independent of the case ID, but a link between a blood item ID and the case ID will exist. The blood item ID will not include a dot.
  4. An FFPE block ("Kloss") item (new) will have an ID independent of the case ID, but a link between an FFPE block item ID and the case ID will exist. The FFPE block item ID will not include a dot.
  5. An FFPE section ("Snitt") from an FFPE block item will be identified by the FFPE block name plus a suffix (".1" for the first section, ".2" for the second, etc.).
  6. A DNA or RNA extract from a blood or FFPE section will be identified by the sample name plus extra suffix (".d" or ".r" for the first DNA or RNA extract, respectively, ".d2" or ".r2" for the second, etc.).

The decisions above strike at the core of previous MeLuDI naming conventions, but will hopefully avoid problems with the latter.

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

comment:103 Changed 6 weeks ago by olle

(In [4899]) Refs #1029. New string annotation type CASE_ID added for samples, It will be used to specify a connection between blood or FFPE block items and a parent case item, even if the base name differs.

  1. Data access object file Annotationtype.java in src/net/sf/basedb/meludi/dao/ updated:
    a. New annotation type CASE_ID added. It is of type String and is a Sample annotation.
  2. Data access object file Blood.java in src/net/sf/basedb/meludi/dao/ updated:
    a. Public static method List<Blood> findAllByCaseName(DbControl dc, String name) updated to call convenience method boolean Meludi.bloodAndSampleItemPrefixesDiffer(int activeProjectId) to determine if the old or new item name convention is used, and call either new private static method List<Blood> findAllByCaseNameOldConvention(DbControl dc, String name) or private static method List<Blood> findAllByCaseNameNewConvention(DbControl dc, String name).
    b. New private static method List<Blood> findAllByCaseNameOldConvention(DbControl dc, String name) added. It basically consists of code in old version of public static method List<Blood> findAllByCaseName(DbControl dc, String name).
    c. New private static method List<Blood> findAllByCaseNameNewConvention(DbControl dc, String name) added. It performs a database query for all blood items having value of new annotation type CASE_ID equal to the name of the current case item.
  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 add checks for new annotation type CASE_ID. Also updated by including it in new annotation type category for Subtype.BLOOD.

comment:104 Changed 6 weeks ago by olle

(In [4901]) Refs #1029. MeLuDI updated with new configuration variables blood-item-num-digits, ffpe-block-item-prefix, and ffpe-block-item-num-digits, specifying number of digits in the serial part of the name for blood items, a prefix for FFPE block item ID and number of digits in the serial number part of the name for FFPE block items.

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tags <blood-item-num-digits>, <ffpe-block-item-prefix> and <ffpe-block-item-num-digits>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static methods Integer fetchBloodItemNumDigits(int activeProjectId), String fetchFfpeBlockItemPrefix(int activeProjectId), and Integer fetchFfpeBlockItemNumDigits(int activeProjectId). They call private static methods ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration values are returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration values "blood-item-num-digits", "ffpe-block-item-prefix", and "ffpe-block-item-num-digits" 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.
  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 referral prefix and number of digits for active project in returned JSONObject for JSON keys "bloodItemNumDigits", "ffpeBlockItemPrefix", and "ffpeBlockItemNumDigits", respectively.

comment:105 Changed 6 weeks ago by olle

(In [4903]) Refs #1029. Support for FFPE block items added:

  1. New data access object file FfpeBlock.java in src/net/sf/basedb/meludi/dao/ added.
  2. Data access object file Subtype.java in src/net/sf/basedb/meludi/dao/ updated by adding new FFPE block related Subtype item FFPE_BLOCK of type Item.SAMPLE.
  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 add checks for new sub type Subtype.FFPE_BLOCK and corresponding annotation type category.

comment:106 Changed 5 weeks ago by olle

Design discussion:

  • Allowing different prefixes and number of digits for FFPE block and blood items might complicate things, when obtaining the root digits in an item name. As an example, with FFPE block item prefix = "FB" plus number of items = 5 and blood item prefix = "BLD" plus number of items = 4, items named FB00124.1.d and BLD0023.d might be DNA extracts connected to the same case item. In the old MeLuDI naming scheme, the part of the name before the first dot would equal the case name. Care must be taken to minimize the risk of errors caused by code assuming that the lengths of prefixes and number of digits are equal for different subtypes.
Last edited 5 weeks ago by olle (previous) (diff)

comment:107 Changed 5 weeks ago by olle

(In [4904]) Refs #1029. MeLuDI updated in class Meludi with new public static convenience methods for obtaining root names, root number of digits, prefixes, and number of digits for different subtypes. Also a method for obtaining the main subtype from the item name.

  1. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    a. New public static method fetchRootItemName(String itemName, Subtype subtype, int activeProjectId) added. It obtains root item name by removing part of name after prefix + digit characters.
    b. New public static method String fetchRootDigits(String itemName, Subtype subtype, int activeProjectId) added. It obtains root digits by removing item prefix and part of name after prefix + digit characters.
    c. New public static method String fetchItemPrefix(Subtype subtype, int activeProjectId) added. It obtains item prefix for a subtype. Returns null if no item prefix defined for the subtype.
    d. New public static method Integer fetchItemNumDigits(Subtype subtype, int activeProjectId) added. It obtains item number of digits for a subtype. Returns null if no item number of digits defined for the subtype.
    e. New public static method Subtype fetchMainSubtypeFromItemName(String itemName, int activeProjectId) added. It obtains main subtype for an item from the item name. Returns null if no main subtype can be found for the item name. The "main" subtype is the one corresponding to the item name prefix, while a suffix might indicate another subtype, e.g. for DNA the main subtype might be Subtype.CASE and the item subtype Subtype.EXTRACT.

comment:108 Changed 5 weeks ago by olle

(In [4908]) Refs #1029. Referral form generation wizards and servlets updated in names of input fields, parameters, and variables to either reflect the current data types or be more generic (type "itemName"), in order not to be misleading in user interface or source code. For parameters and variables, generic names have often been preferred, if the values of the former are to be used as is, e.g. numbers and text strings:

  1. Javascript file baseline_alt_rec.js in resources/personal/ updated in functions submit() and downloadFormBatch(batchType) to use generic variable and parameter names.
  2. JSP file generate-referral-forms.jsp in resources/personal/ updated to use generic variable and parameter names.
  3. Javascript file generate-referral-forms.js in resources/personal/ updated in several functions to use generic variable and parameter names. Some functions used to manage updated values for specific input fields have also been renamed, in order to reflect new names of the corresponding input fields.
  4. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated to use names of variables and parameters, that either reflect the current data types or are more generic.

comment:109 Changed 5 weeks ago by olle

(In [4909]) Refs #1029. Main page layout updated in section "Personal information wizards" to have sub-sections "Referral forms", "Case & consent registration", and "Sample compilation and registration" (new sub-section, but with existing wizard "BASE-line registration"), since this often (but not always) reflect the order in which the corresponding wizards are used for a specific case. Also, new referral form generation wizard for creating an FFPE section order form for a sequential number of FFPE block names:

  1. JSP file index.jsp in resources/ updated:
    a. Section "Personal information wizards" updated to have sub-sections "Referral forms", "Case & consent registration", and "Sample compilation and registration" (new sub-section, but with existing wizard "BASE-line registration"), since this often (but not always) reflect the order in which the corresponding wizards are used for a specific case.
    b. Section "Personal information wizards" updated in sub-section "Referral forms" with new entry "FFPE section order form - sequential FFPE block names" with link to new JSP file ffpe_section_order_form_sequential.jsp in resources/personal/.
  2. New JSP file ffpe_section_order_form_sequential.jsp in resources/personal/ added. It is linked to new javascript file ffpe_section_order_form_sequential.js in resources/personal/, and allows input of start FFPE block name and number of sequential block names to include in the FFPE block order form (a form allows entries for eight FFPE blocks). Curremtly it is assumed, that no more than eight FFPE block names are chosen. Note that this wizard expects FFPE block items to exist for the chosen names, as the PAD number to be added to the form for each FFPE block is obtained form the PAD annotation for the latter.
  3. Javascript file ffpe_section_order_form_sequential.js in resources/personal/ added. It calls servlet ReferralGeneratorServlet with new command "GenerateFfpeSectionOrderForm".
  4. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. New private static final constants REF_FORM_TEMPLATE_FFPE_SECTION_ORDER_FORM and TEMPLATE_FILENAME_START_FFPE_SECTION_ORDER_FORM added.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "UpdateUsedItemIdDigitsList" to obtain number of items from parameter with correct name for FFPE block order form generation. However, it has currently not been decided, if the latter wizard should be allowed to update the used item list, since it relates to FFPE block names instead of referral names.
    c. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with new command "GenerateFfpeSectionOrderForm". It creates a list of FFPE block names from parameter data, and then calls new private method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, List<String> itemIdList, List<String> formTemplateFileList) to create the order form.
    d. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "DownloadFormBatchFile" to obtain number of items from parameter with correct name for FFPE block order form generation. This is needed for the filename to reflect the number of items included in the form.
    e. Private method void initializeRefFormTemplNameStartHashMap() updated to include FFPE section order forms in the hash map.
    f. New method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, List<String> itemIdList, List<String> formTemplateFileList) added. It obtains the referral template file to use and then calls new private method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, List<String> itemIdList, List<String> formTemplateFileList).
    g. New private method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, List<String> itemIdList, List<String> formTemplateFileList) added. It creates the FFPE section order form for the given data.

comment:110 Changed 5 weeks ago by olle

(In [4910]) Refs #1029. FFPE section order form generation updated to create a new form page, when the current page is filled with entries:

  1. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated in private method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, List<String> itemIdList, List<String> formTemplateFileList) to create a new FFPE section order form page, when the current one is filled with entries. Private method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, File pdfFile, List<String> itemIdList, List<String> formTemplateFileList) is called the necessary number of times with a temporary list of FFPE block item names, that never contains more names than entries allowed on a single FFPE section order form page.

comment:111 Changed 5 weeks ago by olle

(In [4911]) Refs #1029. Main page layout updated in section "Personal information wizards", sub-section "Referral forms", by adding new wizard "FFPE block order form". The original creation of the FFPE block order form was part of the base-line registration wizard, but if the user missed to download the referral form PDF file, or has lost it, this wizard allows creation of a new FFPE block order form, without having to redo the base-line registration (the latter would require several items to be deleted before the registration could be performed again). This wizard allows the user to first select the hospital site, and then the complete referral ID. If one has a printout of a previous referral form, with the referral ID as bar code, one might prefer a wizard, where the latter could be input directly. Also note that this wizard expects a case item to exist for the chosen referral ID, as the patient data connected to the latter will be used on the referral form. Also, the default PAD number is the PAD pre-entry annotation for the case item.

  1. JSP file index.jsp in resources/ updated in section "Personal information wizards", sub-section "Referral forms", by adding new wizard "FFPE block order form" with link to new JSP file ffpe_block_order_form.jsp in resources/personal/.
  2. New JSP file ffpe_block_order_form.jsp in resources/personal/ added. It is linked to new javascript file ffpe_block_order_form.js in resources/personal/, and allows input of a referral ID and PAD value to be used on the form.
  3. New javascript file ffpe_block_order_form.js in resources/personal/ added. It calls servlet ReferralGeneratorServlet with existing command "GenerateFfpeReferralForm" to generate a referral form. However, in order to obtain the PAD pre-entry valaue from the case item corresponding to the input referral ID, servlet ReferralGeneratorServlet is called with new command "GetReferralCaseInfo".
  4. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with new command "GetReferralCaseInfo". It obtains value of referral ID from parameter and calls new private method JSONObject fetchReferralCaseInfo(DbControl dc, String referralId) to obtain a JSON object containing the PAD pre-entry for the corresponding case item (if any).
    b. New private method JSONObject fetchReferralCaseInfo(DbControl dc, String referralId) added. It returns a JSONObject containing the PAD pre-entry for the corresponding case item, or null, if no corresponding case item exists.

comment:112 Changed 5 weeks ago by olle

(In [4912]) Refs #1029. Case summary for active project SCAN-B-rec updated to find FFPE block info for the current case and report it below info on blood-related items. As for other items, PAD annotation values are treated as confidential, and requires PatientCurator role to be displayed:

  1. JSP file case_summary_alt_rec.jsp in resources/reports/ updated by adding data section for FFPE block information.
  2. Javascript file case_summary_alt_rec.js in resources/reports/ updated in function caseInfoLoaded(response) by adding FFPE block info.
  3. 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 call public static method List<FfpeBlock> findAllByCaseName(DbControl dc, String name) in data access object class FfpeBlock to obtain information on FFPE block items related to the case item.
    b. New private method void loadFfpeBlockInfo(DbControl dc, FfpeBlock ffpeBlock) added. It loads FFPE block annotation values.

comment:113 Changed 5 weeks ago by olle

Design discussion regarding FFPE block items:

  • An FFPE block item is a subtype of Sample, and as such has the possibility of having many types of annotation values, but only a few might be of use in most projects. Case summary currently reports values for name (item ID), registration date, consent, PAD (if user has PatientCurator role), sampling date, and other path note. Is e.g. "other path note" relevant? It was included because the latter is used for case items, and FFPE blocks are strongly coupled to the former. The list of supported values might need to be modified both by excluding unused data, and adding new data of interest.
Last edited 5 weeks ago by olle (previous) (diff)

comment:114 Changed 5 weeks ago by olle

Design update:

  • Case Summary have previously allowed a personal number to be used as input, instead of a case name, if the user had PatientCurator role, which resulted in display of data for the first case item for the corresponding patient. With the new naming scheme, connections between items of different kinds might be more obscure than before. Case Summary for project SCAN-B-rec should therefore be updated to also allow input of patient ID, referral ID, blood item ID, or FFPE block item ID. In fact, any sample or extract ID should be allowed input, as removal of the suffix part should result in a blood and FFPE block item ID.

comment:115 Changed 5 weeks ago by olle

(In [4913]) Refs #1029. Case summary for active project SCAN-B-rec updated to allow input of personal number, patient ID, referral ID, blood item ID, or FFPE block item ID instead of case ID. Of these, input of personal number and referral ID will only work for users with PatientCurator role. Input of any sample or extract ID will be stripped of the suffix part, and then treated as a blood or FFPE block item ID, depending on the prefix:

  1. Data access object file Patient.java in src/net/sf/basedb/meludi/dao/ updated by adding new public static methods Patient getById(DbControl dc, int patientId), List<Patient> toPatient(Collection<BioSource> biosources), and Patient findByName(DbControl dc, String name).
  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 allow input of personal number, patient ID, referral ID, blood item ID, or FFPE block item ID instead of case ID. Of these, input of personal number and referral ID will only work for users with PatientCurator role. Input of any sample or extract ID will be stripped of the suffix part, and then treated as a blood or FFPE block item ID, depending on the prefix.

comment:116 Changed 5 weeks ago by olle

(In [4914]) Refs #1029. In preparation for an FFPE section order form wizard allowing the user to select FFPE block items in non-sequential order, the servlet command for current version is renamed:

  1. Javascript file ffpe_section_order_form_sequential.js in resources/personal/ updated in function generateReferralForms() to call ReferralGeneratorServlet with command "GenerateFfpeSectionOrderFormSequential" instead of "GenerateFfpeSectionOrderForm".
  2. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) by renaming command "GenerateFfpeSectionOrderForm" to "GenerateFfpeSectionOrderFormSequential".

comment:117 Changed 5 weeks ago by olle

(In [4915]) Refs #1029. Main page layout updated in section "Personal information wizards", sub-section "Referral forms", by adding new wizard "FFPE section order form - selected FFPE blocks" with counter of total number of FFPE blocks after it. The new wizard differs from the previous "FFPE section order form - sequential FFPE block names" in that the new one allows the user to select more freely what FFPE block items to include in the FFPE section order form. The FFPE block names will still be in ascending order, but may have gaps in the number sequence.

  1. JSP file index.jsp in resources/ updated in section "Personal information wizards", sub-section "Referral forms", by adding new wizard "FFPE section order form - selected FFPE blocks" with link to new JSP file ffpe_section_order_form.jsp in resources/personal/.
  2. New JSP file ffpe_section_order_form.jsp in resources/personal/ added. It is linked to new javascript file ffpe_section_order_form.js in resources/personal/, and allows selection of what FFPE block items to include in the order form.
  3. New javascript file ffpe_section_order_form.js in resources/personal/ added. It calls servlet ReferralGeneratorServlet with new command "GenerateFfpeSectionOrderForm" to generate an FFPE section form. A JSONArray of selected FFPE block item data is transferred as value of parameter "ffpeblocklist". When servlet ReferralGeneratorServlet is called with command "DownloadFormBatchFile" in function downloadFormBatch(batchType), the end item name in the selected list of FFPE block items is transferred to the servlet as value of parameter "enditemname".
  4. Java servlet class/file CounterService.java in src/net/sf/basedb/meludi/counter/ updated:
    a. Package private method void count() updated by calling new private method void countFfpeBlocks(DbControl dc, JSONObject json).
    b. New private method void countFfpeBlocks(DbControl dc, JSONObject json) added. It counts the number of FFPE block items in the current project and adds the result to the JSON argument for JSON key "ffpeblocks-all".
  5. Java servlet class/file ReferralGeneratorServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated with new command "GenerateFfpeSectionOrderForm". It obtains a JSONArray of the FFPE block list from parameter "ffpeblocklist", which is then converted to a simple list of FFPE block item names, efter which private method PdfUtil createFfpeSectionOrderForm(DbControl dc, PdfUtil pdfUtil, List<String> itemIdList, List<String> formTemplateFileList) is called to create the FFPE order form.
    b. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) updated for command "DownloadFormBatchFile" to get end item name from value of parameter "enditemname". If this vale is null, the end item name is constructed from the start item name and the number of items, assuming a continuous sequence without gaps.

comment:118 Changed 5 weeks ago by olle

(In [4916]) Refs #1029. Main page layout updated in section "Personal information wizards" by moving entries for wizards creating FFPE block and section order forms from sub-section "Referral forms" to "Sample compilation and registration", since they are used together with other wizards in the latter sub-section:

  1. JSP file index.jsp in resources/ updated in section "Personal information wizards" by moving entries for wizards creating FFPE block and section order forms from sub-section "Referral forms" to "Sample compilation and registration", since they are used together with other wizards in the latter sub-section.
Note: See TracTickets for help on using tickets.