DATA Step, Macro, Functions and more

How do I identifying drug regimens with 4 drugs used as mono/dual/triple therapy?

Reply
Occasional Contributor
Posts: 11

How do I identifying drug regimens with 4 drugs used as mono/dual/triple therapy?

[ Edited ]

Hi, 


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).  

 

Regimens

  1. MTX
  2. HCQ
  3. SSZ
  4. LEF
  5. MTX+HCQ
  6. MTX+SSZ
  7. MTX+LEF
  8. MTX+HCQ+SSZ
  9. MTX+HCQ+LEF
  10. MTX+SSZ+LEF

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.  

 

Thanks!
Chris

 

Super User
Posts: 10,483

Re: How do I identifying drug regimens with 4 drugs used as mono/dual/triple therapy?

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:

 

Proc sql;

   Create table temp as

   select distinct patient_id, drug

   from claims data;

run;

 

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.

Respected Advisor
Posts: 4,644

Re: How do I identifying drug regimens with 4 drugs used as mono/dual/triple therapy?

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;
PG
Ask a Question
Discussion stats
  • 2 replies
  • 234 views
  • 0 likes
  • 3 in conversation