Skip to contents

Returns a data table with the list of study ids from TS where the value of TSVAL for the TSPARMCD 'SDESIGN' is equal to a given study design.
If the studyDesignFilter is empty (null, na or empty string) - all rows for the TSPARMCD 'SDESIGN' are returned.

Usage

getStudiesSDESIGN(
  dbToken,
  studyList = NULL,
  studyDesignFilter = NULL,
  exclusively = TRUE,
  inclUncertain = FALSE,
  noFilterReportUncertain = TRUE
)

Arguments

dbToken

Mandatory.
Token for the open database connection (see initEnvironment).

studyList

Optional, data.table.
A table with the list of studies to process. If empty, all studies in the data base are processed
The table must include at least a column named 'STUDYID'

studyDesignFilter

Mandatory, character. The study design to use as criterion for filtering of the study id values. It can be a single string, a vector or a list of multiple strings.

exclusively

Mandatory, boolean.

  • TRUE: Include studies only for studies with no other study design(s) than included in studyDesignFilter.

  • FALSE: Include all studies with study design matching studyDesignFilter.

inclUncertain

Mandatory, boolean.
Indicates whether study ids with SDESIGN value which are is missing or wrong shall be included or not in the output data table.

noFilterReportUncertain

Mandatory, boolean
Only relevant if the studyDesignFilter is empty.
Indicates if the reason should be included if the SDESIGN cannot be confidently decided for an animal.

Value

The function returns a data.table with columns:

  • STUDYID (character)

  • Additional columns contained in the studyList table (if such an input table is given)

  • SDESIGN (character)
    If multiple TSPARMCD 'SDESIGN' values are extratced for a studies, all the values are merged into a comma separated string.

  • UNCERTAIN_MSG (character)
    Included when parameter inclUncertain=TRUE.
    Contains indication of whether STSTDTC is missing of has wrong format.
    Is NA for rows where SDESIGN is valid.
    A non-empty UNCERTAIN_MSG value generated by this function is merged with non-empty UNCERTAIN_MSG values which may exist in the optional input set of studies specified in studyList - separated by '|'.

  • NOT_VALID_MSG (character)
    Included when parameter noFilterReportUncertain=TRUE.
    In case the SDESIGN cannot be confidently decided, the column contains an indication of the reason.
    Is NA for rows where SDESIGN can be confidently decided.
    A non-empty NOT_VALID_MSG value generated by this function is merged with non-empty NOT_VALID_MSG values which may exist in the input set of studies specified in studyList - separated by '|'.

Details

Extracts the set of studies from TS where the value of TSVAL for the TSPARMCD 'SDESIGN' is equal to a given study design.
The comparison of study design values are done case insensitive.

If a data table with a list of studies is specified in studyList, only the subset of studies included in that set is processed.

If input parameter inclUncertain=TRUE, uncertain animals are included in the output set. These uncertain situations are identified and reported (in column UNCERTAIN_MSG):

  • without any row for TSPARMCD='SDESIGN' or

  • TSVAL doesn't contain a value included in the CDISC CT list 'DESIGN' for TSPARMCD='SDESIGN' (case insensitive comparison)

The same checks are performed and reported in column NOT_VALID_MSG if studyDesignFilter is empty and noFilterReportUncertain=TRUE.

Examples

if (FALSE) {
GetStudyListSDESIGN(myDbToken, 'PARALLEL')
}