Class Index | File Index

Classes


Namespace LABKEY.Specimen

Specimen static class to retrieve and update specimen and specimen request information.

Additional Documentation:


Defined in: Specimen.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
LABKEY.Specimen.addSamplesToRequest(config)
Adds multiple vials to a request based on an array of hash codes uniquely identifying the primary specimens.
<static>  
LABKEY.Specimen.addVialsToRequest(config)
Adds multiple vials to a request based on an array of unique unique vial IDs.
<static>  
LABKEY.Specimen.cancelRequest(config)
Completely and permanently cancels a request.
<static>  
LABKEY.Specimen.getOpenRequests(config)
Retrieves an array of open (non-final) specimen requests, including all requests that are in "shopping cart" status as well as those that have been submitted for processing but are not yet complete.
<static>  
LABKEY.Specimen.getProvidingLocations(config)
Retrieves an array of locations that could provide vials from all identified primary specimens.
<static>  
LABKEY.Specimen.getRepositories(config)
Retrieves an array of locations that are identified as specimen repositories.
<static>  
LABKEY.Specimen.getRequest(config)
Retrieves a specimen request for a given specimen request ID.
<static>  
LABKEY.Specimen.getSpecimenWebPartGroups(config)
Retrieves a specimen request for a given specimen request ID.
<static>  
LABKEY.Specimen.getVialsByRowId(config)
Retrieves an array of vials that correspond to an array of unique vial row ids.
<static>  
LABKEY.Specimen.getVialTypeSummary(config)
Retrieves a specimen request for a given specimen request ID.
<static>  
LABKEY.Specimen.removeVialsFromRequest(config)
Removes multiple vials from a request based on an array of vial row IDs.
Namespace Detail
LABKEY.Specimen
Method Detail
<static> LABKEY.Specimen.addSamplesToRequest(config)
Adds multiple vials to a request based on an array of hash codes uniquely identifying the primary specimens. The vials will be selected based on availability and current location. If called by a non-administrator, the target request must be owned by the calling user, and the request must be in an open (not yet submitted) state. Administrators may add vials to any request at any time.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "addSampleToRequest" function executes successfully. Will be called with a single argument LABKEY.Specimen.Request, containing the newly modified request.
{int} config.requestId
The unique integer identifier of the target request.
{String[]} config.specimenHashArray
An array of hash codes identifying the primary specimens to add to the target request.
{int} config.preferredLocation
The unique ID of the preferred providing location. If more than on providing location is possible, and if the request does not already contain vials uniquely identifying one of these providing locations, this parameter must be provided.
{Function} config.failure Optional
Function called when execution of the "addSampleToRequest" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used.

<static> LABKEY.Specimen.addVialsToRequest(config)
Adds multiple vials to a request based on an array of unique unique vial IDs. If called by a non-administrator, the target request must be owned by the calling user, and the request must be in an open (not yet submitted) state. Administrators may add vials to any request at any time.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "addVialToRequest" function executes successfully. Will be called with a single argument LABKEY.Specimen.Request, containing the newly modified request.
{int} config.requestId
The unique integer identifier of the target request.
{Array} config.vialIdArray
An array of global unique vial IDs to add to the target request.
{String} config.idType Optional
A string constant indicating how vials are identified. This must be either "GlobalUniqueId" or "RowId". If undefined, "GlobalUniqueId" is assumed.
{Function} config.failure Optional
Function called when execution of the "addVialToRequest" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used.

<static> LABKEY.Specimen.cancelRequest(config)
Completely and permanently cancels a request. THIS ACTION CANNOT BE UNDONE. If called by a non-administrator, the target request must be owned by the calling user, and the request must be in an open (not yet submitted) state. Administrators may delete requests at any time.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "addVialToRequest" function executes successfully. No arguments are provided.
{int} config.requestId
The unique integer identifier of the target request.
{Function} config.failure Optional
Function called when execution of the "addVialToRequest" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used.

<static> LABKEY.Specimen.getOpenRequests(config)
Retrieves an array of open (non-final) specimen requests, including all requests that are in "shopping cart" status as well as those that have been submitted for processing but are not yet complete.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "getOpenRequests" function executes successfully. Will be called with the argument: LABKEY.Specimen.Request[].
{Boolean} config.allUsers Optional
Indicates whether to retrieve open requests for all users, rather than just those created by the current user. If not supplied, requests will be returned based on the user's permission. Administrators will see all open requests, while non-admin users will only see those requests that they have created.
{Function} config.failure Optional
Function called when execution of the "getOpenRequests" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used. Retrieves an array of open requests within the specified study.

<static> LABKEY.Specimen.getProvidingLocations(config)
Retrieves an array of locations that could provide vials from all identified primary specimens.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "getProvidingLocations" function executes successfully. Will be called with the argument: LABKEY.Specimen.Location[]..
{String[]} config.specimenHashArray
An array of hash codes identifying the primary specimens to be provided.
{Function} config.failure Optional
Function called when execution of the "getProvidingLocations" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used.

<static> LABKEY.Specimen.getRepositories(config)
Retrieves an array of locations that are identified as specimen repositories.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "getAll" function executes successfully. Will be called with the argument: LABKEY.Specimen.Location[].
{Function} config.failure Optional
Function called when execution of the "getRespositories" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used. Retrieves an array of all locations identified as repositories within the specified study.

<static> LABKEY.Specimen.getRequest(config)
Retrieves a specimen request for a given specimen request ID.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "getRequest" function executes successfully. Will be called with the argument: LABKEY.Specimen.Request.
{int} config.requestId
The integer ID of the desired specimen request
{Function} config.failure Optional
Function called when execution of the "getOpenRequests" function fails.
{String} config.containerPath Optional
The container path in which the relevant study is defined. If not supplied, the current container path will be used.

<static> LABKEY.Specimen.getSpecimenWebPartGroups(config)
Retrieves a specimen request for a given specimen request ID.
Parameters:
{Object} config
An object which contains the following configuration properties.
{Function} config.success
Required. Function called when the "getSpecimenWebPartGroups" function executes successfully. Will be called with a single argument with the following top-level properties:
  • groupings: [group...]
The value of this property is an array of group objects, each with two properties:
  • name: the text label of the column.
  • values: the value of this property is an array ofobjects with four properties:
    • label: the text label of the specimen type.
    • count: the number of vials of this type. This count will reflect any parent types as well (see 'children' below).
    • url: the URL that can be used to access the list of these vials.
    • group: an optional sub-group.
  • {Function} config.failure Optional
    Function called when execution of the "getOpenRequests" function fails.
    {String} config.containerPath Optional
    The container path in which the relevant study is defined. If not supplied, the current container path will be used.

    <static> LABKEY.Specimen.getVialsByRowId(config)
    Retrieves an array of vials that correspond to an array of unique vial row ids.
    Parameters:
    {Object} config
    An object which contains the following configuration properties.
    {Function} config.success
    Required. Function called when the "getVialsByRowId" function executes successfully. Will be called with the argument: LABKEY.Specimen.Vial[].
    {Function} config.vialRowIdArray
    An array of integer vial row IDs.
    {Function} config.failure Optional
    Function called when execution of the "getVialsByRowId" function fails.
    {String} config.containerPath Optional
    The container path in which the relevant study is defined. If not supplied, the current container path will be used. Retrieves an array of all locations identified as repositories within the specified study.

    <static> LABKEY.Specimen.getVialTypeSummary(config)
    Retrieves a specimen request for a given specimen request ID.
    Parameters:
    {Object} config
    An object which contains the following configuration properties.
    {Function} config.success
    Required. Function called when the "getVialTypeSummary" function executes successfully. Will be called with a single argument with the following top-level properties:
    • primaryTypes
    • derivativeTypes
    • additiveTypes
    The value of each of these properties is an array of objects with four properties:
    • label: the text label of the specimen type.
    • count: the number of vials of this type. This count will reflect any parent types as well (see 'children' below).
    • url: the URL that can be used to access the list of these vials.
    • children: an array of sub-types. May be undefined if no child types are available. If present, each child array element has the same properties described in this list.
    {Function} config.failure Optional
    Function called when execution of the "getOpenRequests" function fails.
    {String} config.containerPath Optional
    The container path in which the relevant study is defined. If not supplied, the current container path will be used.

    <static> LABKEY.Specimen.removeVialsFromRequest(config)
    Removes multiple vials from a request based on an array of vial row IDs. If called by a non-administrator, the target request must be owned by the calling user, and the request must be in an open (not yet submitted) state. Administrators may remove vials from any request at any time.
    Parameters:
    {Object} config
    An object which contains the following configuration properties.
    {Function} config.success
    Required. Function called when the "removeVialFromRequest" function executes successfully. Will be called with a single argument LABKEY.Specimen.Request, containing the newly modified request.
    {int} config.requestId
    The unique integer identifier of the target request.
    {String[]} config.vialIdArray
    An array of global unique vial IDs to remove from the target request.
    {String} config.idType Optional
    A string constant indicating how vials are identified. This must be either "GlobalUniqueId" or "RowId". If undefined, "GlobalUniqueId" is assumed.
    {Function} config.failure Optional
    Function called when execution of the "removeVialFromRequest" function fails.
    {String} config.containerPath Optional
    The container path in which the relevant study is defined. If not supplied, the current container path will be used.

    Documentation generated by JsDoc Toolkit 2.3.2 on Thu Mar 16 2017 20:36:36 GMT-0000 (UTC)