An S4 class to represent episodes of antimicrobial therapy
TherapyEpisode(...)
TherapyEpisode.DBIConnection(conn, id, extend_table_start = NULL)
TherapyEpisode.MedicationRequest(x, extend_table_start = NULL)
generic signature
a database connection
a vector of one or several therapy episode identifiers (from
database field drug_therapy_episodes.therapy_id
as generated by
load_medications()
or
create_therapy_episodes()
)
optional integer to specify an earlier start
(in hours) in the longitudinal table of the object. For example, a value of
6 means the longitudinal table will begin 6 hours prior to the start of
antimicrobial therapy. The value must be a positive number. Decimal numbers
will be rounded up to the nearest integer. The default is NULL
.
an object of class MedicationRequest
id
a therapy episode identifier
conn
a database connection
record
a tbl_sql
for the corresponding database record
longitudinal_table
a tbl_sql
for the longitudinal therapy table