View source: R/calDDDsAccumulation.R
calDDDsAccumulation | R Documentation |
calDDDsAccumulation
is a function to calculate subjects' accumulated daily dosage drugs(DDDs) in RxCui before last dispensed.
getDDDs
is a function to get DDDs in ATC code
calDDDsAccumulation( case, PatientIdColName = MemberId, DispensingColName = DispenseDate, AtcCodeColName = ATC, DailyDosageColName = DailyDosage, DurationColName = DaysSupply ) getDDDs(atc)
case |
data.frame, include subjects' id, dispensing date, drug ATC code, daily dosage, duration |
atc |
data.frame include ATC code |
User can input data frame containing the patient id, dispensing date, the drug ATC code, drug supply days, and daily dose of the drug column. This function will output a data frame which store DDDs accumulated by patients.
A new data.table accumulat_DDD
with following columns.
MemberId
patient Id
DDDs
accumulated DDDs
# sample of calculating subjects' accumulated DDDs accumulat_DDD <- calDDDsAccumulation(case = sample_data_subset_atc, PatientIdColName = MemberId,DispensingColName = DispenseDate,AtcCodeColName = ATC,DailyDosageColName = DailyDosage,DurationColName = DaysSupply) head(accumulat_DDD)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.