I'm currently playing around with a longitudinal pharmaceutical dataset. Within the dataset, patient drug regimens are listed sequentially by row. Each row includes a string variable that describes all of the drugs in each regimen (e.g. 'PACLITAXEL + CARBOPLATIN").
In instances where a patient has multiple regimens, I'm attempting to flag various changes in treatment. By way of an example, these include where:
Any ideas on the best way to create such a flag? I'm struggling.
In instances where a patient has multiple regimens, I'm attempting to flag various changes in treatment. By way of an example, these include where:
- One or more drugs from regimen1 are continued at regimen2, with a new drug also initiated at regimen2.
Patient | Regimen number | Drug string |
1 | 1 | PACLITAXEL + CARBOPLATIN |
1 | 2 | CARBOPLATIN + MITOMYCIN |

Comment