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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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