                               JOIN drug_strength d
                                 ON concept_id = drug_concept_id
                                AND denominator_unit_concept_id IS NOT NULL
-                               AND REGEXP_LIKE (concept_name,'Tablet|Capsule')
+                               AND REGEXP_LIKE (concept_name,'Tablet|Capsule') -- solid forms defined by their forms
                                AND vocabulary_id = 'RxNorm Extension');
 
 -- Delete combination drugs where denominators don't match

   AND c.vocabulary_id = 'RxNorm Extension'
  JOIN concept c2 ON DRUG_CONCEPT_ID = c2.CONCEPT_ID;

--fix 2 equal components
DELETE
FROM PC_STAGE
WHERE PACK_CONCEPT_CODE = 'OMOP339574'

                         GROUP BY concept_code_1,
                                  b.concept_class_id
                         HAVING COUNT(1) > 1)
AND   NOT REGEXP_LIKE (c.concept_name,b.concept_name) --Attribute is not a part of a name
UNION
SELECT concept_code_1,
       concept_code_2
