Opened 11 years ago

Closed 11 years ago

#534 closed enhancement (fixed)

Show case summary if given a personal number

Reported by: Nicklas Nordborg Owned by: olle
Priority: major Milestone: Reggie v2.14
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

The current case summary implementation requries a valid Scan-B case number as a starting point. It would be useful to also be able to start with a personal number.

It should be fairly easy to detect if a value is more likely to be a personal number than a case number. Since patients may have multiple cases associated with them we need to select one of the cases to display. There is already functionality for listing all cases associated with a patient (#477), so this should not be an issue.

Change History (7)

comment:1 by olle, 11 years ago

Owner: changed from Nicklas Nordborg to olle

comment:2 by olle, 11 years ago

Status: newassigned

Ticket accepted.

comment:3 by olle, 11 years ago

Traceability note:

  • The case summary was introduced in Ticket #450 (Show information about a case/patient).
  • Case summary was updated with print function in Ticket #470 (Add 'Print version' functionality to the 'Case summary' feature).
  • Case summary was updated with library preparation data in Ticket #471 (Add library preparation information to the 'Case summary' feature).
  • Case summary was updated in Ticket #477 (Display list of other case numbers associated with a patient in the 'Case summary').
  • Case summary was updated in Ticket #521 (Add DNA and FlowThrough information to Case summary page).
  • Case summary was updated in Ticket #523 (Show/hide detail rows in Case summary).

comment:4 by olle, 11 years ago

Design discussion.

  • Using a personal number to get a case summary will only work, if the user has sufficient permissions to perform such a search (normally Administrator or PatientCurator).
  • Trying to use a personal number to get a case summary when the user does not have sufficient permissions to do so, should result in a message that no data is found, since this is consistent with current BASE functionality.
  • The same input field as used for entering a case name for a case summary will be used for entering a personal number.
  • If the input string is not a valid case name, a search for a patient record will be made with the input string used as a potential personal number. If a patient record is found, a new search is performed to find a case for the patient. If more than one case are found, the first found case is used.
  • Even if a user has sufficient permission to perform a search using a personal number, the latter should not be displayed in a prominent way on the screen. The input case name is normally displayed in the header line of the web page. If a case summary from an input personal number is displayed, the header line should be modified to show the case name instead of the personal number. However, if no case is found for an input string, that might be a personal number, the latter is shown in the header line, since no sensitive data is displayed on the page.
Version 0, edited 11 years ago by olle (next)

comment:5 by olle, 11 years ago

Design implementation:

The case summary is implemented by JSP script case_summary.jsp in reggie/resources/reports/ and Java servlet CaseSummaryServlet.java in reggie/src/net/sf/basedb/reggie/servlet/.

  1. Java servlet CaseSummaryServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ updates:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) should be updated for command "GetCaseInfo" to call new private method boolean caseNameIsValid(String caseName, boolean allowSuffix) to check if the input string is a valid case name, and if not, perform a search for a patient record with the input string used as a potential personal number. If a patient record is found, a new search is performed to find a case for the patient. If more than one case are found, the first found case is used. If a case name is found from an input personal number, case and patient data that has already been found, should not be obtained again from the case name, in order to speed up the database search.
    b. New private method boolean caseNameIsValid(String caseName, boolean allowSuffix) added. It checks if the input string is a 7-digit value + optional 'C' suffix.

  2. JSP script case_summary.jsp in reggie/resources/reports/ updates:
    a. Variable caseName is made a global variable, in order for its value to be accessible for the print dialog header line, in case a personal number is used as input.
    b. Function init() should be updated to used the case name returned from the servlet request, as the former may have been found from an input personal number. Header texts for main web page and pop-up window should be updated to use the potentially changed case name.
    c. Function goPrint() should update the header text in the print dialog to use the potentially changed case name.

comment:6 by olle, 11 years ago

(In [2144]) Refs #534. Case summary updated to use an input personal number instead of a case name, provided the user has sufficient permissions to do so:

  1. Java servlet CaseSummaryServlet.java in reggie/src/net/sf/basedb/reggie/servlet/ updates:
    a. Protected method void doGet(HttpServletRequest req, HttpServletResponse resp) should be updated for command "GetCaseInfo" to call new private method boolean caseNameIsValid(String caseName, boolean allowSuffix) to check if the input string is a valid case name, and if not, perform a search for a patient record with the input string used as a potential personal number. If a patient record is found, a new search is performed to find a case for the patient. If more than one case are found, the first found case is used. If a case name is found from an input personal number, case and patient data that has already been found, should not be obtained again from the case name, in order to speed up the database search.
    b. New private method boolean caseNameIsValid(String caseName, boolean allowSuffix) added. It checks if the input string is a 7-digit value + optional 'C' suffix.

  2. JSP script case_summary.jsp in reggie/resources/reports/ updates:
    a. Variable caseName is made a global variable, in order for its value to be accessible for the print dialog header line, in case a personal number is used as input.
    b. Function init() should be updated to used the case name returned from the servlet request, as the former may have been found from an input personal number. Header texts for main web page and pop-up window should be updated to use the potentially changed case name.
    c. Function goPrint() should update the header text in the print dialog to use the potentially changed case name.

  3. Java data access object Case.java in reggie/src/net/sf/basedb/reggie/dao/ updated in JavaDoc comment for public static method List<Case> findByPatient(DbControl dc, Patient patient) to note that the returned list is sorted in ascending order after case name.

comment:7 by olle, 11 years ago

Resolution: fixed
Status: assignedclosed

Ticket closed as the requested functionality has been added.

Note: See TracTickets for help on using tickets.