Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added participant/pii tables #3

Open
wants to merge 7 commits into
base: master_at_ku
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ all: .make.counts
.make.export_tables: .make.person .make.visit_occurrence .make.condition_occurrence .make.drug_exposure
.make.export_tables: .make.measurement .make.procedure_occurrence .make.observation .make.device_exposure
.make.export_tables: .make.death .make.fact_relationship .make.specimen
.make.export_tables: .make.pii_name .make.pii_email .make.pii_phone_number .make.pii_mrn .make.participant_match .make.pii_address
.make.export_tables: .make.care_site .make.location .make.provider .make.note .make.visit_detail

touch $@

.make.person:
Expand All @@ -28,6 +31,7 @@ all: .make.counts
.make.visit_occurrence:
$(psql) -c "\COPY (select * from omop_id_allofus.visit_occurrence) TO '$(csv_path)visit_occurrence.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.condition_occurrence:
$(psql) -c "\COPY (select * from omop_id_allofus.condition_occurrence) TO '$(csv_path)condition_occurrence.csv' WITH (FORMAT CSV, HEADER);"
touch $@
Expand Down Expand Up @@ -64,6 +68,50 @@ all: .make.counts
$(psql) -c "\COPY (select * from omop_id_allofus.specimen) TO '$(csv_path)specimen.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.pii_name:
$(psql) -c "\COPY (select * from omop_id_allofus.pii_name) TO '$(csv_path)pii_name.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.pii_email:
$(psql) -c "\COPY (select * from omop_id_allofus.pii_email) TO '$(csv_path)pii_email.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.pii_address:
$(psql) -c "\COPY (select * from omop_id_allofus.pii_address) TO '$(csv_path)pii_address.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.pii_phone_number:
$(psql) -c "\COPY (select * from omop_id_allofus.pii_phone_number) TO '$(csv_path)pii_phone_number.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.pii_mrn:
$(psql) -c "\COPY (select * from omop_id_allofus.pii_mrn) TO '$(csv_path)pii_mrn.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.participant_match:
$(psql) -c "\COPY (select * from omop_id_allofus.participant_match) TO '$(csv_path)participant_match.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.care_site:
$(psql) -c "\COPY (select * from omop_id_allofus.care_site) TO '$(csv_path)care_site.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.location:
$(psql) -c "\COPY (select * from omop_id_allofus.location) TO '$(csv_path)location.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.provider:
$(psql) -c "\COPY (select * from omop_id_allofus.provider) TO '$(csv_path)provider.csv' WITH (FORMAT CSV, HEADER, FORCE_QUOTE *) ;"
touch $@

.make.note:
$(psql) -c "\COPY (select * from omop_id_allofus.note) TO '$(csv_path)note.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.visit_detail:
$(psql) -c "\COPY (select * from omop_id_allofus.visit_detail) TO '$(csv_path)visit_detail.csv' WITH (FORMAT CSV, HEADER);"
touch $@

.make.venv:
# create python3 virtual environment
python3 -m pip install --upgrade pip
Expand All @@ -77,5 +125,7 @@ all: .make.counts
touch $@

clean:
rm -rf venv
rm -rf .make.*
rm -rf venv || true
rm -rf .make.* || true
rm -rf $(csv_path)*.csv || true
rm -rf $(csv_path)errors || true