identify_atc: Find dispensations using ATC-codes

Description Usage Arguments Examples

View source: R/identify_atc.R

Description

This function allows you to find dispensations based on ATC-codes. Creates a new column based on the ATC-codes.

Usage

1
2
3
4
5
6
7
identify_atc(
  .data,
  atc,
  new_variable,
  simple = FALSE,
  patient_inclusion = FALSE
)

Arguments

.data

A tibble with data in QTF-format.

atc

A character vector (or scalar) with ATC-codes that should be identified in the data.

new_variable

A character string with the column name for the new variable.

simple

Only the new variable column will be returned. Support function. Defaults to FALSE.

patient_inclusion

Return a vector with unique patient id:s that can be used to filter data at a later stage. Defaults to FALSE.

Examples

1
2
data(data_atc)
identify_atc("L04AA11", "etanercept")

liljamathias/QRfunctions documentation built on Jan. 20, 2021, 1:32 a.m.