             'LOINC replaced by',
             'RxNorm replaced by',
             'SNOMED replaced by',
-            'ICD9P replaced by',
+            'ICD9P replaced by'
     )
-;
+);
+COMMIT;
 
 UPDATE concept c SET c.invalid_reason='D'
 WHERE c.valid_end_date <> to_date('31.12.2099','dd.mm.yyyy')


-- 9. UPDATE invalid_reason
UPDATE concept SET invalid_reason=NULL WHERE valid_end_date = to_date('31.12.2099','dd.mm.yyyy');

UPDATE concept c SET c.invalid_reason='U' 
WHERE c.valid_end_date <> to_date('31.12.2099','dd.mm.yyyy')

            'LOINC replaced by',
            'RxNorm replaced by',
            'SNOMED replaced by',
            'ICD9P replaced by'
    )
);
COMMIT;
 
-- 10. UPDATE concept_synonym
--remove all existing synonyms, except old ones
