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

Initial configs for amp_pd underlay #958

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion service/local-dev/run_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fi

if [[ ${useVerilyUnderlays} ]]; then
echo "Using Verily underlays."
export TANAGRA_UNDERLAY_FILES=cmssynpuf_verily,aouSR2019q4r4_verily,sd20230831_verily,pilotsynthea2022q3_verily
export TANAGRA_UNDERLAY_FILES=cmssynpuf_verily,aouSR2019q4r4_verily,sd20230831_verily,pilotsynthea2022q3_verily,amp_pd,bhs
export TANAGRA_EXPORT_SHARED_GCP_PROJECT_ID=verily-tanagra-test
export TANAGRA_EXPORT_SHARED_BQ_DATASET_IDS=service_export_us,service_export_uscentral1
export TANAGRA_EXPORT_SHARED_GCS_BUCKET_NAMES=verily-tanagra-test-export-bucket,verily-tanagra-test-export-bucket-uscentral1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ public JobStatistics.QueryStatistics dryRunQuery(
@Nullable Integer pageSize,
@Nullable TableId destinationTable,
@Nullable Clustering clustering) {
LOGGER.info("HEY WILLY");
LOGGER.info(sql);
LOGGER.info("BYE WILLY");
Pair<QueryJobConfiguration, List<BigQuery.QueryResultsOption>> queryJobConfig =
buildQueryJobConfig(
sql, true, queryParams, pageToken, pageSize, destinationTable, clustering, null);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"attribute": "age"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "amp-pd-age",
"displayName": "Age",
"isEnabledForCohorts": true,
"isEnabledForDataFeatureSets": true,
"display": {
"category": "Demographics",
"tags": null
},
"filterBuilder": "core.PrimaryEntityFilterBuilder",
"plugin": "attribute",
"pluginConfig": null,
"pluginConfigFile": "age.json",
"modifiers": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"attribute": "ethnicity"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "amp-pd-ethnicity",
"displayName": "Ethnicity",
"isEnabledForCohorts": true,
"isEnabledForDataFeatureSets": true,
"display": {
"category": "Demographics",
"tags": null
},
"filterBuilder": "core.PrimaryEntityFilterBuilder",
"plugin": "attribute",
"pluginConfig": null,
"pluginConfigFile": "ethnicity.json",
"modifiers": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"attribute": "race"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "amp-pd-race",
"displayName": "Race",
"isEnabledForCohorts": true,
"isEnabledForDataFeatureSets": true,
"display": {
"category": "Demographics",
"tags": null
},
"filterBuilder": "core.PrimaryEntityFilterBuilder",
"plugin": "attribute",
"pluginConfig": null,
"pluginConfigFile": "race.json",
"modifiers": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "amp-pd-sex",
"displayName": "Sex",
"isEnabledForCohorts": true,
"isEnabledForDataFeatureSets": true,
"display": {
"category": "Demographics",
"tags": null
},
"filterBuilder": "core.PrimaryEntityFilterBuilder",
"plugin": "attribute",
"pluginConfig": null,
"pluginConfigFile": "sex.json",
"modifiers": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"attribute": "sex"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
participant_id

FROM `${omopDataset}.Demographics` d

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "dummyEntity",
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "STRING", "valueFieldName": "participant_id" }
],
"idAttribute": "id",
"sourceQueryTableName": "${omopDataset}.Demographics"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SELECT
participant_id,
age_at_baseline,
sex,
race,
ethnicity

FROM `${omopDataset}.Demographics` d

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "person",
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "STRING", "valueFieldName": "participant_id" },
{ "name": "age", "dataType": "INT64", "valueFieldName": "age_at_baseline"},
{ "name": "sex", "dataType": "STRING" },
{ "name": "race", "dataType": "STRING" },
{ "name": "ethnicity", "dataType": "STRING" }
],
"idAttribute": "id",
"optimizeGroupByAttributes": [ "sex", "race", "age" ],
"sourceQueryTableName": "${omopDataset}.Demographics"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "dummyGroup",
"groupEntity": "person",
"itemsEntity": "dummyEntity",
"foreignKeyAttributeItemsEntity": "id"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SELECT
SUBJID as participant_id

FROM `${omopDataset}.DM` d
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "dummyEntity",
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "STRING", "valueFieldName": "participant_id" }
],
"idAttribute": "id",
"sourceQueryTableName": "${dataset}.DM"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SELECT
SUBJID as participant_id,
CAST(age_at_enrollment as INT64) as age,
SEX as sex,
RACE as race

FROM `${omopDataset}.DM` d
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "person",
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "STRING", "valueFieldName": "participant_id" },
{ "name": "age", "dataType": "INT64" },
{ "name": "sex", "dataType": "STRING" },
{ "name": "race", "dataType": "STRING" }
],
"idAttribute": "id",
"sourceQueryTableName": "${dataset}.DM"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "dummyGroup",
"groupEntity": "person",
"itemsEntity": "dummyEntity",
"foreignKeyAttributeItemsEntity": "id"
}
27 changes: 27 additions & 0 deletions underlay/src/main/resources/config/indexer/amp_pd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"underlay": "amp_pd",
"bigQuery": {
"sourceData": {
"projectId": "amp-pd-research",
"datasetId": "2023_v4release_1027",
"sqlSubstitutions": {
"omopDataset": "amp-pd-research.2023_v4release_1027",
"staticTablesDataset": ""
}
},
"indexData": {
"projectId": "aaa-willyn-test",
"datasetId": "amp_pd_index_081624"
},
"queryProjectId": "aaa-willyn-test",
"dataLocation": "us"
},
"dataflow": {
"serviceAccountEmail": "[email protected]",
"dataflowLocation": "us-central1",
"gcsTempDirectory": "gs://dataflow-staging-us-central1-694046000181/temp/",
"workerMachineType": "n1-standard-4",
"usePublicIps": false,
"vpcSubnetworkName": null
}
}
27 changes: 27 additions & 0 deletions underlay/src/main/resources/config/indexer/bhs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"underlay": "bhs",
"bigQuery": {
"sourceData": {
"projectId": "wb-steady-blueberry-8554",
"datasetId": "BF_20240610_Screener",
"sqlSubstitutions": {
"omopDataset": "wb-steady-blueberry-8554.BF_20240610_Screener",
"staticTablesDataset": ""
}
},
"indexData": {
"projectId": "aaa-willyn-test",
"datasetId": "bhs_index_081624"
},
"queryProjectId": "aaa-willyn-test",
"dataLocation": "us"
},
"dataflow": {
"serviceAccountEmail": "[email protected]",
"dataflowLocation": "us-central1",
"gcsTempDirectory": "gs://dataflow-staging-us-central1-694046000181/temp/",
"workerMachineType": "n1-standard-4",
"usePublicIps": false,
"vpcSubnetworkName": null
}
}
21 changes: 21 additions & 0 deletions underlay/src/main/resources/config/service/amp_pd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"underlay": "amp_pd",
"bigQuery": {
"sourceData": {
"projectId": "amp-pd-research",
"datasetId": "2023_v4release_1027",
"sqlSubstitutions": {
"dataset": "amp-pd-research.2023_v4release_1027",
"staticTablesDataset": ""
}
},
"indexData": {
"projectId": "aaa-willyn-test",
"datasetId": "amp_pd_index_081624"
},
"queryProjectId": "aaa-willyn-test",
"dataLocation": "us"
},
"uiConfigFile": "ui.json"
}

20 changes: 20 additions & 0 deletions underlay/src/main/resources/config/service/bhs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"underlay": "bhs",
"bigQuery": {
"sourceData": {
"projectId": "wb-steady-blueberry-8554",
"datasetId": "BF_20240610_Screener",
"sqlSubstitutions": {
"dataset": "wb-steady-blueberry-8554.BF_20240610_Screener",
"staticTablesDataset": ""
}
},
"indexData": {
"projectId": "aaa-willyn-test",
"datasetId": "bhs_index_081624"
},
"queryProjectId": "aaa-willyn-test",
"dataLocation": "us"
},
"uiConfigFile": "ui.json"
}
13 changes: 13 additions & 0 deletions underlay/src/main/resources/config/ui/omop/viz/sex/sex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"sources": [
{
"criteriaSelector": "demographics",
"joins": [],
"attributes": [
{
"attribute": "sex"
}
]
}
]
}
6 changes: 6 additions & 0 deletions underlay/src/main/resources/config/ui/omop/viz/sex/viz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "sex",
"title": "Sex identity",
"dataConfigFile": "sex.json",
"plugin": "core/bar"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"sources": [
{
"criteriaSelector": "demographics",
"joins": [],
"attributes": [
{
"attribute": "sex"
},
{
"attribute": "age",
"numericBucketing": {
"thresholds": [18, 45, 65],
"includeGreater": true
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "sexAndAge",
"title": "Sex and age",
"dataConfigFile": "sexAndAge.json",
"plugin": "core/bar"
}
Loading