diff --git a/underlay/src/main/resources/config/criteria/sd/criteriaselector/agdSubjectQueue/agdSubjectQueue.json b/underlay/src/main/resources/config/criteria/sd/criteriaselector/agdSubjectQueue/agdSubjectQueue.json new file mode 100644 index 000000000..9fc3ec5a7 --- /dev/null +++ b/underlay/src/main/resources/config/criteria/sd/criteriaselector/agdSubjectQueue/agdSubjectQueue.json @@ -0,0 +1,3 @@ +{ + "attribute": "has_agd_queue" +} diff --git a/underlay/src/main/resources/config/criteria/sd/criteriaselector/agdSubjectQueue/selector.json b/underlay/src/main/resources/config/criteria/sd/criteriaselector/agdSubjectQueue/selector.json new file mode 100644 index 000000000..0b89ee1e4 --- /dev/null +++ b/underlay/src/main/resources/config/criteria/sd/criteriaselector/agdSubjectQueue/selector.json @@ -0,0 +1,15 @@ +{ + "name": "agdSubjectQueue", + "displayName": "AGD Subject Queue", + "isEnabledForCohorts": true, + "isEnabledForDataFeatureSets": false, + "display": { + "category": "BioVU", + "tags": null + }, + "filterBuilder": "core.PrimaryEntityFilterBuilder", + "plugin": "attribute", + "pluginConfig": null, + "pluginConfigFile": "agdSubjectQueue.json", + "modifiers": null +} diff --git a/underlay/src/main/resources/config/datamapping/sd/entity/person/all.sql b/underlay/src/main/resources/config/datamapping/sd/entity/person/all.sql index 71a6c0bef..f86c5a7e9 100644 --- a/underlay/src/main/resources/config/datamapping/sd/entity/person/all.sql +++ b/underlay/src/main/resources/config/datamapping/sd/entity/person/all.sql @@ -13,7 +13,9 @@ SELECT /* As a courtesy, convert string fields to boolean: 0 -> No, 1 -> Yes */ CASE WHEN x.compromise_ind = '1' THEN true WHEN x.compromise_ind = '0' THEN false ELSE null END AS biovu_sample_is_compromised, CASE WHEN x.nonshippable_ind = '1' THEN true WHEN x.nonshippable_ind = '0' THEN false ELSE null END AS biovu_sample_is_nonshippable, - CASE WHEN x.plasma_ind = '1' THEN true WHEN x.plasma_ind = '0' THEN false ELSE null END AS biovu_sample_has_plasma + CASE WHEN x.plasma_ind = '1' THEN true WHEN x.plasma_ind = '0' THEN false ELSE null END AS biovu_sample_has_plasma, + EXISTS + (SELECT 1 FROM `${omopDataset}.x_agd_queue` aq WHERE p.person_id = aq.person_id) AS has_agd_queue FROM `${omopDataset}.person` p diff --git a/underlay/src/main/resources/config/datamapping/sd/entity/person/entity.json b/underlay/src/main/resources/config/datamapping/sd/entity/person/entity.json index 4c982447a..f27e4a026 100644 --- a/underlay/src/main/resources/config/datamapping/sd/entity/person/entity.json +++ b/underlay/src/main/resources/config/datamapping/sd/entity/person/entity.json @@ -16,7 +16,8 @@ { "name": "biovu_sample_dna_yield", "dataType": "INT64" }, { "name": "biovu_sample_is_compromised", "dataType": "BOOLEAN" }, { "name": "biovu_sample_is_nonshippable", "dataType": "BOOLEAN" }, - { "name": "biovu_sample_has_plasma", "dataType": "BOOLEAN" } + { "name": "biovu_sample_has_plasma", "dataType": "BOOLEAN" }, + { "name": "has_agd_queue", "dataType": "BOOLEAN" } ], "idAttribute": "id", "optimizeGroupByAttributes": [ "gender", "race", "age" ] diff --git a/underlay/src/main/resources/config/indexer/sd/sd020240831.json b/underlay/src/main/resources/config/indexer/sd/sd020240831.json new file mode 100644 index 000000000..1332922fc --- /dev/null +++ b/underlay/src/main/resources/config/indexer/sd/sd020240831.json @@ -0,0 +1,25 @@ +{ + "underlay": "sd", + "bigQuery": { + "sourceData": { + "projectId": "vumc-sd-dev", + "datasetId": "sd_20240831", + "sqlSubstitutions": { + "omopDataset": "vumc-sd-dev.sd_20240831", + "staticTablesDataset": "vumc-sd-dev.sd_20240831" + } + }, + "indexData": { + "projectId": "vumc-sd-dev", + "datasetId": "indexed_sd_20240831_1" + }, + "queryProjectId": "vumc-sd-dev", + "dataLocation": "us-central1" + }, + "dataflow": { + "serviceAccountEmail": "sd-dev-dataflow-indexer@vumc-sd-dev.iam.gserviceaccount.com", + "gcsTempDirectory": "gs://dataflow-indexing-sd-dev/temp/", + "workerMachineType": "n1-standard-4", + "usePublicIps": false + } +} diff --git a/underlay/src/main/resources/config/service/sd/sd_20240831_dev.json b/underlay/src/main/resources/config/service/sd/sd_20240831_dev.json new file mode 100644 index 000000000..f0a80ad62 --- /dev/null +++ b/underlay/src/main/resources/config/service/sd/sd_20240831_dev.json @@ -0,0 +1,20 @@ +{ + "underlay": "sd", + "bigQuery": { + "sourceData": { + "projectId": "vumc-sd-dev", + "datasetId": "sd_20240831", + "sqlSubstitutions": { + "omopDataset": "vumc-sd-dev.sd_20240831", + "staticTablesDataset": "vumc-sd-dev.sd_20240831" + } + }, + "indexData": { + "projectId": "vumc-sd-dev", + "datasetId": "indexed_sd_20240831" + }, + "queryProjectId": "vumc-sd-dev", + "dataLocation": "us-central1" + }, + "uiConfigFile": "ui.json" +} diff --git a/underlay/src/main/resources/config/service/sd/sd_20240831_prod.json b/underlay/src/main/resources/config/service/sd/sd_20240831_prod.json new file mode 100644 index 000000000..5dcf20d05 --- /dev/null +++ b/underlay/src/main/resources/config/service/sd/sd_20240831_prod.json @@ -0,0 +1,20 @@ +{ + "underlay": "sd", + "bigQuery": { + "sourceData": { + "projectId": "vumc-sd-prod", + "datasetId": "sd_20240831", + "sqlSubstitutions": { + "omopDataset": "vumc-sd-prod.sd_20240831", + "staticTablesDataset": "vumc-sd-prod.sd_20240831" + } + }, + "indexData": { + "projectId": "vumc-sd-prod", + "datasetId": "indexed_sd_20240831" + }, + "queryProjectId": "vumc-sd-prod", + "dataLocation": "us-central1" + }, + "uiConfigFile": "ui.json" +} diff --git a/underlay/src/main/resources/config/service/sd/sd_20240831_test.json b/underlay/src/main/resources/config/service/sd/sd_20240831_test.json new file mode 100644 index 000000000..4e474aa68 --- /dev/null +++ b/underlay/src/main/resources/config/service/sd/sd_20240831_test.json @@ -0,0 +1,20 @@ +{ + "underlay": "sd", + "bigQuery": { + "sourceData": { + "projectId": "vumc-sd-test", + "datasetId": "sd_20240831", + "sqlSubstitutions": { + "omopDataset": "vumc-sd-test.sd_20240831", + "staticTablesDataset": "vumc-sd-test.sd_20240831" + } + }, + "indexData": { + "projectId": "vumc-sd-test", + "datasetId": "indexed_sd_20240831" + }, + "queryProjectId": "vumc-sd-test", + "dataLocation": "us-central1" + }, + "uiConfigFile": "ui.json" +} diff --git a/underlay/src/main/resources/config/underlay/sd/underlay.json b/underlay/src/main/resources/config/underlay/sd/underlay.json index e585a32a6..099cb0b38 100644 --- a/underlay/src/main/resources/config/underlay/sd/underlay.json +++ b/underlay/src/main/resources/config/underlay/sd/underlay.json @@ -89,6 +89,7 @@ "sd/age", "sd/bioVU", "sd/bioVUPlasma", + "sd/agdSubjectQueue", "sd/genotyping", "sd/measurement", "sd/documents",