How to fill "quantity" field from "drug_exposure" table?

No, you don’t. DRUG_STRENGTH will tell you how to interpret quantity:

  • amount_denominator != NULL: fixed
  • denominator_unit_concept_id != NULL: divisible
  • both NULL: ingredient.
  • Standard concept but not in DRUG_STRENGTH: probably Drug Form, treat like Ingredient

Makes sense? We need to document that, but we are in the middle of overhauling the entire thing anyway.