Hi,
I would need your help on the issue:
I have a dataset with 1000 drug names and I want to pattern match those drug names with the main Pharmacy Data set so that I can only get data for the drugs I have. Hard coding 1000 values is not an option here, so i'm looking for a dynamic solution.
Both the tables have Generic Name column and I want to pattern match on these two. I want to use wildcard operator.
Could someone please help?
Thanks!
Hi @Amit_91
Could you please supply some datalines in a usable form (data step) to play with and provide you with a useful solution?
Best,
data drugs;
infile datalines dlm='+';
length generic_name $ 50;
input generic_name $ ;
datalines;
CERTOLIZUMAB
GOLIMUMAB
ABATACEPT
run;
Above are only 3 drugs but i might have 1000 drugs. And i want to match these drugs with the main pharmacy table using wildcard.
Please be very specific on your matching requirements.
Drugs are one area where wildcards may be a poor choice because of compound names where some names are part of several others and to some extent the composition (liquid for injection or pills for example).
Hey,
I want to check only oral tablets. And I want to match the drugs in my table from the main Pharmacy data set using wildcard.
Thanks,
Amit
Could you please give an example where you are using a wildcard. The names you give as examples do not contain wildcards!
Maybe you should consider using the COMPGED function.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.