BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
Hi ,
The prescribers data has physician's field where the physicians names prescribing the drug are present. We get this data in excel.At times a physician's name is given in a different way than usual.for example, John Smith is same as J Smith or James Hanna is given as James Hanna,MD.

In excel on a new work sheet , I have two columns old and new, old is John Smith and new is J Smith.

Now When I convert excel data to SAS, I would like to do a look up on the old physicians names and if there is mis match , I would like to update them with the old ones.If there is a new physician's name present for the current data, i would like to have him included in my data.

Thanks for your time.
SASPhile,
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
This type of data validation topic has been discussed previously - check the various forums archives. But basically you really need to have some "key variable" to uniquely identify a subject, given that there may be multiple John Smith individuals and what if, by chance, you have some who changes their name, maybe "Michael Smith" becomes "Michel Smith". This condition happens - really it does.

What you are proposing is somewhat unreasonable, regardless of the power in SAS for data manipulation and interpretation.

One option though is to come up with a "tag" identification column/variable which is derived from possibly the Last_Name and First_Name components, compressing out blanks, in order to build a comparison "key" for new, incoming data.

The COMPRESS function comes to mind, to be used with a data-scrubbing process when your incoming data is parsed and interpreted for the first time.


Scott Barry
SBBWorks, Inc.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 794 views
  • 0 likes
  • 2 in conversation