Skip to content

Commit

Permalink
Merge pull request #2 from zaliqarosli/2020-01-29-CandListOverride
Browse files Browse the repository at this point in the history
[Candidate_list] Override
  • Loading branch information
zaliqarosli committed Jan 30, 2020
2 parents d6564a4 + 75ec084 commit bd82605
Show file tree
Hide file tree
Showing 16 changed files with 1,459 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/candidate_list/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
js/openProfileForm.js
js/columnFormatter.js
js/onLoad.js
js/candidateListIndex.js
js/candidateListIndex.js.map
53 changes: 53 additions & 0 deletions modules/candidate_list/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Candidate List

## Purpose

The candidate list is intended to provide a menu from which users
can access specific candidates while browsing LORIS data.

It is referred to as "Access Profiles" in the LORIS menus.

## Intended Users

The candidate list is primarily used by data entry staff in order
to access the `timepoint_list` module (and `instrument_list`
from there) in order to access the candidate and perform data entry.

Other user groups may use it for filtering candidate profiles for
reviewing candidate data status.

## Scope

The `candidate_list` module provides a list of candidates and links
to other relevant LORIS modules where applicable.

## Permissions

Accessing the `candidate_list` module requires either the `data_entry`
permission and at least one study site, or the `access_all_profiles`
permission.

Users with the `access_all_profiles` permission can see every
candidate in LORIS, while users with only the `data_entry` permission
can exclusively see candidates at study sites where they are affiliated.

## Configurations

The `useEDC` configuration variable has a similar function for the
"EDC" ("EDC" stands for "Expected Date Of Confinement" which refers
to the pregnancy due date) column.

## Interactions with LORIS

The "Scan Done" column indicates whether or not a scan was performed
for that candidate. When a scan was performed (i.e. it has the value
"Y"), clicking the table cell links to the `imaging_browser` module
prefiltered for that candidate.

Clicking on the cell in the PSCID column takes the user to the
`timepoint_list` page for that candidate. The link is only clickable
if the user does *not* have the `data_entry` permission. For users
who have the `data_entry` permission, a separate form appears for
the user to type the CandID/PSCID combo in order to access the
candidate. This is intended to prevent data entry errors caused
by accidentally clicking on the wrong row before doing data entry.
66 changes: 66 additions & 0 deletions modules/candidate_list/help/candidate_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Access Profile

In many cases, the candidate's profile will already be created. The
Access Profile module, also found under the Candidate menu, allows
the user to efficiently search for an existing candidate and access
the related data.

There are 3 main ways to search for a candidate:

## Option 1: Using PSCID and DCCID

A specific candidate profile can be accessed directly by entering
both the PSCID and the DCCID in the white boxes to the right of the
screen and then clicking the button "Open Profile". In a narrow
browser window or mobile device the PSCID and DCCID fields are found
below the selection filter.

## Option 2: Basic Filter Options

Users may search for particular candidates by selecting from the
"Basic" filter options. Users may select from drop-down select
boxes, and then click "Show Data" to view a list of candidates. If
only a fragment of the candidate ID is known, the user may search
for the profile by entering the known fragment, and then click show
data to find the appropriate profile.

For example, searching with "531" under "DCCID" will retrieve the
profile of candidate DCC1107 (with full DCCID 531861).

## Option 3: Advanced Filter Options

More detailed filter options can be accessed by clicking on the
"Advanced" button. Users will select from a number of drop-down
select boxes including Site, Project, Subproject, Biological Sex,
etc., and then click "Show Data" to view a list of candidates. To
return to "Basic" selection filters please select "Basic".

To view a specific candidate's dataset, click on the candidate's
PSCID found in blue text under the "PSCID" column. At the top of
the table, column headings will appear underlined and show a click
icon when the user hovers over the heading title. Data can be sorted
in ascending order according to a given column by clicking on the
column heading (i.e. DCCID, Site, PSCID etc.), and by clicking
again, in descending order. In both standard and mobile view, the
selection filter can be hidden by selecting the upward arrow icon,
allowing easier viewing of the data. Once in this view, users can
click on the downward arrow icon to display the features of the
selection filter once again. This feature applies to all pages that
include a Selection Filter.

Note that the form remembers previously selected data such that
when the user returns to the "Access Profile" page, the selection
filter will automatically select profiles according to the last
selection settings. Depending on the magnitude of the search, there
may be several pages of search results for the user to look through.
If "No candidates found" appears, this indicates no profiles matched
the information specified by the selection filter(s).

When on a mobile device or narrow browser window, the table will
have a slider at the bottom of the table, facilitating scrolling
of the data. The user may also hover or click the arrows that flank
the table to see the remainder of the table. When scrolling through
search results, the PSCID column will freeze and remain displayed
on the lefthand side, to allow for easy reference and access to
relevant information.

1 change: 1 addition & 0 deletions modules/candidate_list/js/candidateListIndex.js.map

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions modules/candidate_list/js/candidate_list_helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*global document: false, $: false, window: false, unescape: false, Option: false,isElementsSet, alert*/
function hideFilter(obj) {
'use strict';

var heading = $(obj);
var arrow = $(obj).children('.arrow');
if (heading.hasClass('panel-collapsed')) {
// expand the panel
heading.parents('.panel').find('.panel-body').slideDown();
heading.removeClass('panel-collapsed');
arrow.removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
} else {
// collapse the panel
heading.parents('.panel').find('.panel-body').slideUp();
heading.addClass('panel-collapsed');
arrow.removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
}
}
function toggleMe() {
"use strict";
$("#advanced-label").toggle();
$(".advancedOptions").toggle();
$(".advanced-buttons").toggle();
}


$(function(){
$('input[name=dob]').datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true
});
$('input[name=edc]').datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true
});
});
1 change: 1 addition & 0 deletions modules/candidate_list/js/onLoad.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bd82605

Please # to comment.