---
title: "Re-exporting functions from omopgenerics"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{reexport}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

## Introduction

**omopgenerics** is a developer-focused package that is meant to be mostly invisible to users. This means that the typical user of the omopverse packages should not need to import it directly. Functions that users need should be re-exported by other packages.

## Methods

If a package defines an implementation for a desired method (attrition, settings, ...), this function should be re-exported there.

## CDM reference

If a package has a function to create a `cdm_reference` object, this package should re-export several functions.

1. To access the `cdm_reference` attributes:

- `cdmSource()`

- `cdmVersion()`

- `cdmName()`

2. To access the `cdm_table` attributes:

- `tableSource()`

- `tableName()`

- `cdmReference()`

3. To insert and drop tables using the cdm object:

- `insertTable()`

- `dropSourceTable()`

- `listSourceTable()`

- `readSourceTable()`

4. Helpers to create appropriate cdm tables:

- `omopColumns()`

- `omopTables()`

- `cohortColumns()`

- `cohortTables()`

- `achillesColumns()`

- `achillesTables()`

## Cohorts

If a package has a function to create a `cohort_table` object, this package should re-export the following functions:

- `settings()`

- `attrition()`

- `cohortCount()`

- `cohortCodelist()`

- `bind()`

## Summarised result

If a package has a function to create a `summarised_result` object, this package should re-export the following functions:

- `suppress()`

- `bind()`

- `settings()`

- `exportSummarisedResult()`

- `importSummarisedResult()`

- `groupColumns()`

- `strataColumns()`

- `additionalColumns()`
