I am trying to perform a fuzzy matching for the variable prd for two databases that I have. In particular the following database 1 (DB1):
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 ATC str181 prd "R05CB06" "1 AL AX capsule, hard 75 mg+5 mg" "R01BA52" "1 AL PLUS capsule, hard 120 mg+5 mg" "R06AE09" "1 AL syrup 2.5 mg/5 ml" "R06AE09" "1 AL tablet 5 mg" "A11CC03" "1 ALPHA LEO capsule, soft 0.25 µg" "A11CC03" "1 ALPHA LEO capsule, soft 1 µg" "A11CC03" "1 ALPHA LEO oral drops, solution 2 µg/ ml" "A11CC03" "1 ALPHA LEO oral drops, solution 2 µg/ml" "A11CC03" "1 ALPHA LEO solution for injection 1 µg/0.5 ml" "A11CC03" "1 ALPHA LEO solution for injection 2 µg/1 ml" "R06AB54" "1.2.3 syrup" "N02AA59" "123 COLD tablet" "V09GX" "18F FDG OFZS solution for injection 20 GBq/µmol" "D02AF" "2 DROP cutaneous solution" "A12AX" "21ST CENTURY ARTHRI FLEXADVANTAGE tablet" "A12AX" "21ST CORAL CALCIUM capsule, soft 250 mg+125 mg+100 IU" "B05DB" "22 7DIANEAL PD1 MED GLUCOS solution for peritoneal dialysis 113.5 g/5 l" "B05DB" "22 7DIANEAL PD1 MED GLUCOS solution for peritoneal dialysis 136.2 g/6 l" "B05DB" "22 7DIANEAL PD1 MED GLUCOS solution for peritoneal dialysis 68.1 g/3 l" "N02BA51" "222 TABLETS tablet 375 mg+30 mg+8 mg" "R06AX13" "24 HOUR ALLERGY REMEDY tablet 10 mg" "G03AA14" "28/14 ESTROGENOS CONJUGADOS NOMEGESTROL ACETATO MERCK coated tablet 5 mg+0.625 mg" "N02BA51" "282 TABLETS tablet 375 mg+30 mg+15 mg" "N02BA51" "292 TABLETS tablet 375 mg+30 mg+30 mg" "V06" "2CM CREATINE JOINT SUPPORT KIWI STRAWBERRY powder for oral solution" "V06" "2CM CREATINE JOINT SUPPORT ORANGE powder for oral solution" "S01BC03" "3 A OFTENO eye drops, solution 0.1%" "A02AD01" "3 GEL oral suspension" "J01FA10" "3 MICINA film-coated tablet 500 mg" "D02BA" "30 SPF FPS HIGH PROTECTION SUNSCREEN cutaneous emulsion 3%+2.2%+12%+1%" "D02BA" "30 SPF FPS KIDS HIGH PROTECTION SUNSCREEN cutaneous emulsion 3%+2.2%+12%+1%" "D02BA" "30 SPF OIL FREE cutaneous emulsion 6%+7.5%+5%+4%" "D08AC52" "3M SOLUPREP cutaneous sponge 2%+70%" "J05AF05" "3TC coated tablet 150 mg" "J05AF05" "3TC coated tablet 300 mg" "J05AF05" "3TC film-coated tablet 150 mg" "J05AF05" "3TC film-coated tablet 300 mg" "J05AF05" "3TC oral solution 10 mg/ml" "J05AF05" "3TC tablet 150 mg" "A11EA" "3V solution for injection" "A11DB" "3V solution for injection 100 mg/3ml+100 mg/3 ml+1 000 µg/3 ml" "A11EA" "3V tablet" "A11DB" "3V tablet 100 mg+200 mg+200 µg" "N02BE01" "4 ALL chewable tablet 80 mg" "D07CC01" "4 DERM cream 0.05%+0.1%+1%" "V03AB27" "4 DMAP solution for injection 50 mg/ml" "D02BA" "4 IN 1 LIQUID 14 HOUR WEAR FOUNDATION SPF 15 cutaneous emulsion 5%" "L03AX" "4 LIFE TRANSFER FACTOR MASTICABLE FORMULA AVANZADA chewable tablet 200 mg" "L03AX" "4 LIFE TRANSFER FACTOR PLUS TRI FACTOR FORMULA capsule, hard 100 mg" "B05XA30" "4 TRACE ELEMENTS solution for infusion 6 µg/ml+0.42 mg/ml+0.37 mg/ml+1.67 mg/ml" "R01AA04" "4 WAY FAST ACTING nasal spray, suspension 1%" "R01AA04" "4 WAY MENTHOL nasal spray, suspension 1%" "R01AA08" "4 WAY SALINE nasal spray, suspension" "R05CA03" "44 EXP syrup 100 mg/7.5 ml" "D02BA" "45 SPF FPS HIGH PROTECTION SUNSCREEN cutaneous emulsion 3%+4%+12%+6%" "D02BA" "45 SPF HIGH PROTECTION UVA UVB cream" "D02BA" "45 SPF SUNSCREEN cutaneous spray, solution" "L01BC02" "5 FLUOROURACIL EBEWE concentrate for solution for infusion 1 000 mg/20 ml" "L01BC02" "5 FLUOROURACIL EBEWE concentrate for solution for infusion 250 mg/5 ml" "L01BC02" "5 FLUOROURACIL EBEWE concentrate for solution for infusion 5 000 mg/100 ml" "L01BC02" "5 FLUOROURACIL EBEWE concentrate for solution for infusion 500 mg/10 ml" "L01BC02" "5 FLUOROURACIL EBEWE solution for infusion 500 mg/10 ml" "L01BC02" "5 FLUOROURACIL EBEWE solution for injection 1 g/20 ml" "L01BC02" "5 FLUOROURACIL EBEWE solution for injection 250 mg/5 ml" "L01BC02" "5 FLUOROURACIL EBEWE solution for injection 500 mg/10 ml" "L01BC02" "5 FLUOROURACIL solution for injection 50 mg/ml" "L01BC02" "5 FLUOROURACILO RECALCINE concentrate for solution for infusion 250 mg/5 ml" "L01BC02" "5 FLUOROURACILO RECALCINE concentrate for solution for infusion 500 mg/10 ml" "L01BC02" "5 FU concentrate for solution for infusion 250 mg/5 ml" "L01BC02" "5 FU tablet 100 mg" "L01BC02" "5 FU tablet 50 mg" "D02AA" "555 BARRIER cutaneous solution 5%" "A04AD51" "6 COPIN oral solution 25 mg/ml+5 mg/ml" "A04AD51" "6 COPIN oral solution 6.5 mg/ml" "A04AD51" "6 COPIN solution for injection 1.6 mg/2 ml" "A04AD51" "6 COPIN tablet 25 mg+2.5 mg" "A04AD51" "6 COPIN tablet 3.6 mg" "D02BA" "60 SPF STICK PROTECTION CIBLEE UVA UVB ANTHELIOS XL cutaneous stick 3%+6.25%+2%+10%" "D05BA02" "8 MOP capsule, hard 10 mg" "A11AA" "8 VIT chewable tablet" "N02BA51" "A C C PHARMASCIENCE tablet 325 mg+15 mg+8 mg" "N02BA51" "A C C VITA HEALTH tablet 375 mg+15 mg+8 mg" "C07FB03" "A CARD AM tablet 50 mg+5 mg" "C07AB03" "A CARD tablet 50 mg" "J01CR02" "A CLAS powder for syrup 200 mg/5 ml+28.5 mg/5 ml" "D01AE12" "A CURITYBINA cutaneous paste 28%" "D01AE12" "A CURITYBINA cutaneous solution 10%" "D03AA" "A D CREMA VITAMINICA cream" "A11CC20" "A D VIT oral suspension" "D02AB" "A DERMA CYTELIUM cutaneous emulsion" "D02AB" "A DERMA DERMALIBOUR cream" "D11AX" "A DERMA DERMOPAN bath additive" "D03AX" "A DERMA EPITELIAL AH cream" "D11AX" "A DERMA EXOMEGA BANO Y DUCHA bath additive" "D11AX" "A DERMA EXOMEGA BANO bath additive" "D02AX" "A DERMA EXOMEGA BARRERA cream" "D11AX" "A DERMA EXOMEGA LECHE cutaneous emulsion" "D11AX" "A DERMA EXOMEGA cream" "B03BB01" "A FOLIC tablet 0.4 mg" "B03BB01" "A FOLIC tablet 0.5 mg" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str871 prd_info "18F-FMISO" "1UOOintment" "2-deoxyglucose" "3F8MAb" "3MSkin&NasalAntiseptic" "5-FUCVC" "552-02" "852A" "90Y-cG250" "9cUAB30" "A-007" "A/H7N9AnhuiVLPInfluenzaVaccine" "AATDeficiencyProgram" "AB001" "ABP798" "ABT-072" "ABT-089" "ABT-126" "ABT-267" "ABT-288" "ABT-354" "ABT-493" "ABT-614" "ABT-652" "ABT-751" "ABT-869" "ABT-894" "ABT-957" "AC-201" "AC-5216" "AC133" "AC480" "AC607" "ACC-001" "ACE-083" "ACE393" "ACE527" "ACH-0137171" "ACHN-975" "ACT-541468" "ACT-GRO-777" "AD5CEAVaccine" "ADI-PEG20" "ADL5859" "ADO-122" "ADX-102Cream" "ADX71149" "AEB071" "AEG33773" "AEG35156" "AERAS-402" "AEVI-001" "AFP-464" "AFQ056" "AG-13958" "AG-24322" "AG2037" "AGG-523" "AGI-1067" "AGN-232411" "AGN211745" "AGN818" "AGO178" "AGS-009" "AGS-16C3F" "AGS-16M18" "AGS-1C4D4" "AIRInhaledInsulin" "AK001" "AKB-9778" "AKR-963" "AL-15469A/AL-6515" "AL-208" "AL-37807" "AL-54478" "AL-60371" "AL-8309" "ALD-101" "ALD-301" "ALD-401" "ALK-001" "ALKS33" "ALKS37" "ALKS5461" "ALLN-177" "ALLOD-2" "ALRN-5281" "ALT-801" "ALT-836" "ALT005" "ALTU-238" "ALV003" "ALVAC-Melanoma" "ALXN1101" "ALXN1102" "ALZ-1101" "AM001Cream" "AMD070" "AME-133v" "AMG172" end
My aim, in particular, is to look if name k in DB2, correspond (or is very similar to, with a criterion of similarity to be specified) to a name in DB1. Unfortunately my organization is providing me STATA 13 only. Now, I have seen from past questions that there is a function called reclink that could do the job but I am not familiar with it. Can someone, please help me out with this (i.e. either providing the code with recline if possible and a source where I can find explanations, or a better function that does the job of smart searching from DB2 to DB1)
Thank you a lot,
Federico
0 Response to Smart fuzzy matching
Post a Comment