|
Maja:
You have an almost concise representation of which classes relate to
each drug. I say 'almost' because we usually restrict members of a class
to distinct objects. In the relation between some drugs and their
classes, the same class value appears more than once (SMPL_A
00054474425).
It must have occurred to you to 'invert' the grouping of classes by drug
to form a grouping of drugs by class. In SAS SQL, you can do that with
select distinct Pcode,inxdr
from <dataset>
order by Pcode,inxdr
;
That program gives you a concise representation of which drugs relate to
each class. To select drugs related to a specific class, try
select distinct inxdr
from <dataset>
where Pcode=<Pcode value>
;
Sig
-----Original Message-----
From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]
On Behalf Of Maja
Sent: Wednesday, August 17, 2005 2:26 PM
To: sas-l@uga.edu
Subject: claims data file
Hi there,
I am trying to do some analysis with the medical claims data file. I
have a column that has classes of drugs called 'indxdr' and then I have
a column with the actual drugs that belong to different classes, this
column is called 'pcode'. What I would like to do is figure out which
drugs belong to which class. Is there a way to code this somehow? Here
is how my variables look like:
inxdr Pcode
NSAID_I 00781127301
NSAID_I 50458033006
NSAID_I 49502030317
NSAID_I 00555030202
NSAID_I 00781127301
NSAID_I 11845079901
OPIOIDS 00472162716
OPIOIDS 00689111110
OPIOIDS 00071080324
OPIOIDS 00472162716
SMPL_A 00746346532
SMPL_A 00054474425
SMPL_A 59911587201
SMPL_A 00054474425
Any help would be much appreciate it. Thank you.
Maja
|