getExposures {ccmReportR}R Documentation

Execute a SOQL query against the Exposure object

Description

getExposures() returns a user-defined data from the CCM Exposure object. The Exposure object maps to Exposures on the client-side.

Usage

getExposures(
  type = NULL,
  from = "1990-01-01",
  to = as.character(Sys.time()),
  columns = "Id",
  healthUnit = NULL
)

Arguments

type

Character vector or scalar. Names the exposure type used to filter the query. Defaults to all exposure types. One or more of:

  1. Community

  2. Congregate Living

  3. Household

  4. Institutional

  5. Travel

from

Character scalar. Identifies the start of the date range to include in the query. Defaults to the origin date of CCM.

to

Character scalar. Identifies the end of the date range to include in the query. Defaults to Sys.time() (i.e. today's date and time).

columns

Character scalar or character vector. Names the columns to return from the exposure object. Defaults to Id.

healthUnit

Character vector or scalar. Names the Public Health Unit used to filter the query. getExposures() filters on Exposure PHU. Defaults to NULL (i.e. no health unit filter).

Value

If the query succeeds, a tibble containing columns.

Examples

## Not run: 
Get all community exposures for Durham Region
exposures <- getExposures(
  type = 'Community',
  healthUnit = 'Durham Region Health Department'
)
Specify the data to return. This can be field names or labels
N.B. Names are case sensitive!
exposures <- getExposures(
  columns = c("Id", "Exposure Name", "CCM_Exposure_Setting__c")
)
Limit the data to a specific time period.
exposures <- getExposures(
  from = "2020-12-12",
  to = "2020-12-17"
)

## End(Not run)

[Package ccmReportR version 0.1.0 Index]