amber.interviews {amberr}R Documentation

Get the interview records

Description

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,
  query = list(),
  skip = 0,
  limit = 100,
  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

Patient/participant identifier, optional

query

A search query

skip

Number of items to skip

limit

Max number of items

df

Return a data.frame (default is TRUE)

Value

A data.frame (or a named list of raw results when 'df' is FALSE)

See Also

Other studies functions: amber.campaigns(), amber.campaign(), amber.case_report_export(), amber.case_report_forms(), amber.case_report_form(), amber.case_reports(), amber.form_revisions(), amber.form_revision(), amber.forms(), amber.form(), amber.interview_designs(), amber.interview_design(), amber.interview_export(), amber.participants(), amber.participant(), amber.studies(), amber.study()

Examples

## Not run: 
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)

## End(Not run)

[Package amberr version 1.0.0 Index]