 			AND cs_int.vocabulary_id = 'NDC'
 		);
 
---19. Add full NDC names into concept_synonym_stage
+--19. Add full unique NDC names into concept_synonym_stage
 INSERT INTO concept_synonym_stage (
 	synonym_concept_code,
 	synonym_vocabulary_id,
 	synonym_name,
 	language_concept_id
 	)
-SELECT concept_code,
-	vocabulary_id,
-	vocabulary_pack.CutConceptSynonymName(long_concept_name),
+SELECT mn.concept_code,
+	mn.vocabulary_id,
+	vocabulary_pack.CutConceptSynonymName(mn.long_concept_name),
 	4180186 AS language_concept_id -- English
-FROM main_ndc;
+FROM main_ndc mn
+WHERE NOT EXISTS (
+		SELECT 1
+		FROM concept_stage cs_int
+		WHERE cs_int.concept_code = mn.concept_code
+			AND cs_int.vocabulary_id = mn.vocabulary_id
+			AND REPLACE(LOWER(cs_int.concept_name), ' [diluent]', '') = LOWER(vocabulary_pack.CutConceptSynonymName(mn.long_concept_name))
+		);
 
 --20. Add mapping from SPL to RxNorm through RxNorm API (source: http://rxnav.nlm.nih.gov/REST/rxcui/xxx/property?propName=SPL_SET_ID)
 INSERT INTO concept_relationship_stage (

										THEN '0' || SUBSTR(productndc, devv5.INSTR(productndc, '-') + 1)
									ELSE SUBSTR(productndc, devv5.INSTR(productndc, '-') + 1)
									END AS concept_code,
								startmarketingdate AS valid_start_date
							FROM sources.product
							) AS s0
						GROUP BY concept_code,
							active_numerator_strength,
							active_ingred_unit,
							valid_start_date
						) AS s1
					GROUP BY concept_code,
						valid_start_date
					) AS s2
				)
		SELECT t1.*,

	AND crs.vocabulary_id_2 = 'RxNorm'
JOIN sources.package p ON p.productndc = n.productndc
LEFT JOIN concept_relationship_stage crs1 ON crs1.concept_code_1 = p.pack_code
	AND crs1.vocabulary_id_1 = crs.vocabulary_id_1
	AND crs1.vocabulary_id_2 = crs.vocabulary_id_2
WHERE crs1.concept_code_1 IS NULL;

--30. Working with replacement mappings
