Get the interviews of one or several interview design(s).
Usage
amber.interviews(
amber,
study = NULL,
interviewDesign = NULL,
campaign = NULL,
from = NULL,
to = NULL,
code = NULL,
identifier = NULL,
state = NULL,
participantValid = NULL,
query = list(),
skip = 0,
limit = 100,
mergeUpdatedFillingDates = FALSE,
df = TRUE
)
Arguments
- amber
An Amber object
- study
Study identifier (name or id), optional.
- interviewDesign
Interview design identifier (name or id), optional.
- campaign
Campaign identifier (name or id), optional.
- from
From date (included), optional
- to
To date (included), optional
- code
Participant interview code, optional
- identifier
Participant identifier, optional
- state
State of the interview: 'initiated', 'in_progress', 'completed'
- participantValid
Participant is valid (logical): active and in the valid date range
- query
A search query
- skip
Number of items to skip
- limit
Max number of items
- mergeUpdatedFillingDates
Set the last update date as being the filling date, if filling date is empty (default is FALSE).
- df
Return a data.frame (default is TRUE)
See also
Other studies functions:
amber.campaign()
,
amber.campaigns()
,
amber.case_report_export()
,
amber.case_report_form()
,
amber.case_report_forms()
,
amber.case_reports()
,
amber.form()
,
amber.form_revision()
,
amber.form_revisions()
,
amber.forms()
,
amber.interview_design()
,
amber.interview_designs()
,
amber.interview_export()
,
amber.interviews_step_actions()
,
amber.interviews_step_data()
,
amber.interviews_steps()
,
amber.participant()
,
amber.participants()
,
amber.studies()
,
amber.study()
Examples
if (FALSE) { # \dontrun{
a <- amber.login("https://amber-demo.obiba.org")
# Find all interviews
amber.interviews(a)
# Find all interviews in a range of time
amber.interviews(a, from = "2022-01-12 00:00", to = "2022-02-13")
# Find all interviews for a specific participant/patient study identifier
amber.interviews(a, identifier = "1231")
# Find all interviews having their identifier matching a regular expression
amber.interviews(a, query = list(`data._id[$search]` = "^12"))
# Find all interviews which form data is equal to some value
# (will not work if the data are encrypted in the database)
amber.interviews(a, query = list(data.PATIENT.ORIGIN_REGION = "xyz"))
# Find interview records of a study
amber.interviews(a, study = "Trauma Registry")
amber.logout(a)
} # }