 	c.concept_code as concept_code_2,
 	'ICD10CN' as vocabulary_id_1,
 	c.vocabulary_id as vocabulary_id_2,
-	'Maps to' as relationship_id,
+	r.relationship_id as relationship_id,
 	(
 		SELECT latest_update
 		FROM vocabulary

	('COVID-19 pneumonia (machine translation)','Observation','ICD10CN','ICD10 code','U07.100x001',TO_DATE('19700101','yyyymmdd'),TO_DATE('20991231','yyyymmdd')),
	('COVID-19 pneumonia (machine translation)','Observation','ICD10CN','ICD10 code','U07.100x003',TO_DATE('19700101','yyyymmdd'),TO_DATE('20991231','yyyymmdd'));

--7. Fill table concept_synonym_stage with chinese and English names
INSERT INTO concept_synonym_stage (
	synonym_name,

	) i
JOIN concept_relationship r ON r.concept_id_1 = i.concept_id
	AND r.invalid_reason IS NULL
	AND r.relationship_id in ('Maps to', 'Maps to value')
JOIN concept c ON c.concept_id = r.concept_id_2;

--10. Append resulting file from Medical Coder (in concept_relationship_stage format) to concept_relationship_stage
