 ;
 
 --then insert into f_map (also look for domains)
-*/
+
 ;
 --make Suppliers, some clean up
 UPDATE THIN_NEED_TO_MAP


--;
--select * from manual_in_co_dose_1 left join thin_need_to_map on concept_code = gemscript_code where gemscript_code is not null
create table manual_in_co_dose as
select * from manual_in_co_dose_1
union
select * from manual_in_co_dose_2
;
*/
delete from ds_all_tmp where concept_code in (select concept_code from manual_in_co_dose);

commit
;
insert into ds_all_tmp (DOSAGE,DRUG_COMP,CONCEPT_NAME,CONCEPT_CODE,INGREDIENT_CONCEPT_CODE,INGREDIENT_CONCEPT_NAME,VOLUME)
select DOSAGE, '', CONCEPT_NAME, CONCEPT_CODE, INGREDIENT_CONCEPT_CODE, INGREDIENT_CONCEPT_CODE, volume from manual_in_co_dose
;
commit
;
--then merge it with ds_all_tmp, for now temporary decision - make dosages NULL to avoid bug
--remove ' ' inside the dosage to make the same as it was before in dmd

--make Brand Names
--select * from THIN_NEED_TO_MAP where thin_name like 'Generic%'
;
 
drop table b_map_0;
create table b_map_0 AS
select  T.GEMSCRIPT_CODE, T.GEMSCRIPT_NAME, T.THIN_CODE, T.THIN_NAME , C.CONCEPT_ID, C.CONCEPT_NAME, C.vocabulary_id from THIN_NEED_TO_MAP T
