convert_alex_database_med_2: a function has the same input variable as the previous...

Description Usage Arguments Value

View source: R/get_alexdata.R

Description

a function has the same input variable as the previous function convert_alex_database_med_1, but use the previous function(convert_med) and return only ehb_id, collet_date_time and corresponding med usage(not including different med names in a same med category, for example, a sample with three different abx will only have one record)

Usage

1
convert_alex_database_med_2(medRaw, medName, period)

Arguments

medRaw:

a data frame that contains abx, Biologics, en, Enteral.Steroids, ppi information, contains ehb_id instead of nautilusid

medName:

the name of the medication variable

period:

used to define the current usage of that medication and the unit is days. for example, if period = 10, then the current usage will be defined as within 10 days (10 included) of the sample collect date

Value

medConverted a data frame contains ehb_id, collect_date_time, SampleType and antibiotics.Note it does not contain different medication names under a certain medCategory.


reny1/alexdata documentation built on May 29, 2019, 8:06 a.m.