From d7975adc931462ba8056c7fc005475a9643e41a0 Mon Sep 17 00:00:00 2001 From: Martin Lavallee <44976592+mdlavallee92@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:41:28 -0400 Subject: [PATCH] update documentation and namespace --- NAMESPACE | 1 - man/atLeast.Rd | 2 +- man/atMost.Rd | 2 +- man/censoringEvents.Rd | 3 +++ man/cohort.Rd | 3 +++ man/continuousObservation.Rd | 3 +++ man/daysOfSupply.Rd | 3 +++ man/drugExit.Rd | 3 +++ man/drugQuantity.Rd | 3 +++ man/drugRefills.Rd | 3 +++ man/duringInterval.Rd | 3 +++ man/endDate.Rd | 3 +++ man/era.Rd | 3 +++ man/eventEnds.Rd | 3 +++ man/eventStarts.Rd | 3 +++ man/exactly.Rd | 3 +++ man/fixedExit.Rd | 3 +++ man/generateCaprTemplate.Rd | 16 ---------------- man/makeCohortSet.Rd | 3 +++ man/nestedWithAll.Rd | 3 +++ man/nestedWithAny.Rd | 3 +++ man/nestedWithAtLeast.Rd | 3 +++ man/nestedWithAtMost.Rd | 3 +++ man/observationExit.Rd | 3 +++ man/rangeHigh.Rd | 3 +++ man/rangeLow.Rd | 3 +++ man/startDate.Rd | 3 +++ man/toCirce.Rd | 3 +++ man/valueAsNumber.Rd | 3 +++ man/withAll.Rd | 3 +++ man/withAny.Rd | 3 +++ man/withAtLeast.Rd | 3 +++ man/withAtMost.Rd | 3 +++ 33 files changed, 89 insertions(+), 19 deletions(-) delete mode 100644 man/generateCaprTemplate.Rd diff --git a/NAMESPACE b/NAMESPACE index bbc0791b..1efdf5c8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -36,7 +36,6 @@ export(exit) export(female) export(firstOccurrence) export(fixedExit) -export(generateCaprTemplate) export(getConceptSetDetails) export(gt) export(gte) diff --git a/man/atLeast.Rd b/man/atLeast.Rd index 8348ec3f..8c516e4f 100644 --- a/man/atLeast.Rd +++ b/man/atLeast.Rd @@ -15,7 +15,7 @@ atLeast(x, query, aperture = duringInterval(eventStarts(-Inf, Inf))) relative to the index event} } \value{ -A criteria that can be used in a cohort definition +A criteria that can be used in a cohort definition specifying satisfaction of at least x instances of a query } \description{ Function to enumerate an minimal count of occurrences diff --git a/man/atMost.Rd b/man/atMost.Rd index afdad0ed..d3d09be5 100644 --- a/man/atMost.Rd +++ b/man/atMost.Rd @@ -15,7 +15,7 @@ atMost(x, query, aperture = duringInterval(eventStarts(-Inf, Inf))) is to be observed relative to the index event} } \value{ -A criteria that can be used in a cohort definition +A criteria that can be used in a cohort definition specifying satisfaction of at most x instances of a query } \description{ Function to enumerate a maximum count of occurrences diff --git a/man/censoringEvents.Rd b/man/censoringEvents.Rd index 77d1c4f3..21fcfc60 100644 --- a/man/censoringEvents.Rd +++ b/man/censoringEvents.Rd @@ -9,6 +9,9 @@ censoringEvents(...) \arguments{ \item{...}{a list of Capr query objects that are used as censoring events} } +\value{ +a censoring criteria S4 object used to define the censoring events of the cohort definition +} \description{ Constructor for a set of censoring events } diff --git a/man/cohort.Rd b/man/cohort.Rd index 71af9325..90dab320 100644 --- a/man/cohort.Rd +++ b/man/cohort.Rd @@ -15,6 +15,9 @@ cohort(entry, attrition = NULL, exit = NULL, era = NULL) \item{era}{Cohort era (collapse) logic created with the `cohortEra` function} } +\value{ +an S4 Cohort class object describing the cohort definiton +} \description{ Function that creates a cohort object } diff --git a/man/continuousObservation.Rd b/man/continuousObservation.Rd index 4aaf59b7..ab3f1622 100644 --- a/man/continuousObservation.Rd +++ b/man/continuousObservation.Rd @@ -11,6 +11,9 @@ continuousObservation(priorDays = 0L, postDays = 0L) \item{postDays}{minimum number of observation days post cohort index. Default 0 days} } +\value{ +An observation window that can be used in a Capr cohort definition +} \description{ A function to construct the observationWindow } diff --git a/man/daysOfSupply.Rd b/man/daysOfSupply.Rd index e95cd25a..dc246477 100644 --- a/man/daysOfSupply.Rd +++ b/man/daysOfSupply.Rd @@ -10,6 +10,9 @@ daysOfSupply(op) \item{op}{an opAttribute object that is either numeric or integer that defines the logical operation used to determine eligible number of days of supply} } +\value{ +An attribute that can be used in a cohort definition +} \description{ This function is used only for a drug query. days supply is a column in the drug exposure table of the cdm. This attribute allows a subquery to find drugs that satisfy certain values determined by diff --git a/man/drugExit.Rd b/man/drugExit.Rd index 1f5b7353..9f97fad2 100644 --- a/man/drugExit.Rd +++ b/man/drugExit.Rd @@ -22,6 +22,9 @@ surveillance prior to cohort exit} \item{daysSupplyOverride}{force drug exposure days supply to a set number of days} } +\value{ +an S4 DrugExposueExit class which defines the cohort exit by end of drug exposure +} \description{ Function to create an exit based on exit based on the end of a continuous drug exposure } diff --git a/man/drugQuantity.Rd b/man/drugQuantity.Rd index 52dd0412..29950e2a 100644 --- a/man/drugQuantity.Rd +++ b/man/drugQuantity.Rd @@ -10,6 +10,9 @@ drugQuantity(op) \item{op}{an opAttribute object that is either numeric or integer that defines the logical operation used to determine eligible quantity} } +\value{ +An attribute that can be used in a cohort definition +} \description{ This function is used only for a drug query. quantity is a column in the drug exposure table of the cdm. This attribute allows a subquery to find drugs that satisfy certain values determined by the diff --git a/man/drugRefills.Rd b/man/drugRefills.Rd index 1becae9a..a6aff8fc 100644 --- a/man/drugRefills.Rd +++ b/man/drugRefills.Rd @@ -10,6 +10,9 @@ drugRefills(op) \item{op}{an opAttribute object that is either numeric or integer that defines the logical operation used to determine eligible number of refills} } +\value{ +An attribute that can be used in a cohort definition +} \description{ This function is used only for a drug query. refills is a column in the drug exposure table of the cdm. This attribute allows a subquery to find drugs that satisfy certain values determined by the diff --git a/man/duringInterval.Rd b/man/duringInterval.Rd index 0731bdbb..0863e309 100644 --- a/man/duringInterval.Rd +++ b/man/duringInterval.Rd @@ -22,6 +22,9 @@ duringInterval( \item{ignoreObservationPeriod}{a logical toggle specifying whether we can consider events outside the observation period} } +\value{ +An event aperature that can be used in a Capr cohort definition +} \description{ Function that creates an eventAperture an opening where an event can occur relative to the index event diff --git a/man/endDate.Rd b/man/endDate.Rd index 2710b321..45d7845d 100644 --- a/man/endDate.Rd +++ b/man/endDate.Rd @@ -10,6 +10,9 @@ endDate(op) \item{op}{an opAttribute object must be a date that defines the logical operation used to determine eligible end dates} } +\value{ +An attribute that can be used in a cohort definition +} \description{ Function that creates a end date attribute } diff --git a/man/era.Rd b/man/era.Rd index 5e950ae2..0b4880fe 100644 --- a/man/era.Rd +++ b/man/era.Rd @@ -13,6 +13,9 @@ era(eraDays = 0L, studyStartDate = NULL, studyEndDate = NULL) \item{studyEndDate}{a date string that specifies the end date of registration} } +\value{ +a S4 CohortEra class object defining the eras of the cohort definition +} \description{ The Cohort Era depicts the time span of the cohort. The Censor Window includes the date window for which we register events. The Collapse Settings identify the era padding diff --git a/man/eventEnds.Rd b/man/eventEnds.Rd index bdb17120..e5f0d4fe 100644 --- a/man/eventEnds.Rd +++ b/man/eventEnds.Rd @@ -14,6 +14,9 @@ eventEnds(a, b, index = c("startDate", "endDate")) \item{index}{specifying what part of the index we start looking for events either at the index start date or index enddate} } +\value{ +An event window that can be used in a Capr cohort definition +} \description{ Function creates an event window where the event ends } diff --git a/man/eventStarts.Rd b/man/eventStarts.Rd index 694edcc3..06cee7f5 100644 --- a/man/eventStarts.Rd +++ b/man/eventStarts.Rd @@ -24,6 +24,9 @@ eventStarts(a, b, index = c("startDate", "endDate")) \item{index}{specifying what part of the index we start looking for events either at the index start date or index enddate} } +\value{ +An event window that can be used in a Capr cohort definition +} \description{ #' Function looking at all time before an event #' @export diff --git a/man/exactly.Rd b/man/exactly.Rd index a7ba6b4b..46a160cf 100644 --- a/man/exactly.Rd +++ b/man/exactly.Rd @@ -14,6 +14,9 @@ exactly(x, query, aperture = duringInterval(eventStarts(-Inf, Inf))) \item{aperture}{an eventAperture object that shows the temporal span where the event is to be observed relative to the index event} } +\value{ +A criteria that can be used in a cohort definition specifying satisfaction of exactly x instances of a query +} \description{ Function to enumerate an exact count of occurrences } diff --git a/man/fixedExit.Rd b/man/fixedExit.Rd index 1cc3db1d..0f76328b 100644 --- a/man/fixedExit.Rd +++ b/man/fixedExit.Rd @@ -11,6 +11,9 @@ fixedExit(index = c("startDate", "endDate"), offsetDays) \item{offsetDays}{an integer specifying the number of days to offset from the event date} } +\value{ +a fixed Duration exit S4 object used to define the cohort exit as the end of a specified time +} \description{ Function to create an exit based on exit based on the end of a continuous drug exposure } diff --git a/man/generateCaprTemplate.Rd b/man/generateCaprTemplate.Rd deleted file mode 100644 index fbc0bd99..00000000 --- a/man/generateCaprTemplate.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cohort.R -\name{generateCaprTemplate} -\alias{generateCaprTemplate} -\title{Generate a Capr cohort using a template} -\usage{ -generateCaprTemplate(file, .capr) -} -\arguments{ -\item{file}{the input file of a concept set} - -\item{.capr}{a function that creates a capr cohort} -} -\description{ -Generate a Capr cohort using a template -} diff --git a/man/makeCohortSet.Rd b/man/makeCohortSet.Rd index b50a1748..94e06052 100644 --- a/man/makeCohortSet.Rd +++ b/man/makeCohortSet.Rd @@ -9,6 +9,9 @@ makeCohortSet(...) \arguments{ \item{...}{multiple capr cohorts to bind into a dataframe} } +\value{ +a tibble containing cohortId, name, sql and json to pipe into CohortGenerator. +} \description{ Make a cohort dataframe for cohort generator } diff --git a/man/nestedWithAll.Rd b/man/nestedWithAll.Rd index c2349c9a..fff312bb 100644 --- a/man/nestedWithAll.Rd +++ b/man/nestedWithAll.Rd @@ -9,6 +9,9 @@ nestedWithAll(...) \arguments{ \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that all must be satisfied in context of the cohort definition +} \description{ Function to construct a nested group where all criteria and groups must be satisfied } diff --git a/man/nestedWithAny.Rd b/man/nestedWithAny.Rd index b3c519aa..59d892aa 100644 --- a/man/nestedWithAny.Rd +++ b/man/nestedWithAny.Rd @@ -9,6 +9,9 @@ nestedWithAny(...) \arguments{ \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that any may be satisfied in context of the cohort definition +} \description{ Function to construct a nested group where any criteria and groups may be satisfied } diff --git a/man/nestedWithAtLeast.Rd b/man/nestedWithAtLeast.Rd index f3caf2ee..53d25671 100644 --- a/man/nestedWithAtLeast.Rd +++ b/man/nestedWithAtLeast.Rd @@ -12,6 +12,9 @@ nestedWithAtLeast(x, ...) \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that at least x be satisfied in context of the cohort definition +} \description{ Function to construct a nested group where at least some of the criteria or groups must be satisfied diff --git a/man/nestedWithAtMost.Rd b/man/nestedWithAtMost.Rd index 50b684f0..f8c94c7d 100644 --- a/man/nestedWithAtMost.Rd +++ b/man/nestedWithAtMost.Rd @@ -11,6 +11,9 @@ nestedWithAtMost(x, ...) \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that at most x be satisfied in context of the cohort definition +} \description{ Function to construct a nested group where at most some of the criteria or groups must be satisfied } diff --git a/man/observationExit.Rd b/man/observationExit.Rd index 952f137f..359d05e8 100644 --- a/man/observationExit.Rd +++ b/man/observationExit.Rd @@ -6,6 +6,9 @@ \usage{ observationExit() } +\value{ +an S4 ObservationExit class which defines the cohort exit as the end of continuous observation +} \description{ Function to create an exit based on continuous observation } diff --git a/man/rangeHigh.Rd b/man/rangeHigh.Rd index aaed7dae..a6ddcb64 100644 --- a/man/rangeHigh.Rd +++ b/man/rangeHigh.Rd @@ -10,6 +10,9 @@ rangeHigh(op) \item{op}{an opAttribute object that is either numeric or integer that defines the logical operation used to determine eligible range high} } +\value{ +An attribute that can be used in a cohort definition +} \description{ This function is used only for measurement query. range_high is a column in the measurement table of the cdm. This attribute allows a subquery to find measurements that satisfy certain values diff --git a/man/rangeLow.Rd b/man/rangeLow.Rd index cfe9b4a6..e37247c1 100644 --- a/man/rangeLow.Rd +++ b/man/rangeLow.Rd @@ -10,6 +10,9 @@ rangeLow(op) \item{op}{an opAttribute object that is either numeric or integer that defines the logical operation used to determine eligible range low} } +\value{ +An attribute that can be used in a cohort definition +} \description{ This function is used only for measurement query. range_low is a column in the measurement table of the cdm. This attribute allows a subquery to find measurements that satisfy certain values diff --git a/man/startDate.Rd b/man/startDate.Rd index 2d322f42..57a25ed5 100644 --- a/man/startDate.Rd +++ b/man/startDate.Rd @@ -10,6 +10,9 @@ startDate(op) \item{op}{an opAttribute object must be a date that defines the logical operation used to determine eligible start dates} } +\value{ +An attribute that can be used in a cohort definition +} \description{ Function that creates a start date attribute } diff --git a/man/toCirce.Rd b/man/toCirce.Rd index 1dfbdae7..0a7f97fd 100644 --- a/man/toCirce.Rd +++ b/man/toCirce.Rd @@ -9,6 +9,9 @@ toCirce(cd) \arguments{ \item{cd}{the Capr cohort class} } +\value{ +an s3 list representing the circe object to coerce to json +} \description{ Function to coerce cohort to circe } diff --git a/man/valueAsNumber.Rd b/man/valueAsNumber.Rd index 5323b17a..3afa6b76 100644 --- a/man/valueAsNumber.Rd +++ b/man/valueAsNumber.Rd @@ -10,6 +10,9 @@ valueAsNumber(op) \item{op}{an opAttribute object that is either numeric or integer that defines the logical operation used to determine eligible patient age} } +\value{ +An attribute that can be used in a cohort definition +} \description{ This function is used only for measurement query. valueAsNumber is a column in the measurement table of the cdm. This attribute allows a subquery to find measurements that satisfy certain values diff --git a/man/withAll.Rd b/man/withAll.Rd index 8df2a90f..5c0f4c7e 100644 --- a/man/withAll.Rd +++ b/man/withAll.Rd @@ -9,6 +9,9 @@ withAll(...) \arguments{ \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that all must be satisfied in context of the cohort definition +} \description{ Function to construct a group where all criteria and groups must be satisfied } diff --git a/man/withAny.Rd b/man/withAny.Rd index d864c2f4..392cad00 100644 --- a/man/withAny.Rd +++ b/man/withAny.Rd @@ -9,6 +9,9 @@ withAny(...) \arguments{ \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that any may be satisfied in context of the cohort definition +} \description{ Function to construct a group where any criteria and groups may be satisfied } diff --git a/man/withAtLeast.Rd b/man/withAtLeast.Rd index 7b9e83df..6d53d07d 100644 --- a/man/withAtLeast.Rd +++ b/man/withAtLeast.Rd @@ -11,6 +11,9 @@ withAtLeast(x, ...) \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that at least x be satisfied in context of the cohort definition +} \description{ Function to construct a group where at least some of the criteria or groups must be satisfied } diff --git a/man/withAtMost.Rd b/man/withAtMost.Rd index 091d567f..44fde866 100644 --- a/man/withAtMost.Rd +++ b/man/withAtMost.Rd @@ -11,6 +11,9 @@ withAtMost(x, ...) \item{...}{a set of criteria or groups} } +\value{ +an S4 group class specifying a bundle of criteria that at most x be satisfied in context of the cohort definition +} \description{ Function to construct a group where at most some of the criteria or groups must be satisfied }