Hi SAS pro I am doing a research on polypharmacy and want to re-structure the dataset to see the start and end of single drug, and the start and end of two drugs, and the start and end of three drugs. The example of original dataset is like this : ID drug start end SCORE 1 A 06/01/2020 11/15/2020 2 1 B 08/01/2020 09/09/2020 1 1 C 06/01/2020 07/01/2020 3 1 D 10/01/2020 12/31/2020 4 2 A 01/15/2020 03/04/2020 2 2 C 01/27/2020 03/09/2020 3 3 A 03/01/2020 04/01/2020 2 3 C 03/26/2020 04/05/2020 3 3 D 03/28/2020 05/05/2020 4 4 A 04/04/2020 06/07/2020 2 4 C 04/12/2020 07/01/2020 3 I want to change the dataset as below: ID drugs start end score 1 A+C 06/01/2020 07/01/2020 2+3=5 1 A 07/02/2020 07/31/2020 2 1 A+B 08/01/2020 09/09/2020 2+1=3 1 A 09/10/2020 09/30/2020 2 1 A+D 10/01/2020 11/15/2020 2+4=6 1 D 11/16/2020 12/31/2020 4 2 A 01/15/2020 01/26/2020 2 2 A+C 01/27/2020 03/04/2020 2+3=5 2 C 03/05/2020 03/09/2020 3 I know this analysis is comprehensive.. I am much appreciate if you could help me to sort out this analysis.
... View more