 	'ICD10PCS' AS vocabulary_id,
 	4180186 AS language_concept_id
 FROM sources.mrconso
-WHERE sab = 'ICD10PCS'
+left join concept_stage on
+	concept_code = code and
+	str = concept_name
+WHERE
+	sab = 'ICD10PCS' and
+	concept_code is null
 GROUP BY code,
 	str;
 

FROM concept_synonym s
JOIN concept c ON c.concept_id = s.concept_id
	AND c.vocabulary_id = 'ICD10PCS'
LEFT JOIN sources.icd10pcs i ON i.concept_code = c.concept_code
WHERE i.concept_code IS NULL
	AND c.concept_code NOT LIKE 'MTHU00000_';-- to exclude internal technical source codes

* limitations under the License.
* 
* Authors: Timur Vakhitov, Christian Reich, Eduard Korchmar
* Date: 2021
**************************************************************************/

--1. Update latest_update field to new date
