Hello, I need to create two variables - one with dosage (number) and another with units of measurement (string - mg, mgs, mL or iu) using free text medication records that do not appear to follow any structured pattern and some of them have entries that complicate scanning the digits, for example: DRUG 357860 25mg TAB - [problem: two numbers and only one of them is dosage, another is a part of drug name] Drug_1/Drug_2 1 liquid 50/8mL - [problem: two numbers for two different drugs separated by /] Drug 250mgs TAB (250mgs) - [problem: double entry of the same dosage] Drug 80 iu text - [space between dosage and unit] The predominant format is DRUG NAME 123mg TEXT. The observations that have two drugs with two dosage values would create two variables with two separate dosages - Drug 1 and Drug 2. I tried to use scan and compress, but I don't know how to separate numbers that are part of a drug name from dosage values. Any ideas on how to approach this? I would appreciate any advice. My apologies if I missed similar postings. I tried to search, but couldn't find an exact match. Thank you,
... View more