tidy_meds_outpt: Tidy outpatient medications

Description Usage Arguments Details Value

Description

tidy_meds_outpt determines which patients have the desired outpatient medications

Usage

1
tidy_meds_outpt(raw.data, ref.data, patients = NULL, home = TRUE)

Arguments

raw.data

A data frame with all outpatient medications

ref.data

A data frame with two columns, name and type

patients

An optinoal data frame with a column pie.id including all patients in study

home

optional logical indicating to look for home medications if TRUE or discharge medications if FALSE

Details

This function takes a data frame with reference outpatient medications or medication classes and a data frame with all patient outpatient medications, and returns a data frame with a logical for each medication for each patient. The data frame passed to ref.data should contain two columns: name and type. The name column should contain either generic medication names or medication classes. The type column should specify whether the value in name is a "class" or "med".

Value

A data frame


bgulbis/BGTools documentation built on May 12, 2019, 8:21 p.m.