[Loris-dev] Setting up LORIS instance -- help with PSCID

Christine Rogers christine.rogers at mcgill.ca
Thu Mar 9 13:42:07 EST 2017


Hi Michael,
Thanks for your question - since this is a technical/setup issue, I'm
responding to you as well as the Loris-dev listserv for any further input
from the Loris team and community, since another Loris project out there
may have already implemented the solution you're looking for.

I'm setting up a LORIS instance and am having trouble setting up the rules
> for the PSCID. I'd like the PSCID to have the structure:
> $projectname_$sitename_4digitcode (eg. AAA01_CDE_0001). Is there a way to
> do this in the config.xml?
> This is what I have currently. Is there a way to call the "Name" column in
> Project and the "Alias" column in psc to get all the site codes (instead of
> siteAbbrev which only lets you register candidates from your site)?
> <PSCID>
>     <generation>user</generation>
>     <structure>
>         <seq type="????" />
>         <seq type="static" "_"/>
>         <seq type="set" CDE|FGH|IJK|LMN/>
>         <seq type="static" "_"/>
>         <seq type="numeric" minLength="4"/>
>     </structure>
> </PSCID>


Someone with a little coding knowledge can easily customize and adapt the
Candidate:validatePSCID()
<https://github.com/aces/Loris/blob/17.0-dev/php/libraries/Candidate.class.inc#L797>
and Utility class functions
<https://github.com/aces/Loris/blob/17.0-dev/php/libraries/Utility.class.inc#L377>
that check for a specific pattern in user-input PSCID formatting.

E.g. you could adapt these functions to check all site abbreviations (or
Alias), and could define in config.xml a new <seq> type for project, and
add a little code to validate this (across all valid projects).

Also note we're currently adapting the User-Site relationship
<https://github.com/aces/Loris/pull/2468> for Loris 17.1 to allow users to
register a candidate at any site the user is appropriately attached to.

Best,
Christine

-- 
christine.rogers at mcgill.ca
LORIS data systems | loris.ca
McGill Centre for Integrative Neuroscience | MCIN.ca
McConnell Brain Imaging Centre
Montreal Neurological Institute
McGill University | Montreal | Canada


On Wed, Mar 8, 2017 at 3:59 PM, Michael Joseph> wrote:

> Hi all,
>
> I'm setting up a LORIS instance and am having trouble setting up the rules
> for the PSCID. I'd like the PSCID to have the structure:
> $projectname_$sitename_4digitcode (eg. AAA01_CDE_0001). Is there a way to
> do this in the config.xml?
>
> This is what I have currently. Is there a way to call the "Name" column in
> Project and the "Alias" column in psc to get all the site codes (instead of
> siteAbbrev which only lets you register candidates from your site)?
>
> <PSCID>
>     <generation>user</generation>
>     <structure>
>         <seq type="????" />
>         <seq type="static" "_"/>
>         <seq type="set" CDE|FGH|IJK|LMN/>
>         <seq type="static" "_"/>
>         <seq type="numeric" minLength="4"/>
>     </structure>
> </PSCID>
>
> Thanks,
> Michael
>
> ------------------------------
>
> This e-mail may contain confidential, personal and/or health
> information(information which may be subject to legal restrictions on use,
> retention and/or disclosure) for the sole use of the intended recipient.
> Any review or distribution by anyone other than the person for whom it was
> originally intended is strictly prohibited. If you have received this
> e-mail in error, please contact the sender and delete all copies.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20170309/ae410034/attachment.html>


More information about the Loris-dev mailing list