User Tools

Site Tools


omop_cdm_bigquery_to_postgress_extraction
  • start VPN (can be default mode)
  • ssh podalv@nero.compute.stanford.edu
  • initialize the environment
module load google
gcloud auth application-default login
  • download all the tables into files on Google Storage
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.concept' gs://cdm-stride8/concept*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.attribute_definition' gs://cdm-stride8/attribute_definition*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.care_site' gs://cdm-stride8/care_site*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.cdm_source' gs://cdm-stride8/cdm_source*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.concept_ancestor' gs://cdm-stride8/concept_ancestor*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.concept_class' gs://cdm-stride8/concept_class*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.concept_relationship' gs://cdm-stride8/concept_relationship*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.concept_synonym' gs://cdm-stride8/concept_synonym*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.condition_era' gs://cdm-stride8/condition_era*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.condition_occurrence' gs://cdm-stride8/condition_occurrence*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.cost' gs://cdm-stride8/cost*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.death' gs://cdm-stride8/death*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.device_exposure' gs://cdm-stride8/device_exposure*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.domain' gs://cdm-stride8/domain*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.dose_era' gs://cdm-stride8/dose_era*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.drug_era' gs://cdm-stride8/drug_era*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.drug_exposure' gs://cdm-stride8/drug_exposure*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.drug_strength' gs://cdm-stride8/drug_strength*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.fact_relationship' gs://cdm-stride8/fact_relationship*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.location' gs://cdm-stride8/location*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.measurement' gs://cdm-stride8/measurement*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.metadata' gs://cdm-stride8/metadata*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.observation' gs://cdm-stride8/observation*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.observation_period' gs://cdm-stride8/observation_period*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.payer_plan_period' gs://cdm-stride8/payer_plan_period*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.person' gs://cdm-stride8/person*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.procedure_occurrence' gs://cdm-stride8/procedure_occurrence*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.provider' gs://cdm-stride8/provider*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.relationship' gs://cdm-stride8/relationship*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.source_to_concept_map' gs://cdm-stride8/source_to_concept_map*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.specimen' gs://cdm-stride8/specimen*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.visit_occurrence' gs://cdm-stride8/visit_occurrence*.csv
bq extract --compression GZIP 'som-nero-phi-nigam-starr:starr_omop_cdm5_deid_20190830004605_fbbdcj.vocabulary' gs://cdm-stride8/vocabulary*.csv
  • download files from Google Storage to Nero
gsutil -m cp gs://cdm-stride8/* /share/pi/nigam/podalv/cdm
  • logout from Nero
  • ssh podalv@shahlab-d01.stanford.edu
  • log into SFTP
sftp podalv@nero.compute.stanford.edu
  • download all the dumped files from Nero to D01
get /share/pi/nigam/podalv/cdm/* /vol0/data5/stride8/temp/cdm
  • exit SFTP
quit
  • rename all the csv files to gz
rename '.csv' '.csv.gz' /vol0/data5/stride8/temp/*.csv
  • login to psql (change the database name to the current one)
psql -h ohdsi.shahlab.stanford.edu -p 5432 -d cdm_stride8_20191011 -U achilles
  • create tables
create table attribute_definition(attribute_definition_id INTEGER, attribute_name TEXT, attribute_description TEXT, attribute_type_concept_id INTEGER, attribute_syntax TEXT);
create table concept(concept_id int not null,concept_name varchar(255) not null,domain_id varchar(20) not null,vocabulary_id varchar(20) not null,concept_class_id varchar(20) not null,standard_concept char null,concept_code varchar(100) not null,valid_start_date date not null,valid_end_date date not null,invalid_reason char null, load_table_id varchar(25));
create table concept_ancestor(ancestor_concept_id integer not null,descendant_concept_id integer not null,min_levels_of_separation integer not null,max_levels_of_separation integer not null,load_table_id varchar(25));
create table care_site(care_site_id bigint not null,care_site_name varchar(255) not null,place_of_service_concept_id integer not null,location_id integer not null,care_site_source_value varchar(255),place_of_service_source_value varchar(255),trace_id varchar(255),unit_id varchar,load_table_id varchar);
create table cdm_source(cdm_source_name varchar,cdm_source_abbreviation varchar,cdm_holder varchar,source_description varchar,source_documentation_reference varchar,cdm_etl_reference varchar,source_release_DATE date,cdm_release_DATE date,cdm_version varchar,vocabulary_version varchar,unit_id varchar,load_table_id varchar);
create table concept_class(concept_class_id varchar not null,concept_class_name varchar not null,concept_class_concept_id integer not null,load_table_id varchar);
create table concept_relationship(concept_id_1 integer not null,concept_id_2 integer not null,relationship_id varchar not null,valid_start_DATE date not null,valid_end_DATE date not null,invalid_reason varchar,load_table_id varchar);
create table concept_synonym(concept_id integer,concept_synonym_name varchar,language_concept_id integer,load_table_id varchar);
create table condition_era(condition_era_id bigint not null,person_id bigint not null,condition_concept_id integer,condition_era_start_DATE date not null,condition_era_end_DATE date not null,condition_occurrence_count integer,unit_id varchar,load_table_id varchar);
create table condition_occurrence(condition_occurrence_id bigint not null,person_id bigint not null,condition_concept_id integer,condition_start_DATE date not null,condition_start_DATETIME timestamp,condition_end_DATE date,condition_end_DATETIME timestamp,condition_type_concept_id int,stop_reason varchar(30),provider_id bigint,visit_occurrence_id bigint,visit_detail_id bigint,condition_source_value varchar(100),condition_source_concept_id int,condition_status_source_value varchar(100),condition_status_concept_id int,trace_id int,unit_id varchar(100),load_table_id varchar(50));create table cost(cost_id bigint,cost_event_id bigint,cost_domain_id bigint,cost_type_concept_id int,currency_concept_id int,total_charge decimal,total_cost decimal,total_paid decimal,paid_by_payer decimal,paid_by_patient decimal,paid_patient_copay decimal,paid_patient_coinsurance decimal,paid_patient_deductible decimal,paid_by_primary decimal,paid_ingredient_cost decimal,paid_dispensing_fee decimal,payer_plan_period_id bigint,amount_allowed decimal,revenue_code_concept_id int,revenue_code_source_value varchar,drg_concept_id int,drg_source_value varchar);
create table death(person_id bigint not null,death_DATE date not null,death_DATETIME timestamp,death_type_concept_id int,cause_concept_id int,cause_source_value varchar,cause_source_concept_id bigint,trace_id varchar,unit_id varchar,load_table_id varchar);
create table device_exposure(device_exposure_id bigint not null,person_id bigint not null,device_concept_id int not null,device_exposure_start_DATE date not null,device_exposure_start_DATETIME timestamp,device_exposure_end_DATE date,device_exposure_end_DATETIME timestamp,device_type_concept_id int,unique_device_id varchar,quantity int,provider_id bigint,visit_occurrence_id bigint,visit_detail_id bigint,device_source_value varchar,device_source_concept_id int,trace_id varchar,unit_id varchar,load_table_id varchar);
create table domain(domain_id varchar not null,domain_name varchar not null,domain_concept_id int not null,load_table_id varchar);
create table dose_era(dose_era_id bigint,person_id bigint,drug_concept_id int,unit_concept_id int,dose_value decimal,dose_era_start_DATE date,dose_era_end_DATE date);
create table drug_era(drug_era_id bigint,person_id bigint,drug_concept_id int,drug_era_start_date date,drug_era_end_date date,drug_exposure_count int,gap_days int,trace_id varchar(50), unit_id varchar,load_table_id varchar);
create table drug_exposure(drug_exposure_id bigint not null,person_id bigint not null,drug_concept_id int not null,drug_exposure_start_DATE date not null,drug_exposure_start_DATETIME timestamp,drug_exposure_end_DATE date not null,drug_exposure_end_DATETIME timestamp,verbatim_end_DATE date,drug_type_concept_id int not null,stop_reason varchar,refills int,quantity decimal,days_supply int,sig varchar,route_concept_id int,lot_number varchar,provider_id bigint,visit_occurrence_id bigint,visit_detail_id bigint,drug_source_value varchar,drug_source_concept_id int,route_source_value varchar,dose_unit_source_value varchar,trace_id varchar,unit_id varchar,load_table_id varchar);
create table drug_strength(drug_concept_id int not null,ingredient_concept_id int not null,amount_value decimal,amount_unit_concept_id int,numerator_value decimal,numerator_unit_concept_id int,denominator_value decimal,denominator_unit_concept_id int,box_size int,valid_start_DATE date not null,valid_end_DATE date not null,invalid_reason varchar,load_table_id varchar);
create table fact_relationship(domain_concept_id_1 bigint not null,fact_id_1 bigint not null,domain_concept_id_2 bigint not null,fact_id_2 bigint not null,relationship_concept_id bigint not null,trace_id varchar,unit_id varchar,load_table_id varchar);
create table location(location_id bigint not null,address_1 varchar,address_2 varchar,city varchar,state varchar,zip varchar,county varchar,location_source_value varchar,unit_id varchar,load_table_id varchar);
create table measurement(measurement_id bigint not null,person_id bigint,measurement_concept_id int not null,measurement_DATE date not null,measurement_DATETIME timestamp,measurement_time varchar,measurement_type_concept_id int not null,operator_concept_id int not null,value_as_number decimal,value_as_concept_id int,unit_concept_id int,range_low decimal,range_high decimal,provider_id bigint,visit_occurrence_id bigint,visit_detail_id bigint,measurement_source_value varchar,measurement_source_concept_id int,unit_source_value varchar,value_source_value varchar,trace_id varchar,unit_id varchar,load_table_id varchar);
create table metadata(metadata_concept_id int not null,metadata_type_concept_id int not null,name varchar not null,value_as_string varchar,value_as_concept_id int,metadata_DATE date,metadata_DATETIME timestamp,unit_id varchar,load_table_id varchar);
create table observation(observation_id bigint not null,person_id bigint not null,observation_concept_id int not null,observation_DATE date not null,observation_DATETIME timestamp,observation_type_concept_id int not null,value_as_number decimal,value_as_string varchar,value_as_concept_id int,qualifier_concept_id int,unit_concept_id int,provider_id bigint,visit_occurrence_id bigint,visit_detail_id bigint,observation_source_value varchar,observation_source_concept_id int,unit_source_value varchar,qualifier_source_value varchar,trace_id varchar,unit_id varchar,load_table_id varchar);
create table observation_period(observation_period_id bigint not null,person_id bigint not null,observation_period_start_DATE date not null,observation_period_end_DATE date not null,period_type_concept_id int not null,trace_id varchar,unit_id varchar,load_table_id varchar);
create table payer_plan_period(payer_plan_period_id bigint,person_id bigint,payer_plan_period_start_DATE date,payer_plan_period_end_DATE date,payer_concept_id int,payer_source_value varchar,payer_source_concept_id bigint,plan_concept_id int,plan_source_value varchar,plan_source_concept_id int,sponsor_concept_id int,sponsor_source_value varchar,sponsor_source_concept_id int,family_source_value varchar,stop_reason_concept_id int,stop_reason_source_value varchar,stop_reason_source_concept_id int);
create table person(person_id bigint not null,gender_concept_id int not null,year_of_birth int not null,month_of_birth int,day_of_birth int,birth_DATETIME timestamp,race_concept_id int not null,ethnicity_concept_id int not null,location_id bigint,provider_id bigint,care_site_id bigint,person_source_value varchar,gender_source_value varchar,gender_source_concept_id int,race_source_value varchar,race_source_concept_id int,ethnicity_source_value varchar,ethnicity_source_concept_id int,trace_id varchar,unit_id varchar,load_table_id varchar);
create table procedure_occurrence(procedure_occurrence_id bigint not null,person_id bigint not null,procedure_concept_id int not null,procedure_DATE date not null,procedure_DATETIME timestamp,procedure_type_concept_id int not null,modifier_concept_id int,quantity int,provider_id bigint,visit_occurrence_id bigint,visit_detail_id bigint,procedure_source_value varchar,procedure_source_concept_id int,modifier_source_value varchar,trace_id varchar,unit_id varchar,load_table_id varchar);
create table provider(provider_id bigint not null,provider_name varchar,npi varchar,dea varchar,specialty_concept_id int,care_site_id bigint,year_of_birth int,gender_concept_id int,provider_source_value varchar,specialty_source_value varchar,specialty_source_concept_id int,gender_source_value varchar,gender_source_concept_id int,trace_id varchar,unit_id varchar,load_table_id varchar);
create table relationship(relationship_id varchar not null,relationship_name varchar,is_hierarchical varchar not null,defines_ancestry varchar not null,reverse_relationship_id varchar not null,relationship_concept_id int not null,load_table_id varchar);
create table source_to_concept_map(source_code varchar,source_concept_id int,source_vocabulary_id varchar,source_code_description varchar,target_concept_id int,target_vocabulary_id varchar,valid_start_DATE date,valid_end_DATE date,invalid_reason varchar);
create table specimen(specimen_id bigint,person_id bigint,specimen_concept_id int,specimen_type_concept_id int,specimen_DATE date,specimen_DATETIME timestamp,quantity decimal,unit_concept_id int,anatomic_site_concept_id int,disease_status_concept_id int,specimen_source_id bigint,specimen_source_value varchar,unit_source_value varchar,anatomic_site_source_value varchar,disease_status_source_value varchar);
create table visit_detail(visit_detail_id bigint,person_id bigint,visit_detail_concept_id int,visit_detail_start_DATE date,visit_detail_start_DATETIME timestamp,visit_detail_end_DATE date,visit_detail_end_DATETIME timestamp,visit_detail_type_concept_id int,provider_id bigint,care_site_id bigint,admitting_source_concept_id int,discharge_to_concept_id int,preceding_visit_detail_id bigint,visit_detail_source_value varchar,visit_detail_source_concept_id int,admitting_source_value varchar,discharge_to_source_value varchar,visit_detail_parent_id bigint,visit_occurrence_id bigint);
create table visit_occurrence(visit_occurrence_id bigint not null,person_id bigint not null,visit_concept_id int not null,visit_start_DATE date not null,visit_start_DATETIME timestamp,visit_end_DATE date not null,visit_end_DATETIME timestamp,visit_type_concept_id int not null,provider_id bigint,care_site_id bigint,visit_source_value varchar,visit_source_concept_id int,admitting_source_concept_id int,admitting_source_value varchar,discharge_to_concept_id int,discharge_to_source_value varchar,preceding_visit_occurrence_id bigint,trace_id varchar,unit_id varchar,load_table_id varchar);
create table vocabulary(vocabulary_id varchar not null,vocabulary_name varchar not null,vocabulary_reference varchar not null,vocabulary_version varchar,vocabulary_concept_id int not null,load_table_id varchar);
  • load data from files (as extract changes, the number of files per table might change, so that needs to be adjusted)
COPY attribute_definition FROM '/labs/shahlab/projects/cdm/attribute_definition000000000000.csv' DELIMITER ',' CSV HEADER;
COPY concept FROM '/labs/shahlab/projects/cdm/concept000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000000.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000001.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000002.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000003.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000004.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000005.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000006.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000007.csv' DELIMITER ',' CSV HEADER;
COPY concept_ancestor FROM '/labs/shahlab/projects/cdm/concept_ancestor000000000008.csv' DELIMITER ',' CSV HEADER;
COPY care_site FROM '/labs/shahlab/projects/cdm/care_site000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY cdm_source FROM '/labs/shahlab/projects/cdm/cdm_source000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_class FROM '/labs/shahlab/projects/cdm/concept_class000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_relationship FROM '/labs/shahlab/projects/cdm/concept_relationship000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_synonym FROM '/labs/shahlab/projects/cdm/concept_synonym000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY concept_synonym FROM '/labs/shahlab/projects/cdm/concept_synonym000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_era FROM '/labs/shahlab/projects/cdm/condition_era000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_era FROM '/labs/shahlab/projects/cdm/condition_era000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_era FROM '/labs/shahlab/projects/cdm/condition_era000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000007.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000008.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000009.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000010.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000011.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000012.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000013.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000014.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY condition_occurrence FROM '/labs/shahlab/projects/cdm/condition_occurrence000000000015.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY cost FROM '/labs/shahlab/projects/cdm/cost000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY death FROM '/labs/shahlab/projects/cdm/death000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY device_exposure FROM '/labs/shahlab/projects/cdm/device_exposure000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY domain FROM '/labs/shahlab/projects/cdm/domain000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY dose_era FROM '/labs/shahlab/projects/cdm/dose_era000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_era FROM '/labs/shahlab/projects/cdm/drug_era000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_era FROM '/labs/shahlab/projects/cdm/drug_era000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_era FROM '/labs/shahlab/projects/cdm/drug_era000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_era FROM '/labs/shahlab/projects/cdm/drug_era000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000007.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000008.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000009.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000010.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000011.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000012.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000013.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000014.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000015.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000016.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000017.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000018.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000019.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000020.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000021.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000022.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000023.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000024.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000025.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000026.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000027.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000028.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000029.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000030.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000031.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000032.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000033.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000034.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000035.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000036.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000037.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000038.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000039.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000040.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000041.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000042.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000043.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000044.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000045.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000046.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000047.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000048.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_exposure FROM '/labs/shahlab/projects/cdm/drug_exposure000000000049.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY drug_strength FROM '/labs/shahlab/projects/cdm/drug_strength000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY fact_relationship FROM '/labs/shahlab/projects/cdm/fact_relationship000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY fact_relationship FROM '/labs/shahlab/projects/cdm/fact_relationship000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY fact_relationship FROM '/labs/shahlab/projects/cdm/fact_relationship000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY location FROM '/labs/shahlab/projects/cdm/location000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000007.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000008.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000009.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000010.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000011.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000012.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000013.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000014.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000015.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000016.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000017.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000018.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000019.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000020.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000021.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000022.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000023.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000024.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000025.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000026.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000027.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000028.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000029.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000030.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000031.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000032.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000033.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000034.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000035.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000036.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000037.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000038.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000039.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000040.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000041.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000042.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000043.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000044.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000045.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000046.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000047.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000048.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000049.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000050.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000051.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000052.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000053.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000054.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000055.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000056.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000057.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000058.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000059.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000060.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000061.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000062.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000063.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000064.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000065.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000066.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000067.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000068.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000069.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000070.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000071.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000072.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000073.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000074.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000075.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000076.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000077.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000078.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000079.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000080.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000081.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000082.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000083.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000084.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000085.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000086.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000087.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000088.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000089.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000090.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000091.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000092.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000093.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000094.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000095.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000096.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000097.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000098.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000099.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000100.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000101.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000102.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000103.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000104.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000105.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000106.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000107.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000108.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000109.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000110.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000111.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000112.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000113.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000114.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000115.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000116.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000117.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000118.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000119.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000120.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000121.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000122.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000123.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000124.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000125.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000126.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000127.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000128.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000129.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000130.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000131.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000132.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000133.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000134.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000135.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000136.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000137.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000138.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000139.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000140.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000141.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000142.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000143.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000144.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000145.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000146.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000147.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000148.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000149.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000150.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000151.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000152.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000153.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000154.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000155.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000156.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000157.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000158.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000159.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000160.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000161.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000162.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000163.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000164.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000165.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000166.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000167.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000168.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000169.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000170.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000171.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000172.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000173.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000174.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000175.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000176.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000177.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000178.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000179.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000180.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000181.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000182.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000183.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000184.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000185.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000186.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000187.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000188.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000189.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000190.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000191.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000192.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000193.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000194.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000195.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000196.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000197.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000198.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY measurement FROM '/labs/shahlab/projects/cdm/measurement000000000199.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY metadata FROM '/labs/shahlab/projects/cdm/metadata000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000007.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000008.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000009.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000010.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000011.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000012.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000013.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000014.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000015.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000016.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000017.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000018.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000019.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000020.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation FROM '/labs/shahlab/projects/cdm/observation000000000021.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY observation_period FROM '/labs/shahlab/projects/cdm/observation_period000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY payer_plan_period FROM '/labs/shahlab/projects/cdm/payer_plan_period000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY person FROM '/labs/shahlab/projects/cdm/person000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000007.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000008.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000009.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000010.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000011.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000012.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000013.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000014.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000015.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY procedure_occurrence FROM '/labs/shahlab/projects/cdm/procedure_occurrence000000000016.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY provider FROM '/labs/shahlab/projects/cdm/provider000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY relationship FROM '/labs/shahlab/projects/cdm/relationship000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY source_to_concept_map FROM '/labs/shahlab/projects/cdm/source_to_concept_map000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY specimen FROM '/labs/shahlab/projects/cdm/specimen000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_detail FROM '/labs/shahlab/projects/cdm/visit_detail000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000001.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000002.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000003.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000004.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000005.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000006.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000007.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000008.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000009.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000010.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000011.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000012.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000013.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000014.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000015.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY visit_occurrence FROM '/labs/shahlab/projects/cdm/visit_occurrence000000000016.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
COPY vocabulary FROM '/labs/shahlab/projects/cdm/vocabulary000000000000.csv' DELIMITER ',' QUOTE '"' CSV HEADER;
  • generate indices
create index measurement_person_id on measurement (person_id);
create index measurement_concept_id on measurement (measurement_concept_id);
create index measurement_type_concept_id on measurement (measurement_type_concept_id);
create index measurement_visit_occurrence_id on measurement (visit_occurrence_id);
create index measurement_visit_detail_id on measurement (visit_detail_id);
create index death_person_id on death (person_id);
create index attribute_definition_id on attribute_definition (attribute_definition_id);
create index attribute_type_concept_id on attribute_definition (attribute_type_concept_id);
create index concept_concept_id on concept (concept_id);
create index concept_domain_id on concept (domain_id);
create index concept_vocabulary_id on concept (vocabulary_id);
create index concept_concept_class_id on concept (concept_class_id);
create index concept_ancestor_ancestor_concept_id on concept_ancestor (ancestor_concept_id);
create index concept_ancestor_descendant_concept_id on concept_ancestor (descendant_concept_id);
create index care_site_care_site_id on care_site (care_site_id);
create index care_site_place_of_service_concept_id on care_site (place_of_service_concept_id);
create index care_site_location_id on care_site (location_id);
create index cdm_source_cdm_source_name on cdm_source (cdm_source_name);
create index cdm_source_cdm_source_abbreviation on cdm_source (cdm_source_abbreviation);
create index concept_class_concept_class_id on concept_class (concept_class_id);
create index concept_class_concept_class_concept_id on concept_class (concept_class_concept_id);
create index concept_relationship_concept_id_1 on concept_relationship (concept_id_1);
create index concept_relationship_concept_id_2 on concept_relationship (concept_id_2);
create index concept_relationship_relationship_id on concept_relationship (relationship_id);
create index concept_synonym_concept_id on concept_synonym (concept_id);
create index concept_synonym_language_concept_id on concept_synonym (language_concept_id);
create index condition_era_condition_era_id on condition_era (condition_era_id);
create index condition_era_person_id on condition_era (person_id);
create index condition_era_condition_concept_id on condition_era (condition_concept_id);
create index condition_occurrence_condition_occurrence_id on condition_occurrence (condition_occurrence_id);
create index condition_occurrence_person_id on condition_occurrence (person_id);
create index condition_occurrence_condition_concept_id on condition_occurrence (condition_concept_id);
create index condition_occurrence_condition_condition_type_concept_id on condition_occurrence (condition_type_concept_id);
create index condition_occurrence_condition_status_concept_id on condition_occurrence (condition_status_concept_id);
create index condition_occurrence_condition_provider_id on condition_occurrence (provider_id);
create index condition_occurrence_condition_visit_occurrence_id on condition_occurrence (visit_occurrence_id);
create index condition_occurrence_visit_detail_id on condition_occurrence (visit_detail_id);
create index cost_cost_id on cost (cost_id);
create index cost_cost_cost_domain_id on cost (cost_domain_id);
create index cost_cost_cost_type_concept_id on cost (cost_type_concept_id);
create index device_exposure_device_exposure_id on device_exposure (device_exposure_id);
create index device_exposure_person_id on device_exposure (person_id);
create index device_exposure_device_concept_id on device_exposure (device_concept_id);
create index device_exposure_device_type_concept_id on device_exposure (device_type_concept_id);
create index device_exposure_provider_id on device_exposure (provider_id);
create index device_exposure_visit_occurrence_id on device_exposure (visit_occurrence_id);
create index device_exposure_visit_detail_id on device_exposure (visit_detail_id);
create index domain_domain_id on domain (domain_id);
create index domain_domain_concept_id on domain (domain_concept_id);
create index dose_era_dose_era_id on dose_era (dose_era_id);
create index dose_era_person_id on dose_era (person_id);
create index dose_era_drug_concept_id on dose_era (drug_concept_id);
create index drug_exposure_drug_exposure_id on drug_exposure (drug_exposure_id);
create index drug_exposure_person_id on drug_exposure (person_id);
create index drug_exposure_drug_concept_id on drug_exposure (drug_concept_id);
create index drug_exposure_drug_type_concept_id on drug_exposure (drug_type_concept_id);
create index drug_exposure_drug_route_concept_id on drug_exposure (route_concept_id);
create index drug_exposure_provider_id on drug_exposure (provider_id);
create index drug_exposure_drug_visit_occurrence_id on drug_exposure (visit_occurrence_id);
create index condition_occurrence_condition_occurrence_id on condition_occurrence (condition_occurrence_id);
create index condition_occurrence_person_id on condition_occurrence (person_id);
create index condition_occurrence_condition_concept_id on condition_occurrence (condition_concept_id);
create index condition_occurrence_condition_condition_type_concept_id on condition_occurrence (condition_type_concept_id);
create index condition_occurrence_condition_status_concept_id on condition_occurrence (condition_status_concept_id);
create index condition_occurrence_condition_provider_id on condition_occurrence (provider_id);
create index condition_occurrence_condition_visit_occurrence_id on condition_occurrence (visit_occurrence_id);
create index condition_occurrence_visit_detail_id on condition_occurrence (visit_detail_id);
create index drug_strength_drug_concept_id on drug_strength (drug_concept_id);
create index drug_strength_ingredient_concept_id on drug_strength (ingredient_concept_id);
create index drug_strength_amount_unit_concept_id on drug_strength (amount_unit_concept_id);
create index fact_relationship_domain_concept_id_1 on fact_relationship (domain_concept_id_1);
create index fact_relationship_domain_concept_id_2 on fact_relationship (domain_concept_id_2);
create index fact_relationship_fact_id_1 on fact_relationship (fact_id_1);
create index fact_relationship_fact_id_2 on fact_relationship (fact_id_2);
create index fact_relationship_relationship_concept_id on fact_relationship (relationship_concept_id);
create index location_location_id on location (location_id);
create index observation_observation_id on observation (observation_id);
create index observation_person_id on observation (person_id);
create index observation_observation_concept_id on observation (observation_concept_id);
create index observation_observation_type_concept_id on observation (observation_type_concept_id);
create index observation_provider_id on observation (provider_id);
create index observation_visit_detail_id on observation (visit_detail_id);
create index idx_observation_observation_date on observation (observation_date);
create index observation_period_observation_period_id on observation_period (observation_period_id);
create index observation_period_person_id on observation_period (person_id);
create index observation_period_period_type_concept_id on observation_period (period_type_concept_id);
create index payer_plan_payer_plan_period_id on payer_plan_period (payer_plan_period_id);
create index payer_plan_payer_concept_id on payer_plan_period (payer_concept_id);
create index payer_plan_plan_concept_id on payer_plan_period (plan_concept_id);
create index payer_plan_sponsor_concept_id on payer_plan_period (sponsor_concept_id);
create index payer_plan_stop_reason_concept_id on payer_plan_period (stop_reason_concept_id);
create index person_person_id on person (person_id);
create index person_gender_concept_id on person (gender_concept_id);
create index person_race_concept_id on person (race_concept_id);
create index person_ethnicity_concept_id on person (ethnicity_concept_id);
create index person_location_id on person (location_id);
create index person_provider_id on person (provider_id);
create index person_care_site_id on person (care_site_id);
create index procedure_occurrence_procedure_occurrence_id on procedure_occurrence (procedure_occurrence_id);
create index procedure_occurrence_person_id on procedure_occurrence (person_id);
create index procedure_occurrence_procedure_concept_id on procedure_occurrence (procedure_concept_id);
create index procedure_occurrence_procedure_type_concept_id on procedure_occurrence (procedure_type_concept_id);
create index procedure_occurrence_provider_id on procedure_occurrence (provider_id);
create index procedure_occurrence_visit_detail_id on procedure_occurrence (visit_detail_id);
create index provider_provider_id on provider (provider_id);
create index provider_specialty_concept_id on provider (specialty_concept_id);
create index relationship_relationship_id on relationship (relationship_id);
create index relationship_reverse_relationship_id on relationship (reverse_relationship_id);
create index relationship_relationship_concept_id on relationship (relationship_concept_id);
create index source_to_concept_map_source_concept_id on source_to_concept_map (source_concept_id);
create index source_to_concept_map_source_vocabulary_id on source_to_concept_map (source_vocabulary_id);
create index source_to_concept_map_target_concept_id on source_to_concept_map (target_concept_id);
create index specimen_specimen_id on specimen (specimen_id);
create index specimen_person_id on specimen (person_id);
create index specimen_specimen_concept_id on specimen (specimen_concept_id);
create index specimen_specimen_type_concept_id on specimen (specimen_type_concept_id);
create index specimen_unit_concept_id on specimen (unit_concept_id);
create index specimen_anatomic_site_concept_id on specimen (anatomic_site_concept_id);
create index specimen_disease_status_concept_id on specimen (disease_status_concept_id);
create index visit_detail_visit_detail_id on visit_detail (visit_detail_id);
create index visit_detail_person_id on visit_detail (person_id);
create index visit_detail_visit_detail_concept_id on visit_detail (visit_detail_concept_id);
create index visit_detail_visit_detail_type_concept_id on visit_detail (visit_detail_type_concept_id);
create index visit_detail_visit_provider_id on visit_detail (provider_id);
create index visit_detail_care_site_id on visit_detail (care_site_id);
create index visit_detail_discharge_to_concept_id on visit_detail (discharge_to_concept_id);
create index visit_detail_preceding_visit_detail_id on visit_detail (preceding_visit_detail_id);
create index visit_occurrence_visit_occurrence_id on visit_occurrence (visit_occurrence_id);
create index visit_occurrence_person_id on visit_occurrence (person_id);
create index visit_occurrence_visit_concept_id on visit_occurrence (visit_concept_id);
create index visit_occurrence_visit_type_concept_id on visit_occurrence (visit_type_concept_id);
create index visit_occurrence_provider_id on visit_occurrence (provider_id);
create index visit_occurrence_care_site_id on visit_occurrence (care_site_id);
create index visit_occurrence_discharge_to_concept_id on visit_occurrence (discharge_to_concept_id);
create index vocabulary_vocabulary_id on vocabulary (vocabulary_id);
create index vocabulary_vocabulary_concept_id on vocabulary (vocabulary_concept_id);
alter table attribute_definition add primary key (attribute_definition_id);
alter table concept add primary key (concept_id);
alter table care_site add primary key (care_site_id);
alter table concept_class add primary key (concept_class_id);
alter table condition_era add primary key (condition_era_id);
alter table condition_occurrence add primary key (condition_occurrence_id);
alter table cost add primary key (cost_id);
alter table death add primary key (person_id);
alter table device_exposure add primary key (device_exposure_id);
alter table domain add primary key (domain_id);
alter table dose_era add primary key (dose_era_id);
alter table drug_era add primary key (drug_era_id);
alter table drug_exposure add primary key (drug_exposure_id);
alter table location add primary key (location_id);
alter table measurement add primary key (measurement_id);
alter table metadata add primary key (metadata_concept_id);
alter table observation add primary key (observation_id);
alter table observation_period add primary key (observation_period_id);
alter table payer_plan_period add primary key (payer_plan_period_id);
alter table person add primary key (person_id);
alter table procedure_occurrence add primary key (procedure_occurrence_id);
alter table provider add primary key (provider_id);
alter table relationship add primary key (relationship_id);
alter table specimen add primary key (specimen_id);
alter table visit_detail add primary key (visit_detail_id);
alter table visit_occurrence add primary key (visit_occurrence_id);
alter table vocabulary add primary key (vocabulary_id);

The best way to load data into PSQL is by running the commands in a batch file

psql -h ohdsi.shahlab.stanford.edu -f sql.txt -p 5432 -d cdm_stride8_20191011 -U achilles
omop_cdm_bigquery_to_postgress_extraction.txt · Last modified: 2019/12/27 10:58 by podalv