                      AND r.reverse_relationship_id = i.relationship_id);
 COMMIT;					 
 
---21 Update concept_id in concept_stage from concept for existing concepts
+--24 Update concept_id in concept_stage from concept for existing concepts
 UPDATE concept_stage cs
     SET cs.concept_id=(SELECT c.concept_id FROM concept c WHERE c.concept_code=cs.concept_code AND c.vocabulary_id=cs.vocabulary_id)
     WHERE cs.concept_id IS NULL
 ;
 COMMIT;
 
---22 Reinstate constraints and indices
+--25 Reinstate constraints and indices
 ALTER INDEX idx_cs_concept_code REBUILD NOLOGGING;
 ALTER INDEX idx_cs_concept_id REBUILD NOLOGGING;
 ALTER INDEX idx_concept_code_1 REBUILD NOLOGGING;

 WHERE concept_code = 'N0000000001';
 COMMIT;

--16 Create all sorts of relationships to self, RxNorm and SNOMED
INSERT INTO concept_relationship_stage (concept_code_1,
                                        concept_code_2,
                                        relationship_id,

    WHERE v.vocabulary_id = dv.vocabulary_id;
COMMIT;	

--19 Rename the top NDFRT concept
UPDATE concept_stage
   SET concept_name =
             'NDF-RT release '
