     ampp.bnf_code,
     ampp.nm AS name,
     vmpps.form_route
-  FROM ebmdatalab.dmd.ampp
+  FROM {project}.{dmd}.ampp
   INNER JOIN vmpps ON ampp.vmpp = vmpps.snomed_id
   WHERE vmpp in (SELECT snomed_id FROM vmpps) AND ampp.bnf_code IS NOT NULL
 ),

    vmpp.bnf_code,
    vmpp.nm AS name,
    form_route
  FROM ebmdatalab.dmd.vmpp
  INNER JOIN vmps ON vmpp.vmp = vmps.vpid
  WHERE vmp in (SELECT vpid FROM vmps) AND vmpp.bnf_code IS NOT NULL
),

    amp.bnf_code,
    amp.descr AS name,
    form_route
  FROM {project}.{dmd}.amp
  INNER JOIN vmps ON amp.vmp = vmps.vpid
  WHERE vmp in (SELECT vpid FROM vmps) AND amp.bnf_code IS NOT NULL
),
