Changeset 4988


Ignore:
Timestamp:
Sep 28, 2018, 1:28:26 PM (4 years ago)
Author:
olle
Message:

Refs #1029. Case summary for active project SCAN-B-rec updated to allow input of blood tube label name instead of case ID. Since the tube label name contains the referral ID plus a suffix, it will only work for users with PatientCurator role:

  1. 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 blood tube label name instead of case ID. Since the tube label name contains the referral ID plus a suffix, it will only work for users with PatientCurator role. The check for referral ID input is updated by removing any suffix.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.meludi/trunk/src/net/sf/basedb/meludi/servlet/CaseSummaryServlet.java

    r4987 r4988  
    134134            }
    135135          }
    136           // Check if input string is referral ID
     136          // Check if input string is referral ID or blood tube label
    137137          if (theCase == null)
    138138          {
     
    142142              try
    143143              {
    144                 theCase = Case.findByReferralId(dc, itemName);
     144                // Remove optional suffix starting with dot "." if blood tube label
     145                String baseName = "" + itemName;
     146                int dotIndex = itemName.indexOf(".");
     147                if (dotIndex >= 0)
     148                {
     149                  // Remove part starting with first dot
     150                  baseName = baseName.substring(0, dotIndex);
     151                }
     152                theCase = Case.findByReferralId(dc, baseName);
    145153              }
    146154              catch (PermissionDeniedException | ItemNotFoundException ex)
Note: See TracChangeset for help on using the changeset viewer.