export_definition_search: Exports definition searches to an excel file

View source: R/codelists.R

export_definition_searchR Documentation

Description

Exports definition searches to an excel file

Usage

export_definition_search(definition_search, out_file)

Arguments

definition_search

a list of dataframes as produced by build_definition_lists

out_file

file path to the excel file to be exported

Examples

## Not run: 
medical_table <- read.delim("medical.txt", fileEncoding="latin1", stringsAsFactors = FALSE)
drug_table <- read.delim("product.txt", fileEncoding="latin1", stringsAsFactors = FALSE)
def2 <- import_definition_lists(system.file("extdata", "example_search.csv",
                                            package = "rpcdsearch"))
draft_lists <- definition_search(def2, medical_table, drug_table = drug_table)
out_file <- "def_searches.xlsx"
export_definition_search(draft_lists, out_file)

## End(Not run)

rOpenHealth/rEHR documentation built on Sept. 25, 2024, 5:32 p.m.