• Couple of quick thoughts for you:

    1) The key to making this work is to strip the unit of measure from the initial dose. For example, if a drug dose is "10 mg" taken twice, then you first need to strip "mg" from "10 mg". You'll be left with the 10 which you can then multiply against 2 to get 20. All of this parsing should be done in SQL (i.e., in the dataset).

    2) Since you didn't indicate if your dataset contains different types of drugs with different types of units of measure, I"ll assume for now that "mg" is your only unit of measure. To strip "mg" from "10 mg" just use the sql replace command to eliminate "mg" with a zero-length string: Replace(drugdose,'mg','') * NumberOfTimesTaken = total dosing. If you have different units of measure, then nest your replace statements for each unit of measure.

    3) Things get much trickier if a given drug has multiple active ingredients, suchas "10mg;5mg" -- in this scenario, the drug has a total of 15mg, but the information is split between two active ingredients. A much more elaborate parsing technique is required, which I won't go into right now.

    --Pete