 commit;
 
 insert /*+ APPEND */ into internal_relationship_stage 
-select d.concept_code as concept_code_1, 'HCPCS' as vocabulary_id_1,
-  df.concept_code as concept_code_2, 'HCPCS' as vocabulary_id_2
+select d.concept_code as concept_code_1, df.concept_code as concept_code_2
 from drug_concept_stage d
 join drug_concept_stage df on df.concept_code=d.dose_form and df.concept_class_id='Dose Form'
 where d.concept_class_id='Procedure Drug'


create table relationship_to_concept (
  concept_code_1 varchar2(255),
  vocabulary_id_1 varchar2(20),
  concept_id_2 integer,
  precedence integer,
  conversion_factor float

-- Parenterals
insert /*+ APPEND */ into drug_concept_stage_tmp
select 
  '' as concept_name, 'Drug' as domain_id, 'HCPCS' as vocabulary_id, 'Ingredient' as concept_class_id, regexp_replace(lower(concept_name), '(.+?), parenteral.*', '\1') as concept_code, 
  null as possible_excipient, null as valid_start_date, null as valid_end_date, null as invalid_reason, null as dose_form
from drug_concept_stage where dose_form='Parenteral'
;
