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

Description Usage Arguments Details Examples

View source: R/codelists.R

Description

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

Usage

1
2
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

1
2
3
4
5
6
7
8
## 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)

rOpenHealth/rEHR documentation built on May 26, 2019, 8:51 p.m.