Dear all,
I have an issue. I am trying to calculate, from a medication database, the number of different drug combinations (single medication, 2 drug treatment, 3 or more drug treatment) of each classes (lipid lowering, antithrombotic) by year.
Dataset contains index date for each medication and last date was generated by last purchase date for any medications for each patient.
Data looks as below:
clear
input byte ID str9(indexdate lastdate) str3 drug
1 "24Aug2005" "14Nov2007" "ASP"
1 "24Aug2005" "14Nov2007" "CLO"
1 "7Aug2006" "14Nov2007" "STA"
1 "7Aug2006" "14Nov2007" "FIB"
2 "14Nov2007" "13Feb2010" "CLO"
2 "15Jun2002" "13Feb2010" "HEP"
2 "15Jun2002" "13Feb2010" "ASP"
2 "15Jun2002" "13Feb2010" "STA"
end
I would really appreciate if you may help me tp solve the problem.
Thank you in advance.
I have an issue. I am trying to calculate, from a medication database, the number of different drug combinations (single medication, 2 drug treatment, 3 or more drug treatment) of each classes (lipid lowering, antithrombotic) by year.
Dataset contains index date for each medication and last date was generated by last purchase date for any medications for each patient.
Data looks as below:
clear
input byte ID str9(indexdate lastdate) str3 drug
1 "24Aug2005" "14Nov2007" "ASP"
1 "24Aug2005" "14Nov2007" "CLO"
1 "7Aug2006" "14Nov2007" "STA"
1 "7Aug2006" "14Nov2007" "FIB"
2 "14Nov2007" "13Feb2010" "CLO"
2 "15Jun2002" "13Feb2010" "HEP"
2 "15Jun2002" "13Feb2010" "ASP"
2 "15Jun2002" "13Feb2010" "STA"
end
I would really appreciate if you may help me tp solve the problem.
Thank you in advance.
Comment