10-13-2016 03:20 PM - edited 10-13-2016 03:22 PM
I have pharmacy claims data, specific to patients with RA. There are 4 drugs I am interested (MTX, HCQ, SSZ, LEF). These drugs can be used as mono therapy, dual therapy, or triple therapy, (dual and triple always include MTX).
The data look like this:
PATID INDEX_DT DRUGName StartDate DaysSupply
How do I figure which regimen the patients are on? I don't really care about switching. I just need the intial regimen.
10-13-2016 03:34 PM
If you claims data has information with patient id and one drug per record then the technique in this post: https://communities.sas.com/t5/Base-SAS-Programming/Summarize-overlapping-medications/m-p/304122#M64...
is basically similar to what you are doing.
If your data goes over a long enough period where you have multiple similar claims then you may need to reduce to the above needed form with something like:
Create table temp as
select distinct patient_id, drug
from claims data;
If the data has multiple drugs per patient record then you will need to transform to the one drug per patient form. The method for that likely depends on your current data structure.
A further thing to keep in mind could be time. How would you tell if someone had been on a single treatment regimen for period of time and then shifted to the two or three drug regimen? And how do you want to report that? So the claim or service date may come into play but you'll need to determine the rule(s) involved.
10-13-2016 10:57 PM
Assuming that multiple-drug treatments are represented as many drugs starting on the same day, for tha same patient, you could do this:
proc sort data=theData; by patId startDate drugName; run; data want0; length drugs $12; do until(last.startDate); set theData; by patId startDate; drugs = catx("+", drugs, drugName); end; run; data want1; set want0; by patId; if first.patId; drop drugName daysSupply; run;