Dear all,
I have large medication data. I am having trouble generating the index date of prescription for each medication for each participant. My data looks as below.
I would really appreciate if anyone may help me.
Thank you
I have large medication data. I am having trouble generating the index date of prescription for each medication for each participant. My data looks as below.
PHP Code:
clear
input byte(id aspirin clopidogrel heparin statin fibrate) float supply_date
1 1 0 0 0 0 507
1 1 0 0 0 0 510
1 1 0 1 0 0 520
1 1 0 0 0 0 560
2 1 1 0 0 0 517
2 0 1 0 1 0 518
2 0 1 0 0 0 553
3 0 0 0 0 1 552
3 1 0 0 0 0 553
3 1 1 0 0 0 584
3 1 1 0 0 0 586
3 0 0 0 1 0 589
4 0 1 0 0 1 533
4 0 0 0 0 1 557
5 0 1 0 0 0 520
5 0 1 0 0 1 524
5 0 1 0 1 0 535
end
format %tm supply_date
Thank you
Comment