Skip to contents

Sets column filter pins for the duration of the supplied code block, then restores the previous state. This is useful when you need different filters for a group of calls without permanently changing session state.

Usage

with_col_filters(code, lookup = NULL, relationship = NULL, mapping = NULL)

Arguments

code

Code to execute with the temporary filters.

lookup

Named list of column filters for lookup tables, keyed by code type. Each value is a named list of column_name = c(values) pairs. E.g. list("SNOMED CT" = list(active_concept = c("1"))).

relationship

Named list of column filters for relationship tables, keyed by code type.

mapping

Named list of column filters for mapping tables, keyed by "from > to" pairs. E.g. list("Read 3 > ICD-10" = list(mapping_status = c("E", "G"))).

Value

The result of evaluating code.

Examples

if (FALSE) { # \dontrun{
# Temporarily include inactive SNOMED concepts
with_col_filters(
  {
    CODES("all", type = "SNOMED CT")
  },
  lookup = list("SNOMED CT" = list(active_concept = c("0", "1")))
)
} # }