View source: R/getStudiesSTSTDTC.R
getStudiesSTSTDTC | R Documentation |
Returns a data table with the list of study ids from TS where the value of
TSVAL for the TSPARMCD 'STSTDTC' is within a a given date interval.
If the fromDTC
andtoDTC
are empty (null, na or empty string)
all rows for the TSPARMCD 'STSTDTC' are returned.
getStudiesSTSTDTC( dbToken, studyList = NULL, fromDTC = NULL, toDTC = NULL, inclUncertain = FALSE, noFilterReportUncertain = TRUE )
dbToken |
Mandatory. |
studyList |
Optional. |
fromDTC |
Optional (either or both of |
toDTC |
Optional (either or both of |
inclUncertain |
Mandatory, boolean. |
noFilterReportUncertain |
Mandatory, boolean |
Extracts the set of study ids from TS where the value of TSVAL for the
TSPARMCD 'STSTDTC' falls within a specified start/end date interval in IS8601
format (input parameters fromDTC
/toDTC
).
Both complete and incomplete input start/end dates can be handled.
If only a year is specified - the date set to the first of January that year.
If only a year and month is specified - the date set to the first day in that month.
If a time part is included in a specified input start/end date, it is ignored.
If both a start and end input date are specified - all the STUDYID values
from TS where TSVAL for TSPARMCD 'STSTDTC' is with the interval of the
specified start/end date interval are extracted and returned - including the
values equal to the start/end dates. are included.
If only a start input date is specified - all the STUDYID values from TS
where TSVAL for TSPARMCD 'STSTDTC' is equal to or later than the input date
are extracted and returned.
If only an end date is specified - all the STUDYID values from TS where TSVAL
for TSPARMCD 'STSTDTC' is equal to or earlier than the are date are extracted
and returned.
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 inclUncertain
is TRUE, uncertain studies are included in the
output set. These uncertain situations are identified and reported (in column
UNCERTAIN_MSG):
TS contains now row for TSPARMCD='STSTDTC'
TSVAL contains an invalid ISO8601 date format for TSPARMCD='STSTDTC'
The same checks are performed and reported in column NOT_VALID_MSG if
fromDTC
and toDTC
are empty and
noFilterReportUncertain=TRUE
.
The function return a data.table with columns:
STUDYID (character)
Additional columns contained in the studyList
table (if such an input
table is given)
STSTDTC (character - ISO8601 format)
UNCERTAIN_MSG (character)
Only 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 STSTDTC cannot be confidently decided, the column contains an
indication of the reason.
Is NA for rows where STSTDTC 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 '|'.
## Not run: GetStudyListSTSTDTC(myDbToken, allSTudies, '2018','2020') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.