Opened 7 years ago

Closed 2 years ago

#1029 closed task (fixed)

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

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

Description (last modified by olle)

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

Initially the following should be added:

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

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

Change History (318)

comment:1 by olle, 7 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 7 years ago

Traceability note:

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

comment:3 by olle, 7 years ago

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

  1. Version number changed to "1.6.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file meludi_quarter_month_report_generator.js in resources/reports/ updated.
    e. Javascript file samplereportgenerator.js in resources/reports/ updated.
    f. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.
Last edited 7 years ago by olle (previous) (diff)

comment:4 by olle, 7 years ago

Traceability note:

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

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

comment:5 by olle, 7 years ago

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

comment:6 by olle, 7 years ago

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

comment:7 by olle, 7 years ago

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

comment:8 by olle, 7 years ago

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

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

comment:9 by olle, 7 years ago

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

comment:10 by olle, 7 years ago

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

comment:11 by olle, 7 years ago

Design update:

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

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <uses-site-prefix>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method Boolean fetchUsesSitePrefix(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration value "uses-site-prefix" for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects.
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variable and corresponding public accessor methods for new configuration value.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration value for flag indicating use of site prefix for active project in returned JSONObject for JSON key "usesSitePrefix".

comment:12 by olle, 7 years ago

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

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <uses-site-prefix>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated with new public static method Boolean fetchUsesSitePrefix(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration value "uses-site-prefix" for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects.
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variable and corresponding public accessor methods for new configuration value.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration value for flag indicating use of site prefix for active project in returned JSONObject for JSON key "usesSitePrefix".

comment:13 by olle, 7 years ago

Discussion regarding site prefix:

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

Design discussion.

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

comment:14 by olle, 7 years ago

Design update:

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

comment:15 by olle, 7 years ago

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

  1. MeLuDI configuration XML file template meludi-config.xml in config/ updated in XML block <projects> with new XML tag <site-prefix-hash-list>.
  2. Java class/file Meludi.java in src/net/sf/based/meludi/ updated:
    1. New public static method String fetchSitePrefixHashList(int activeProjectId). It calls private static method ProjectConfig fetchProjectConfig(int activeProjectId) to obtain a ProjectConfig object, from which the desired configuration value is returned.
    2. New public static method HashMap<String,String> fetchSitePrefixSiteKeyHashMap(int activeProjectId). It returns a site prefix/site key hash map for the desired project.
    3. New public static method HashMap<String,String> HashMap<String,String> fetchSiteKeySitePrefixHashMap(int activeProjectId). It returns a site key/site prefix hash map for the desired project.
  3. Java class/file MeludiConfiguration in src/net/sf/based/meludi/ updated in private method void fetchConfiguration() to obtain new configuration value "site-prefix-hash-list" for each project from the meludi-config.xml configuration file, and store the values in new instance variables in ProjectConfig objects for the projects.
  4. Java data access object class/file ProjectConfig.java in src/net/sf/based/meludi/dao/ updated with new private instance variable and corresponding public accessor methods for new configuration value.
  5. Java servlet class/file SessionServlet.java in src/net/sf/based/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetConfiguration" to store new configuration value for site prefix/site key hash list for active project in returned JSONObject for JSON key "sitePrefixHashList".

comment:16 by olle, 7 years ago

Design update:

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

comment:17 by olle, 7 years ago

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

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

comment:18 by olle, 7 years ago

Design update:

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

comment:19 by olle, 7 years ago

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

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

comment:20 by olle, 7 years ago

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

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

comment:21 by olle, 7 years ago

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

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

comment:22 by olle, 7 years ago

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

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