% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/first_dose.R
\name{sdtm_first_dose}
\alias{sdtm_first_dose}
\alias{sdtm_first_dose.list}
\alias{sdtm_first_dose.data.frame}
\title{Find the time of the first dose}
\usage{
sdtm_first_dose(x, ...)

\method{sdtm_first_dose}{list}(x, ...)

\method{sdtm_first_dose}{data.frame}(
  x,
  trt_value = NULL,
  trt_col = c("EXTRT", "TRT"),
  dtc_col = c("EXSTDTC", "EXDTC", "STDTC", "DTC"),
  ...
)
}
\arguments{
\item{x}{The EX domain from SDTM or a list with the EX domain in an element
named "EX" that contains the EX domain.}

\item{...}{Arguments passed to methods.}

\item{trt_value}{A vector of treatments (from the \code{trt_col}) that could
be the first dose for a subject.}

\item{trt_col}{A vector of column names to search for \code{trt_value}.  Only
one of these columns can be in \code{x}, and all others are ignored.}

\item{dtc_col}{The column to search for the dosing time.  Only one of these
columns can be in \code{x}, and all others are ignored.}
}
\value{
A data frame with one column for each grouping level as generated by
  \code{dplyr::group_by} (the USUBJID column is used as the grouping if no
  groups are present) and one additional column named "DTC_first_dose"
  containing the date and time of the first dose.
}
\description{
Find the time of the first dose
}
\seealso{
Other Date management and conversion: 
\code{\link{dateany_to_date}()},
\code{\link{generate_dtc}()},
\code{\link{is_ISO8601_calendar_datetime}()},
\code{\link{is_ISO8601_calendar_date}()},
\code{\link{is_ISO8601_ordinal_datetime}()},
\code{\link{is_ISO8601_timezone}()},
\code{\link{is_ISO8601_time}()},
\code{\link{is_ISO8601_week_datetime}()},
\code{\link{make_dy}()},
\code{\link{pattern_ISO8601_any_datetime}()},
\code{\link{pattern_ISO8601_any_date}()},
\code{\link{pattern_ISO8601_calendar_datetime}()},
\code{\link{pattern_ISO8601_calendar_date}()},
\code{\link{pattern_ISO8601_calendar_year}()},
\code{\link{pattern_ISO8601_ordinal_datetime}()},
\code{\link{pattern_ISO8601_ordinal_date}()},
\code{\link{pattern_ISO8601_timezone}()},
\code{\link{pattern_ISO8601_time}()},
\code{\link{pattern_ISO8601_week_datetime}()},
\code{\link{pattern_ISO8601_week_date}()},
\code{\link{sdtm_dtc_to_datetime}()},
\code{\link{sdtm_time_actual}()}
}
\concept{Date management and conversion}
