 -- When a description that is an FSN is added, but not at the same time as the concept
 -- then add a row to indicate an FSN change for the concept
 -- Watch our for changes to case sensitivity.  Filter out cases where earlier active row 
--- with different case sensitivity exists.
+-- with same description id but different case sensitivity exists.
 -- The status code in this case relates to the inactivation reason for the previous description
 -- Filter out metadata components
 INSERT INTO rf21_COMPONENTHISTORY

-- and not meta data components
INSERT INTO rf21_COMPONENTHISTORY
SELECT DISTINCT s.referencedComponentId, s.effectiveTime, 2, 
CASE WHEN s.active = 1 THEN 0 else 1 END AS status, 
CASE WHEN EXISTS 
	( SELECT 1 FROM rf2_crefset_sv s2
		WHERE s2.refsetId = s.refsetId

SET @ADDED = 0;
SET @NOT_SET = -1;

SET @COMPONENT_OF_INTEREST = 228937003;

-- PARALLEL_START;
-- Insert all concept changes into history and we'll work out what changes where made
