Description Usage Arguments Value
View source: R/get_drugs_string.R
This function returns a dataframe with flags indicating if a patient has a medication or not. The flags are 1 which indicate patient had the medication or 0 which indicates patient did not. A missing flag means that the patient did not get any medication at all in the time frame specified. All arguments are strings
1 2 | get_drugs_string(supermart, sandbox, cohort, drug_list_df, grouping_col,
drug_names_col, index_col, date_condition, extra_grouping_vars = "")
|
supermart |
Name of the supermart where the data is stored. Eg. supermart_392 |
sandbox |
Name of the writable location usually sandbox where cohort is saved |
cohort |
Name of the cohort with explorys_patient_id's. |
drug_list_df |
Name of the dataframe containing the medications of interest. This dataframe must be available in local environment as well as on the sandbox |
grouping_col |
Name of the column that has the groups of medications of interest |
drug_names_col |
Name of the column in the drug_list_df specified. This column has the drug names of interest |
index_col |
Name of the column with the index dates |
date_condition |
The sql format date condition. For example "DATE(diagnosis_date) BETWEEN '2019-01-01' AND '2020-01-01'" |
extra_grouping_vars |
Character string of additional variables separated by comma to grouping variables |
A dataframe with indicators of medication usage
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.