50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

rEHR (version 1.0)

definition_search: This function is used to build new definition lists based on medical definitions

Description

This function is used to build new definition lists based on medical definitions

Usage

definition_search(def, medical_table = NULL, test_table = NULL, drug_table = NULL, lookup = NULL)

Arguments

def
an object of class MedicalDefinition
medical_table
Dataframe lookup table of clinical codes
test_table
dataframe lookup table of test codes
drug_table
dataframe lookup table of medication product codes
lookup
list containing elements: "codes", "terms", "tests", "drugs", "drugcodes" (see details)

Details

You may get an invalid multibyte string error, in which case, set fileEncoding="latin1" on read.delim when reading in the lookup tables Lookup tables are

Examples

Run this code
## 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)
# ## End(Not run)

Run the code above in your browser using DataLab