diff --git a/service/local-dev/run_server.sh b/service/local-dev/run_server.sh index f617f793b..ddf09691c 100755 --- a/service/local-dev/run_server.sh +++ b/service/local-dev/run_server.sh @@ -5,7 +5,7 @@ usage() { echo "$0 usage flags:" && grep " .)\ #" $0; } usage echo -while getopts ":avm" arg; do +while getopts ":avtmd" arg; do case $arg in a) # Disable authentication. disableAuthChecks=1 @@ -13,9 +13,15 @@ while getopts ":avm" arg; do v) # Use Verily underlays. useVerilyUnderlays=1 ;; + t) # Use AoU test underlays + useAouUnderlays=1 + ;; m) # Use MariaDB. useMariaDB=1 ;; + d) # enable debug-jvm for bootRun. + debugJvm=1 + ;; h | *) # Display help. usage exit 0 @@ -41,6 +47,11 @@ if [[ ${useVerilyUnderlays} ]]; then export TANAGRA_UNDERLAY_FILES=verily/aou_synthetic/expanded/aou_synthetic.json,verily/cms_synpuf/expanded/cms_synpuf.json,verily/sdd/expanded/sdd.json,verily/sdd_refresh0323/expanded/sdd_refresh0323.json,verily/pilot_synthea_2022q3/expanded/pilot_synthea_2022q3.json export TANAGRA_EXPORT_SHARED_GCS_BUCKET_PROJECT_ID=verily-tanagra-dev export TANAGRA_EXPORT_SHARED_GCS_BUCKET_NAMES=verily-tanagra-dev-export-bucket +elif [[ ${useAouUnderlays} ]]; then + echo "Using AoU test underlays." + export TANAGRA_UNDERLAY_FILES=aou/test/SC2022Q4R6/expanded/SC2022Q4R6.json,aou/test/SR2022Q4R6/expanded/SR2022Q4R6.json + export TANAGRA_EXPORT_SHARED_GCS_BUCKET_PROJECT_ID=broad-tanagra-dev + export TANAGRA_EXPORT_SHARED_GCS_BUCKET_NAMES=broad-tanagra-dev-bq-export else echo "Using Broad underlays." export TANAGRA_UNDERLAY_FILES=broad/aou_synthetic/expanded/aou_synthetic.json,broad/cms_synpuf/expanded/cms_synpuf.json @@ -55,12 +66,24 @@ if [[ ${disableAuthChecks} ]]; then echo "Disabling auth checks." export TANAGRA_AUTH_DISABLE_CHECKS=true export TANAGRA_AUTH_BEARER_TOKEN=false + export TANAGRA_AUTH_IAP_GKE_JWT=false else - echo "Enabling auth checks." + echo "Enabling auth checks. bearer-token" export TANAGRA_AUTH_DISABLE_CHECKS=false export TANAGRA_AUTH_BEARER_TOKEN=true + export TANAGRA_AUTH_IAP_GKE_JWT=false fi echo -./gradlew service:bootRun +if [[ ${debugJvm} ]]; then + # ./gradlew service:bootRun --debug-jvm + echo "Enabling server jvm debug" + echo "Listening for transport dt_socket at address: 5005" + ./gradlew service:bootRun -Dagentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 +else + ./gradlew service:bootRun +fi + + + diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/SC2022Q4R6.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/SC2022Q4R6.json new file mode 100644 index 000000000..c637635bd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/SC2022Q4R6.json @@ -0,0 +1,29 @@ +{ + "name" : "SC2022Q4R6", + "dataPointers" : [ { + "type" : "BQ_DATASET", + "name" : "index_dataset", + "projectId" : "fc-aou-cdr-synth-test-2", + "datasetId" : "SC2022Q4R6", + "queryProjectId" : "fc-aou-cdr-synth-test-2", + "dataflowServiceAccountEmail" : "tanagra-indexing-runner@all-of-us-ehr-dev.iam.gserviceaccount.com", + "dataflowTempLocation" : "gs://all-of-us-ehr-dev-tanagra-indexing/SC2022Q4R6/tanagra_index_temp", + "dataflowRegion" : "us-central1", + "dataflowWorkerMachineType" : "n1-standard-4", + "dataflowUsePublicIps" : true + }, { + "type" : "BQ_DATASET", + "name" : "omop_dataset", + "projectId" : "fc-aou-cdr-synth-test-2", + "datasetId" : "SC2022Q4R6", + "queryProjectId" : "fc-aou-cdr-synth-test-2", + "dataflowRegion" : "us-central1", + "dataflowWorkerMachineType" : "n1-standard-4", + "dataflowUsePublicIps" : true + } ], + "entities" : [ "t_device.json", "t_visit_occurrence.json", "t_procedure_occurrence.json", "t_measurement_occurrence.json", "t_measurement.json", "t_condition_occurrence.json", "t_procedure.json", "t_ingredient.json", "t_ingredient_occurrence.json", "t_observation_occurrence.json", "t_brand.json", "t_observation.json", "t_condition.json", "t_device_occurrence.json", "t_person.json", "t_visit.json" ], + "entityGroups" : [ "t_procedure_person_occurrence.json", "t_visit_person_occurrence.json", "t_ingredient_person_occurrence.json", "t_device_person_occurrence.json", "t_condition_person_occurrence.json", "t_measurement_person_occurrence.json", "t_observation_person_occurrence.json", "t_brand_ingredient.json" ], + "primaryEntity" : "t_person", + "uiConfig" : "{ \"dataConfig\": { \"primaryEntity\": { \"displayName\": \"Person\", \"entity\": \"t_person\", \"key\": \"id\", \"classifications\": [ ] }, \"occurrences\": [ { \"id\": \"condition_occurrence\", \"displayName\": \"Condition Occurrences\", \"entity\": \"t_condition_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"condition\", \"attribute\": \"condition\", \"entity\": \"t_condition\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" } } ] }, { \"id\": \"procedure_occurrence\", \"displayName\": \"Procedure Occurrences\", \"entity\": \"t_procedure_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"procedure\", \"attribute\": \"procedure\", \"entity\": \"t_procedure\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" } } ] }, { \"id\": \"observation_occurrence\", \"displayName\": \"Observation Occurrence\", \"entity\": \"t_observation_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"observation\", \"attribute\": \"observation\", \"entity\": \"t_observation\", \"entityAttribute\": \"id\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" } } ] }, { \"id\": \"ingredient_occurrence\", \"displayName\": \"Drug Occurrence\", \"entity\": \"t_ingredient_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"ingredient\", \"attribute\": \"id\", \"entity\": \"t_ingredient\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" }, \"groupings\": [ { \"id\": \"brand\", \"entity\": \"t_brand\", \"defaultSort\": { \"attribute\": \"name\", \"direction\": \"ASC\" }, \"attributes\": [\"name\", \"id\", \"standard_concept\", \"concept_code\"] } ] } ] }, { \"id\": \"measurement_occurrence\", \"displayName\": \"Measurement Occurrence\", \"entity\": \"t_measurement_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"measurement\", \"attribute\": \"measurement\", \"entity\": \"t_measurement\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_item_count\", \"direction\": \"DESC\" } } ] } ] }, \"criteriaConfigs\": [ { \"type\": \"classification\", \"id\": \"tanagra-conditions\", \"title\": \"Condition\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Condition\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"condition_occurrence\", \"classification\": \"condition\", \"modifiers\": [ \"age_at_occurrence\", \"visit_type\", \"start_date_group_by_count\" ] }, { \"type\": \"classification\", \"id\": \"tanagra-procedures\", \"title\": \"Procedure\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Procedure\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"procedure_occurrence\", \"classification\": \"procedure\", \"modifiers\": [\"age_at_occurrence\", \"visit_type\", \"date_group_by_count\"] }, { \"type\": \"classification\", \"id\": \"tanagra-observations\", \"title\": \"Observation\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"observation_occurrence\", \"classification\": \"observation\", \"modifiers\": [\"age_at_occurrence\", \"visit_type\", \"date_group_by_count\"] }, { \"type\": \"classification\", \"id\": \"tanagra-drugs\", \"title\": \"Drug\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Drug\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"ingredient_occurrence\", \"classification\": \"ingredient\", \"modifiers\": [ \"age_at_occurrence\", \"visit_type\", \"start_date_group_by_count\" ] }, { \"type\": \"classification\", \"id\": \"tanagra-measurement\", \"title\": \"Labs and measurements\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_item_count\", \"width\": 120, \"title\": \"Count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Condition\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"measurement_occurrence\", \"classification\": \"measurement\", \"modifiers\": [\"age_at_occurrence\", \"visit_type\", \"date_group_by_count\"], \"valueConfigs\": [ { \"title\": \"Categorical value\", \"attribute\": \"value_enum\" }, { \"title\": \"Numeric value\", \"attribute\": \"value_numeric\" } ] }, { \"type\": \"attribute\", \"id\": \"tanagra-ethnicity\", \"title\": \"Ethnicity\", \"category\": \"Program data\", \"attribute\": \"ethnicity\" }, { \"type\": \"attribute\", \"id\": \"tanagra-gender\", \"title\": \"Gender identity\", \"category\": \"Program data\", \"attribute\": \"gender\" }, { \"type\": \"attribute\", \"id\": \"tanagra-race\", \"title\": \"Race\", \"category\": \"Program data\", \"attribute\": \"race\" }, { \"type\": \"attribute\", \"id\": \"tanagra-age\", \"title\": \"Age\", \"category\": \"Program data\", \"attribute\": \"age\" } ], \"modifierConfigs\": [ { \"type\": \"unhinted-value\", \"id\": \"start_date_group_by_count\", \"title\": \"Occurrence count\", \"attribute\": \"start_date\", \"groupByCount\": true }, { \"type\": \"unhinted-value\", \"id\": \"date_group_by_count\", \"title\": \"Occurrence count\", \"attribute\": \"date\", \"groupByCount\": true }, { \"type\": \"attribute\", \"id\": \"visit_type\", \"title\": \"Visit type\", \"attribute\": \"visit_type\" }, { \"type\": \"attribute\", \"id\": \"age_at_occurrence\", \"title\": \"Age at occurrence\", \"attribute\": \"age_at_occurrence\" } ], \"demographicChartConfigs\": { \"groupByAttributes\": [\"gender\", \"race\", \"age\"], \"chartConfigs\": [ { \"title\": \"Gender identity\", \"primaryProperties\": [{ \"key\": \"gender\" }] }, { \"title\": \"Gender identity, Current age, Race\", \"primaryProperties\": [ { \"key\": \"gender\" }, { \"key\": \"age\", \"buckets\": [ { \"min\": 18, \"max\": 45, \"displayName\": \"18-44\" }, { \"min\": 45, \"max\": 65, \"displayName\": \"45-64\" }, { \"min\": 65, \"displayName\": \"65+\" } ] } ], \"stackedProperty\": { \"key\": \"race\" } } ] }, \"prepackagedConceptSets\": [ { \"id\": \"_demographics\", \"name\": \"Demographics\", \"occurrence\": \"\" }, { \"id\": \"_analgesics\", \"name\": \"Analgesics\", \"occurrence\": \"ingredient_occurrence\", \"filter\": { \"type\": \"CLASSIFICATION\", \"occurrenceId\": \"ingredient_occurrence\", \"classificationId\": \"ingredient\", \"keys\": [21604253] } } ], \"criteriaSearchConfig\": { \"criteriaTypeWidth\": 120, \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept Name\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up Count\" } ] }, \"cohortReviewConfig\": { \"participantsListColumns\": [ { \"key\": \"id\", \"width\": 100, \"title\": \"Id\" }, { \"key\": \"gender\", \"width\": 100, \"title\": \"Gender\" }, { \"key\": \"race\", \"width\": 100, \"title\": \"Race\" }, { \"key\": \"ethnicity\", \"width\": 100, \"title\": \"Ethnicity\" }, { \"key\": \"age\", \"width\": 60, \"title\": \"Year of Birth\" } ], \"attributes\": [ { \"title\": \"Gender\", \"key\": \"gender\" }, { \"title\": \"Age\", \"key\": \"age\" }, { \"title\": \"Race\", \"key\": \"race\" }, { \"title\": \"Ethnicity\", \"key\": \"ethnicity\" } ], \"pages\": [ { \"type\": \"occurrenceTable\", \"id\": \"condition\", \"title\": \"Conditions\", \"plugin\": { \"occurrence\": \"condition_occurrence\", \"columns\": [ { \"key\": \"condition\", \"width\": \"100%\", \"title\": \"Condition name\" }, { \"key\": \"start_date\", \"width\": 200, \"title\": \"Start date\" }, { \"key\": \"end_date\", \"width\": 200, \"title\": \"End date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"procedure\", \"title\": \"Procedures\", \"plugin\": { \"occurrence\": \"procedure_occurrence\", \"columns\": [ { \"key\": \"procedure\", \"width\": \"100%\", \"title\": \"Procedure name\" }, { \"key\": \"date\", \"width\": 200, \"title\": \"Date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"observation\", \"title\": \"Observations\", \"plugin\": { \"occurrence\": \"observation_occurrence\", \"columns\": [ { \"key\": \"observation\", \"width\": \"100%\", \"title\": \"Observation name\" }, { \"key\": \"date\", \"width\": 200, \"title\": \"Date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"ingredient\", \"title\": \"Drugs\", \"plugin\": { \"occurrence\": \"ingredient_occurrence\", \"columns\": [ { \"key\": \"ingredient\", \"width\": \"100%\", \"title\": \"Drug name\" }, { \"key\": \"start_date\", \"width\": 200, \"title\": \"Start date\" }, { \"key\": \"end_date\", \"width\": 200, \"title\": \"End date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"measurements\", \"title\": \"Labs and measurements\", \"plugin\": { \"occurrence\": \"measurement_occurrence\", \"columns\": [ { \"key\": \"measurement\", \"width\": \"100%\", \"title\": \"Lab/measurement name\" }, { \"key\": \"date\", \"width\": 200, \"title\": \"Date\" }, { \"key\": \"value_enum\", \"width\": 160, \"title\": \"Categorical value\" }, { \"key\": \"value_numeric\", \"width\": 160, \"title\": \"Numeric value\" }, { \"key\": \"unit\", \"width\": 160, \"title\": \"Unit\" } ] } } ] } } ", + "metadata" : { } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_brand.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_brand.json new file mode 100644 index 000000000..6cf33dedd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_brand.json @@ -0,0 +1,190 @@ +{ + "name" : "t_brand", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Drug" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Brand Name" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "invalid_reason", + "runtimeCalculated" : false + }, + "operator" : "IS", + "value" : { } + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "RxNorm" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "RxNorm Extension" + } + } ] + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Drug' AND c.concept_class_id = 'Brand Name' AND c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_brand" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_condition.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_condition.json new file mode 100644 index 000000000..e0f53bbe6 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_condition.json @@ -0,0 +1,358 @@ +{ + "name" : "t_condition", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + }, { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 171331 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "PPI" + }, + "display" : "AllOfUs_PPI (Columbia)" + }, + "count" : 74 + }, { + "enumVal" : { + "value" : { + "stringVal" : "CIEL" + }, + "display" : "Columbia International eHealth Laboratory (Columbia University)" + }, + "count" : 38818 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HemOnc" + }, + "display" : "HemOnc" + }, + "count" : 240 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICDO3" + }, + "display" : "International Classification of Diseases for Oncology, Third Edition (WHO)" + }, + "count" : 62535 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD9CM" + }, + "display" : "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" + }, + "count" : 15760 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10CM" + }, + "display" : "International Classification of Diseases, Tenth Revision, Clinical Modification (NCHS)" + }, + "count" : 90699 + }, { + "enumVal" : { + "value" : { + "stringVal" : "Nebraska Lexicon" + }, + "display" : "Nebraska Lexicon" + }, + "count" : 151336 + }, { + "enumVal" : { + "value" : { + "stringVal" : "OMOP Extension" + }, + "display" : "OMOP Extension (OHDSI)" + }, + "count" : 321 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 180133 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Condition" + } + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Condition' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child, FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE cr.relationship_id = 'Subsumes' AND c1.domain_id = c2.domain_id AND c2.domain_id = 'Condition' AND c1.vocabulary_id = c2.vocabulary_id AND c2.vocabulary_id = 'SNOMED' " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "concept_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "int64Val" : 441840 + } + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 20 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_condition" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_condition_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_condition_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_condition" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 20 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_condition_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_condition_occurrence.json new file mode 100644 index 000000000..1b0c6b1cc --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_condition_occurrence.json @@ -0,0 +1,212 @@ +{ + "name" : "t_condition_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "condition", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 2.000023411E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "stop_reason", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : null + }, + "count" : 0 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020479.0, + "maxVal" : 1.5996259E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "condition_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "condition_end_date", + "runtimeCalculated" : false + } + }, + "condition" : { + "value" : { + "column" : "condition_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "condition_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "condition_source_concept_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "condition_occurrence_id", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "condition_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "condition_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_condition_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "condition" : { + "value" : { + "column" : "condition", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_condition", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_device.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_device.json new file mode 100644 index 000000000..71ebd853f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_device.json @@ -0,0 +1,232 @@ +{ + "name" : "t_device", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 218461 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "CPT4" + }, + "display" : "Current Procedural Terminology version 4 (AMA)" + }, + "count" : 24 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 4634 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10PCS" + }, + "display" : "ICD-10 Procedure Coding System (CMS)" + }, + "count" : 3 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NDC" + }, + "display" : "National Drug Code (FDA and manufacturers)" + }, + "count" : 11233 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 202567 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Device" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "S" + } + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Device' AND c.standard_concept = 'S' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_device" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_device_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_device_occurrence.json new file mode 100644 index 000000000..75855f60f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_device_occurrence.json @@ -0,0 +1,185 @@ +{ + "name" : "t_device_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 4.6274116E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020475.0, + "maxVal" : 1.5995732E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "device", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "device_exposure" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "device_exposure_end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "device_source_concept_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "device_exposure_id", + "runtimeCalculated" : false + } + }, + "device" : { + "value" : { + "column" : "device_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "device_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "device_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "device_exposure_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_device_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "device" : { + "value" : { + "column" : "device", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_device", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_ingredient.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_ingredient.json new file mode 100644 index 000000000..d87e5d801 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_ingredient.json @@ -0,0 +1,317 @@ +{ + "name" : "t_ingredient", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 1983181 + }, { + "enumVal" : { + "value" : { + "stringVal" : "C" + }, + "display" : "Unknown" + }, + "count" : 6509 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "RxNorm" + }, + "display" : "RxNorm (NLM)" + }, + "count" : 148594 + }, { + "enumVal" : { + "value" : { + "stringVal" : "RxNorm Extension" + }, + "display" : "RxNorm Extension (OHDSI)" + }, + "count" : 1834587 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ATC" + }, + "display" : "WHO Anatomic Therapeutic Chemical Classification" + }, + "count" : 6509 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "rawSql" : "SELECT c.concept_id AS id, c.concept_name AS name, c.vocabulary_id, c.standard_concept, c.concept_code FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c WHERE c.domain_id = 'Drug' AND ( (c.vocabulary_id = 'ATC' AND c.standard_concept = 'C') OR (c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c.standard_concept = 'S') ) " + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Drug' AND ((c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c.concept_class_id = 'Ingredient' AND c.standard_concept = 'S') OR (c.vocabulary_id = 'RxNorm' AND c.concept_class_id = 'Precise Ingredient') OR (c.vocabulary_id = 'ATC' AND c.concept_class_id IN ('ATC 1st', 'ATC 2nd', 'ATC 3rd', 'ATC 4th', 'ATC 5th') AND c.standard_concept = 'C')) " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE c1.concept_id != c2.concept_id AND c1.domain_id = 'Drug' AND c2.domain_id = 'Drug' AND ( /* Populate Ingredients' ancestors', which are ATCs. See https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:atc#:~:text=the%20original%20ATC%20hierarchy%20is%20extended%20by%20Standard%20Drug%20Products%20of%20RxNorm%20and%20RxNorm%20Extension%20vocabularies%2C%20which%20are%20assigned%20to%20be%20descendants%20of%20the%205th%20ATC%20Classes. Eg: ATC 1st (highest ancestor) Subsumes ATC 2nd ATC 5th (direct parent of RxNorm) Maps to RxNorm */ (c1.vocabulary_id IN ('ATC') AND cr.relationship_id IN ('Subsumes', 'Maps to')) OR /* Populate Ingredients and their descendants: Branded Drug, Clinical Drug, etc. Ingredients and their descendants are RxNorm. drug_exposure contains Ingredients or their descendants. Use [1] and [2] to define hierarchy. Eg \"Marketed Product\" is most specific and is bottom of hierarchy. [1] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:cdm:drug_exposure#:~:text=These%20are%20indicated,is%20available%20%E2%80%9CIngredient%E2%80%9D [2] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:drug#:~:text=are%20not%20implemented.-,Relationships,-As%20usual%2C%20all */ ( c1.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c2.vocabulary_id IN ('RxNorm', 'RxNorm Extension') /* Only keep relationships where c1 is \"parent\" of c2 */ AND cr.relationship_id IN ('Constitutes', 'Contained in' , 'Has form', 'Has quantified form', 'RxNorm ing of', 'RxNorm inverse is a', 'Precise ing of') ) ) " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "ATC" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "ATC 1st" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "C" + } + } ] + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 8 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_ingredient" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_ingredient_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_ingredient_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_ingredient" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 8 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_ingredient_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_ingredient_occurrence.json new file mode 100644 index 000000000..7665ba2e5 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_ingredient_occurrence.json @@ -0,0 +1,256 @@ +{ + "name" : "t_ingredient_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "ingredient", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "refills", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 10.0 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 2.000007519E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "stop_reason", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : null + }, + "count" : 0 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020479.0, + "maxVal" : 1.5996253E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "days_supply", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 180.0 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "drug_exposure" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "drug_exposure_end_date", + "runtimeCalculated" : false + } + }, + "ingredient" : { + "value" : { + "column" : "drug_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "drug_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "refills" : { + "value" : { + "column" : "refills", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "drug_source_concept_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "drug_exposure_id", + "runtimeCalculated" : false + } + }, + "days_supply" : { + "value" : { + "column" : "days_supply", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "drug_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "drug_exposure_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_ingredient_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "ingredient" : { + "value" : { + "column" : "ingredient", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_ingredient", + "runtimeCalculated" : false + } + }, + "refills" : { + "value" : { + "column" : "refills", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "days_supply" : { + "value" : { + "column" : "days_supply", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_measurement.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_measurement.json new file mode 100644 index 000000000..35c2e2623 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_measurement.json @@ -0,0 +1,410 @@ +{ + "name" : "t_measurement", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + }, { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 75626 + }, { + "enumVal" : { + "value" : { + "stringVal" : "C" + }, + "display" : "Unknown" + }, + "count" : 41859 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "LOINC" + }, + "display" : "Logical Observation Identifiers Names and Codes (Regenstrief Institute)" + }, + "count" : 191836 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 29999 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Measurement" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "SNOMED" + } + } ] + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC" + } + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC Hierarchy" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC Component" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Lab Test" + } + } ] + } ] + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE ((c.domain_id = 'Measurement' AND c.vocabulary_id = 'SNOMED') OR (c.vocabulary_id = 'LOINC' AND c.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child, FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE cr.relationship_id = 'Subsumes' AND c1.vocabulary_id = c2.vocabulary_id AND ((c1.vocabulary_id = 'SNOMED' AND c1.domain_id = c2.domain_id AND c1.domain_id = 'Measurement') OR (c1.vocabulary_id = 'LOINC' AND c1.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test') AND c2.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Measurement" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "SNOMED" + } + } ] + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "int64Val" : 36206173 + } + } ] + } ] + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 11 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_measurement" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_measurement_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_measurement_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_measurement" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 11 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_measurement_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_measurement_occurrence.json new file mode 100644 index 000000000..8df913266 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_measurement_occurrence.json @@ -0,0 +1,241 @@ +{ + "name" : "t_measurement_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "unit", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 3.040008559E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020475.0, + "maxVal" : 1.5996262E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "value_numeric", + "dataType" : "DOUBLE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "value_enum", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "measurement", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201234E7, + "maxVal" : 2.0435758E7 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "measurement" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "measurement_date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "unit_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "measurement_source_concept_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "measurement_id", + "runtimeCalculated" : false + } + }, + "value_numeric" : { + "value" : { + "column" : "value_as_number", + "runtimeCalculated" : false + } + }, + "value_enum" : { + "value" : { + "column" : "value_as_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "value_as_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "measurement" : { + "value" : { + "column" : "measurement_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "measurement_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "measurement_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_measurement_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_unit", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "value_numeric" : { + "value" : { + "column" : "value_numeric", + "runtimeCalculated" : false + } + }, + "value_enum" : { + "value" : { + "column" : "value_enum", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_value_enum", + "runtimeCalculated" : false + } + }, + "measurement" : { + "value" : { + "column" : "measurement", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_measurement", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_observation.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_observation.json new file mode 100644 index 000000000..b4a2f0f08 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_observation.json @@ -0,0 +1,340 @@ +{ + "name" : "t_observation", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 134800 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "APC" + }, + "display" : "Ambulatory Payment Classification (CMS)" + }, + "count" : 715 + }, { + "enumVal" : { + "value" : { + "stringVal" : "AoU_Custom" + }, + "display" : "AoU_Custom" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "stringVal" : "AoU_General" + }, + "display" : "AoU_General" + }, + "count" : 13 + }, { + "enumVal" : { + "value" : { + "stringVal" : "CPT4" + }, + "display" : "Current Procedural Terminology version 4 (AMA)" + }, + "count" : 1092 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NAACCR" + }, + "display" : "Data Standards & Data Dictionary Volume II (NAACCR)" + }, + "count" : 96 + }, { + "enumVal" : { + "value" : { + "stringVal" : "DRG" + }, + "display" : "Diagnosis-related group (CMS)" + }, + "count" : 752 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 2667 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICDO3" + }, + "display" : "International Classification of Diseases for Oncology, Third Edition (WHO)" + }, + "count" : 49 + }, { + "enumVal" : { + "value" : { + "stringVal" : "LOINC" + }, + "display" : "Logical Observation Identifiers Names and Codes (Regenstrief Institute)" + }, + "count" : 10831 + }, { + "enumVal" : { + "value" : { + "stringVal" : "MDC" + }, + "display" : "Major Diagnostic Categories (CMS)" + }, + "count" : 26 + }, { + "enumVal" : { + "value" : { + "stringVal" : "PCORNet" + }, + "display" : "National Patient-Centered Clinical Research Network (PCORI)" + }, + "count" : 2 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NUCC" + }, + "display" : "National Uniform Claim Committee Health Care Provider Taxonomy Code Set (NUCC)" + }, + "count" : 4 + }, { + "enumVal" : { + "value" : { + "stringVal" : "Nebraska Lexicon" + }, + "display" : "Nebraska Lexicon" + }, + "count" : 1004 + }, { + "enumVal" : { + "value" : { + "stringVal" : "OMOP Extension" + }, + "display" : "OMOP Extension (OHDSI)" + }, + "count" : 136 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 117406 + }, { + "enumVal" : { + "value" : { + "stringVal" : "UB04 Pri Typ of Adm" + }, + "display" : "UB04 Claim Inpatient Admission Type Code (CMS)" + }, + "count" : 6 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Observation" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "S" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "NOT_EQUALS", + "value" : { + "stringVal" : "PPI" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "NOT_EQUALS", + "value" : { + "stringVal" : "Survey" + } + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Observation' AND c.standard_concept = 'S' AND c.vocabulary_id != 'PPI' AND c.concept_class_id != 'Survey' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_observation" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_observation_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_observation_occurrence.json new file mode 100644 index 000000000..882b93e01 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_observation_occurrence.json @@ -0,0 +1,493 @@ +{ + "name" : "t_observation_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "unit", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 4118133 + }, + "display" : "IU/L" + }, + "count" : 5 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 35289501 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4121007 + }, + "display" : "Seconds" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8799 + }, + "display" : "copies per milliliter" + }, + "count" : 231 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8512 + }, + "display" : "day" + }, + "count" : 2028 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9484 + }, + "display" : "degree" + }, + "count" : 55 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8653 + }, + "display" : "degree Celsius" + }, + "count" : 53 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8529 + }, + "display" : "index" + }, + "count" : 88 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8519 + }, + "display" : "liter" + }, + "count" : 15 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9546 + }, + "display" : "meter" + }, + "count" : 66 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4121396 + }, + "display" : "mg/dL" + }, + "count" : 26047 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8720 + }, + "display" : "microgram per gram" + }, + "count" : 23 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8587 + }, + "display" : "milliliter" + }, + "count" : 87 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8588 + }, + "display" : "millimeter" + }, + "count" : 55 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8876 + }, + "display" : "millimeter mercury column" + }, + "count" : 36 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8753 + }, + "display" : "millimole per liter" + }, + "count" : 22 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8931 + }, + "display" : "million per cubic millimeter" + }, + "count" : 957 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4118323 + }, + "display" : "mmHg" + }, + "count" : 63 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4122417 + }, + "display" : "ng/dL" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9372 + }, + "display" : "ounce (apothecary)" + }, + "count" : 25481 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8647 + }, + "display" : "per microliter" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8554 + }, + "display" : "percent" + }, + "count" : 360 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4120725 + }, + "display" : "pg/mL" + }, + "count" : 1235 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8729 + }, + "display" : "picomole per liter" + }, + "count" : 3 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8555 + }, + "display" : "second" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8525 + }, + "display" : "titer" + }, + "count" : 534 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4121397 + }, + "display" : "ug/dL" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8510 + }, + "display" : "unit" + }, + "count" : 908557 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8763 + }, + "display" : "unit per milliliter" + }, + "count" : 164 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9234 + }, + "display" : "volume percent" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9448 + }, + "display" : "year" + }, + "count" : 129781 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -2.0, + "maxVal" : 2.000023487E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "observation", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "value_as_string", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020475.0, + "maxVal" : 1.5996262E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "value", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201234E7, + "maxVal" : 2.0435758E7 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "observation" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "observation_date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "unit_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "observation_source_concept_id", + "runtimeCalculated" : false + } + }, + "observation" : { + "value" : { + "column" : "observation_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "observation_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "value_as_string" : { + "value" : { + "column" : "value_as_string", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "observation_id", + "runtimeCalculated" : false + } + }, + "value" : { + "value" : { + "column" : "value_as_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "value_as_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "observation_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_observation_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_unit", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "observation" : { + "value" : { + "column" : "observation", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_observation", + "runtimeCalculated" : false + } + }, + "value_as_string" : { + "value" : { + "column" : "value_as_string", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "value" : { + "value" : { + "column" : "value", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_value", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_person.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_person.json new file mode 100644 index 000000000..e6e651472 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_person.json @@ -0,0 +1,382 @@ +{ + "name" : "t_person", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "gender", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 45878463 + }, + "display" : "Female" + }, + "count" : 142307 + }, { + "enumVal" : { + "value" : { + "int64Val" : 45880669 + }, + "display" : "Male" + }, + "count" : 87099 + }, { + "enumVal" : { + "value" : { + "int64Val" : 2000000002 + }, + "display" : "Not man only, not woman only, prefer not to answer, or skipped" + }, + "count" : 5119 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "race", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 2000000001 + }, + "display" : "Another single population" + }, + "count" : 5443 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8515 + }, + "display" : "Asian" + }, + "count" : 7476 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8516 + }, + "display" : "Black or African American" + }, + "count" : 46967 + }, { + "enumVal" : { + "value" : { + "int64Val" : 1177221 + }, + "display" : "I prefer not to answer" + }, + "count" : 1614 + }, { + "enumVal" : { + "value" : { + "int64Val" : 2000000008 + }, + "display" : "More than one population" + }, + "count" : 10727 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 37524 + }, { + "enumVal" : { + "value" : { + "int64Val" : 45882607 + }, + "display" : "None of these" + }, + "count" : 2465 + }, { + "enumVal" : { + "value" : { + "int64Val" : 903096 + }, + "display" : "PMI: Skip" + }, + "count" : 1584 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8527 + }, + "display" : "White" + }, + "count" : 120725 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "ethnicity", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 38003563 + }, + "display" : "Hispanic or Latino" + }, + "count" : 44673 + }, { + "enumVal" : { + "value" : { + "int64Val" : 38003564 + }, + "display" : "Not Hispanic or Latino" + }, + "count" : 184189 + }, { + "enumVal" : { + "value" : { + "int64Val" : 903079 + }, + "display" : "PMI: Prefer Not To Answer" + }, + "count" : 1614 + }, { + "enumVal" : { + "value" : { + "int64Val" : 903096 + }, + "display" : "PMI: Skip" + }, + "count" : 1584 + }, { + "enumVal" : { + "value" : { + "int64Val" : 1586148 + }, + "display" : "What Race Ethnicity: Race Ethnicity None Of These" + }, + "count" : 2465 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "sex_at_birth", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 45878463 + }, + "display" : "Female" + }, + "count" : 143479 + }, { + "enumVal" : { + "value" : { + "int64Val" : 45880669 + }, + "display" : "Male" + }, + "count" : 87821 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 257 + }, { + "enumVal" : { + "value" : { + "int64Val" : 2000000009 + }, + "display" : "Not male, not female, prefer not to answer, or skipped" + }, + "count" : 2968 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "age", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 22.0, + "maxVal" : 93.0 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "year_of_birth", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 1930.0, + "maxVal" : 2001.0 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "person" + }, + "attributeMappings" : { + "gender" : { + "value" : { + "column" : "gender_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "gender_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "race" : { + "value" : { + "column" : "race_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "race_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "ethnicity" : { + "value" : { + "column" : "ethnicity_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "ethnicity_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "sex_at_birth" : { + "value" : { + "column" : "sex_at_birth_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "sex_at_birth_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "age" : { + "value" : { + "column" : "year_of_birth", + "sqlFunctionWrapper" : "EXTRACT(YEAR FROM CURRENT_DATE()) - ${fieldSql}", + "runtimeCalculated" : true + } + }, + "year_of_birth" : { + "value" : { + "column" : "year_of_birth", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_person" + }, + "attributeMappings" : { + "gender" : { + "value" : { + "column" : "gender", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_gender", + "runtimeCalculated" : false + } + }, + "race" : { + "value" : { + "column" : "race", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_race", + "runtimeCalculated" : false + } + }, + "ethnicity" : { + "value" : { + "column" : "ethnicity", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_ethnicity", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "sex_at_birth" : { + "value" : { + "column" : "sex_at_birth", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_sex_at_birth", + "runtimeCalculated" : false + } + }, + "age" : { + "value" : { + "column" : "age", + "sqlFunctionWrapper" : "EXTRACT(YEAR FROM CURRENT_DATE()) - ${fieldSql}", + "runtimeCalculated" : true + } + }, + "year_of_birth" : { + "value" : { + "column" : "year_of_birth", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_procedure.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_procedure.json new file mode 100644 index 000000000..d5c2848b8 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_procedure.json @@ -0,0 +1,390 @@ +{ + "name" : "t_procedure", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + }, { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 266323 + }, { + "enumVal" : { + "value" : { + "stringVal" : "C" + }, + "display" : "Unknown" + }, + "count" : 5756 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "CIEL" + }, + "display" : "Columbia International eHealth Laboratory (Columbia University)" + }, + "count" : 648 + }, { + "enumVal" : { + "value" : { + "stringVal" : "CPT4" + }, + "display" : "Current Procedural Terminology version 4 (AMA)" + }, + "count" : 13409 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NAACCR" + }, + "display" : "Data Standards & Data Dictionary Volume II (NAACCR)" + }, + "count" : 710 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 1289 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HemOnc" + }, + "display" : "HemOnc" + }, + "count" : 99 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10PCS" + }, + "display" : "ICD-10 Procedure Coding System (CMS)" + }, + "count" : 194874 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD9CM" + }, + "display" : "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" + }, + "count" : 177 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD9Proc" + }, + "display" : "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 3 (NCHS)" + }, + "count" : 4657 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10CM" + }, + "display" : "International Classification of Diseases, Tenth Revision, Clinical Modification (NCHS)" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "stringVal" : "LOINC" + }, + "display" : "Logical Observation Identifiers Names and Codes (Regenstrief Institute)" + }, + "count" : 9280 + }, { + "enumVal" : { + "value" : { + "stringVal" : "Nebraska Lexicon" + }, + "display" : "Nebraska Lexicon" + }, + "count" : 72683 + }, { + "enumVal" : { + "value" : { + "stringVal" : "OMOP Extension" + }, + "display" : "OMOP Extension (OHDSI)" + }, + "count" : 2 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 86910 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Procedure" + } + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Procedure' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child, FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE cr.relationship_id = 'Subsumes' AND c1.domain_id = c2.domain_id AND c2.domain_id = 'Procedure' AND c1.vocabulary_id = c2.vocabulary_id AND c2.vocabulary_id = 'SNOMED' " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "concept_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "int64Val" : 4322976 + } + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 19 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_procedure" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_procedure_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_procedure_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_procedure" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 19 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_procedure_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_procedure_occurrence.json new file mode 100644 index 000000000..e2dc63ee7 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_procedure_occurrence.json @@ -0,0 +1,168 @@ +{ + "name" : "t_procedure_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 2.000023474E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020476.0, + "maxVal" : 1.5996259E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "procedure", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "procedure_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "procedure_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "procedure_source_concept_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "procedure_occurrence_id", + "runtimeCalculated" : false + } + }, + "procedure" : { + "value" : { + "column" : "procedure_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "procedure_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "procedure_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_procedure_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "procedure" : { + "value" : { + "column" : "procedure", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_procedure", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_visit.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_visit.json new file mode 100644 index 000000000..b5ea3b01f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_visit.json @@ -0,0 +1,105 @@ +{ + "name" : "t_visit", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Visit" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "S" + } + } ] + } + }, + "attributeMappings" : { + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Visit' AND c.standard_concept = 'S' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_visit" + }, + "attributeMappings" : { + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_visit_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_visit_occurrence.json new file mode 100644 index 000000000..ccf7d7ecd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entity/t_visit_occurrence.json @@ -0,0 +1,367 @@ +{ + "name" : "t_visit_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 5.542608719E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "visit", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 21039000 + }, + "display" : "10 ML Morphine 0.2 MG/ML Prefilled Syringe Box of 10" + }, + "count" : 21 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21050000 + }, + "display" : "2000 ML benzyl benzoate 250 MG/ML Topical Solution" + }, + "count" : 60 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581478 + }, + "display" : "Ambulance Visit" + }, + "count" : 1746 + }, { + "enumVal" : { + "value" : { + "int64Val" : 38004207 + }, + "display" : "Ambulatory Clinic / Center" + }, + "count" : 80437 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581479 + }, + "display" : "Ambulatory Rehabilitation Visit" + }, + "count" : 179 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21056626 + }, + "display" : "Amiodarone 50 MG/ML Oral Suspension" + }, + "count" : 10 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090200 + }, + "display" : "Cholecalciferol 50000 UNT Oral Capsule [Aciferol D3] Box of 10 by Rhodes" + }, + "count" : 2 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090300 + }, + "display" : "Chondroitin Sulfates 400 MG / Glucosamine 500 MG Oral Tablet [Joint-Flex] Box of 60" + }, + "count" : 32 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21036000 + }, + "display" : "Daptomycin 500 MG Injection Box of 1" + }, + "count" : 100 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090500 + }, + "display" : "Diphenhydramine 25 MG Oral Tablet by Ennogen" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9203 + }, + "display" : "Emergency Room Visit" + }, + "count" : 439748 + }, { + "enumVal" : { + "value" : { + "int64Val" : 262 + }, + "display" : "Emergency Room and Inpatient Visit" + }, + "count" : 25323 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090400 + }, + "display" : "Ergocalciferol 300000 UNT/ML Prefilled Syringe Box of 10" + }, + "count" : 75 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581476 + }, + "display" : "Home Visit" + }, + "count" : 40500 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9201 + }, + "display" : "Inpatient Visit" + }, + "count" : 568911 + }, { + "enumVal" : { + "value" : { + "int64Val" : 32036 + }, + "display" : "Laboratory Visit" + }, + "count" : 1850 + }, { + "enumVal" : { + "value" : { + "int64Val" : 12 + }, + "display" : "Modifier" + }, + "count" : 30318 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 1340218 + }, { + "enumVal" : { + "value" : { + "int64Val" : 42898160 + }, + "display" : "Non-hospital institution Visit" + }, + "count" : 22 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581477 + }, + "display" : "Office Visit" + }, + "count" : 629739 + }, { + "enumVal" : { + "value" : { + "int64Val" : 44814711 + }, + "display" : "Other ambulatory visit" + }, + "count" : 4720 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9202 + }, + "display" : "Outpatient Visit" + }, + "count" : 9929594 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581458 + }, + "display" : "Pharmacy visit" + }, + "count" : 25279 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21033000 + }, + "display" : "Risperidone 0.5 MG Oral Tablet by Consilient" + }, + "count" : 17 + }, { + "enumVal" : { + "value" : { + "int64Val" : 44818518 + }, + "display" : "Visit derived from EHR record" + }, + "count" : 856887 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201234E7, + "maxVal" : 2.0435758E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "visit_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "visit_end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "visit_source_concept_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "visit" : { + "value" : { + "column" : "visit_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "visit_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "visit_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "visit_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_visit_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "visit" : { + "value" : { + "column" : "visit", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_visit", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_brand_ingredient.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_brand_ingredient.json new file mode 100644 index 000000000..1cd93f4df --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_brand_ingredient.json @@ -0,0 +1,101 @@ +{ + "type" : "GROUP_ITEMS", + "name" : "t_brand_ingredient", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "groupToItems" : { + "idPairsTable" : { + "rawSql" : "/* 1. User searches for Brand Tylenol 2. User expands Tylenol to see which ingredients are in Tylenol 3. Ingredient Acetaminophen is shown Acetaminophen has over 300 descendants (eg \"acetaminophen 100 MG/ML Oral Suspension\"). Acetaminophen's concept_class_id is Ingredient; descendants' concept_class_ids are Clinical Drug Comp, Quant Clinical Drug, etc. Most descendants have a relationship with Brand Tylenol in concept_relationship. However, we only want to show Acetaminophen in step 3. So only keep relationships with concept_class_id=Ingredient. */ SELECT cr.* FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr, `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 WHERE cr.concept_id_2 = c2.concept_id AND c2.concept_class_id = 'Ingredient' " + }, + "idPairsIdA" : { + "column" : "concept_id_1", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "concept_id_2", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "groupToItems" : { + "idPairsTable" : { + "table" : "idpairs_t_brand_t_ingredient" + }, + "idPairsIdA" : { + "column" : "id_t_brand", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_ingredient", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_brand" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_brand_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_brand_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_brand", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_brand", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "groupEntity" : "t_brand", + "itemsEntity" : "t_ingredient" +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_condition_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_condition_person_occurrence.json new file mode 100644 index 000000000..b942859a6 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_condition_person_occurrence.json @@ -0,0 +1,251 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_condition_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "condition_occurrence" + }, + "idPairsIdA" : { + "column" : "condition_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "condition_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "condition_occurrence" + }, + "idPairsIdA" : { + "column" : "condition_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "condition_occurrence" + }, + "idPairsIdA" : { + "column" : "condition_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_condition_occurrence_t_condition" + }, + "idPairsIdA" : { + "column" : "id_t_condition_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_condition", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_condition_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_condition", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_condition_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_condition_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_condition", + "occurrenceEntity" : "t_condition_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_device_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_device_person_occurrence.json new file mode 100644 index 000000000..3a6ad63d9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_device_person_occurrence.json @@ -0,0 +1,217 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_device_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "device_exposure" + }, + "idPairsIdA" : { + "column" : "device_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "device_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "device_exposure" + }, + "idPairsIdA" : { + "column" : "device_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "device_exposure" + }, + "idPairsIdA" : { + "column" : "device_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_device_occurrence_t_device" + }, + "idPairsIdA" : { + "column" : "id_t_device_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_device", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_device_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_device", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_device_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_device_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_device", + "occurrenceEntity" : "t_device_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_ingredient_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_ingredient_person_occurrence.json new file mode 100644 index 000000000..39d7e4aab --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_ingredient_person_occurrence.json @@ -0,0 +1,251 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_ingredient_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "drug_exposure" + }, + "idPairsIdA" : { + "column" : "drug_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "drug_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "drug_exposure" + }, + "idPairsIdA" : { + "column" : "drug_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "drug_exposure" + }, + "idPairsIdA" : { + "column" : "drug_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_ingredient_occurrence_t_ingredient" + }, + "idPairsIdA" : { + "column" : "id_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_ingredient", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_ingredient_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_ingredient", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_ingredient_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_ingredient", + "occurrenceEntity" : "t_ingredient_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_measurement_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_measurement_person_occurrence.json new file mode 100644 index 000000000..3533f504d --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_measurement_person_occurrence.json @@ -0,0 +1,287 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_measurement_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "measurement" + }, + "idPairsIdA" : { + "column" : "measurement_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "measurement_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "measurement" + }, + "idPairsIdA" : { + "column" : "measurement_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "measurement" + }, + "idPairsIdA" : { + "column" : "measurement_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_measurement_occurrence_t_measurement" + }, + "idPairsIdA" : { + "column" : "id_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_measurement", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_measurement_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_measurement", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_measurement_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { + "modifiers" : { + "tablePointer" : { + "table" : "t_measurement_person_occurrence_modifiers" + }, + "fieldPointers" : { + "min" : { + "column" : "min", + "runtimeCalculated" : false + }, + "enum_count" : { + "column" : "enum_count", + "runtimeCalculated" : false + }, + "max" : { + "column" : "max", + "runtimeCalculated" : false + }, + "enum_display" : { + "column" : "enum_display", + "runtimeCalculated" : false + }, + "enum_value" : { + "column" : "enum_value", + "runtimeCalculated" : false + }, + "attribute_name" : { + "column" : "attribute_name", + "runtimeCalculated" : false + }, + "entity_id" : { + "column" : "entity_id", + "runtimeCalculated" : false + } + } + } + } + }, + "criteriaEntity" : "t_measurement", + "occurrenceEntity" : "t_measurement_occurrence", + "modifierAttributes" : [ "value_numeric", "value_enum" ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_observation_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_observation_person_occurrence.json new file mode 100644 index 000000000..13c5ccc71 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_observation_person_occurrence.json @@ -0,0 +1,217 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_observation_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "observation" + }, + "idPairsIdA" : { + "column" : "observation_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "observation_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "observation" + }, + "idPairsIdA" : { + "column" : "observation_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "observation" + }, + "idPairsIdA" : { + "column" : "observation_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_observation_occurrence_t_observation" + }, + "idPairsIdA" : { + "column" : "id_t_observation_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_observation", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_observation_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_observation", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_observation_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_observation_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_observation", + "occurrenceEntity" : "t_observation_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_procedure_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_procedure_person_occurrence.json new file mode 100644 index 000000000..a56cf02b4 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_procedure_person_occurrence.json @@ -0,0 +1,251 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_procedure_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "procedure_occurrence" + }, + "idPairsIdA" : { + "column" : "procedure_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "procedure_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "procedure_occurrence" + }, + "idPairsIdA" : { + "column" : "procedure_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "procedure_occurrence" + }, + "idPairsIdA" : { + "column" : "procedure_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_procedure_occurrence_t_procedure" + }, + "idPairsIdA" : { + "column" : "id_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_procedure", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_procedure_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_procedure", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_procedure_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_procedure", + "occurrenceEntity" : "t_procedure_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_visit_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_visit_person_occurrence.json new file mode 100644 index 000000000..c3ed53b03 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/expanded/entitygroup/t_visit_person_occurrence.json @@ -0,0 +1,217 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_visit_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "visit_occurrence" + }, + "idPairsIdA" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "visit_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "visit_occurrence" + }, + "idPairsIdA" : { + "column" : "visit_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "visit_occurrence" + }, + "idPairsIdA" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_visit_occurrence_t_visit" + }, + "idPairsIdA" : { + "column" : "id_t_visit_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_visit", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_visit_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_visit", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_visit_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_visit_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_visit", + "occurrenceEntity" : "t_visit_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/SC2022Q4R6.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/SC2022Q4R6.json new file mode 100644 index 000000000..0a28e9013 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/SC2022Q4R6.json @@ -0,0 +1,50 @@ +{ + "name": "SC2022Q4R6", + "displayName": " Controlled Tier Vxx", + "dataPointers": [ + { "type": "BQ_DATASET", + "name": "omop_dataset", + "projectId": "all-of-us-ehr-dev", + "datasetId": "SC2022Q4R6", + "queryProjectId": "all-of-us-ehr-dev" + }, + { "type": "BQ_DATASET", + "name": "index_dataset", + "projectId": "all-of-us-ehr-dev", + "datasetId": "SC2022Q4R6", + "dataflowServiceAccountEmail" : "tanagra-indexing-runner@all-of-us-ehr-dev.iam.gserviceaccount.com", + "dataflowTempLocation" : "gs://all-of-us-ehr-dev-tanagra-indexing/SC2022Q4R6/tanagra_index_temp", + "dataflowRegion": "us-central1", + "dataflowWorkerMachineType" : "n1-standard-4", + "dataflowUsePublicIps": true + } + ], + "entities": [ + "t_brand.json", + "t_condition.json", + "t_condition_occurrence.json", + "t_device.json", + "t_device_occurrence.json", + "t_ingredient.json", + "t_ingredient_occurrence.json", + "t_measurement.json", + "t_measurement_occurrence.json", + "t_observation.json", + "t_observation_occurrence.json", + "t_person.json", + "t_procedure.json", + "t_procedure_occurrence.json", + "t_visit.json", + "t_visit_occurrence.json"], + "primaryEntity": "t_person", + "entityGroups": [ + "t_brand_ingredient.json", + "t_condition_person_occurrence.json", + "t_device_person_occurrence.json", + "t_ingredient_person_occurrence.json", + "t_measurement_person_occurrence.json", + "t_observation_person_occurrence.json", + "t_procedure_person_occurrence.json", + "t_visit_person_occurrence.json"], + "uiConfigFile": "top_level.json" +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_brand.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_brand.json new file mode 100644 index 000000000..4e845ec61 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_brand.json @@ -0,0 +1,56 @@ +{ + "name": "t_brand", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Drug" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Brand Name" } }, + { "type": "BINARY", + "field": { "column": "invalid_reason" }, + "operator": "IS", + "value": { "stringVal": null } }, + { "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "RxNorm" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "RxNorm Extension" } } + ] } ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_brand_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_condition.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_condition.json new file mode 100644 index 000000000..472bbe841 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_condition.json @@ -0,0 +1,57 @@ +{ + "name": "t_condition", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Condition" } } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_condition_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_condition_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { "type": "BINARY", "field": { "column": "concept_id" }, "operator": "EQUALS", "value": { "int64Val": 441840 } } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 20 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_condition_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_condition_occurrence.json new file mode 100644 index 000000000..e6cfcd402 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_condition_occurrence.json @@ -0,0 +1,37 @@ +{ + "name": "t_condition_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "condition" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "stop_reason" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "condition_occurrence" }, + "attributeMappings": { + "id": { "value": { "column": "condition_occurrence_id" } }, + "condition": { + "value": { "column": "condition_concept_id" }, + "display": { + "column": "condition_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "condition_start_date" } }, + "end_date": { "value": { "column": "condition_end_date" } }, + "source_value": { "value": { "column": "condition_source_value" } }, + "source_criteria_id": { "value": { "column": "condition_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_device.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_device.json new file mode 100644 index 000000000..76f2ff4fb --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_device.json @@ -0,0 +1,49 @@ +{ + "name": "t_device", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Device" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "S" } } + ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_device_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_device_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_device_occurrence.json new file mode 100644 index 000000000..93062226e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_device_occurrence.json @@ -0,0 +1,36 @@ +{ + "name": "t_device_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "device" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "device_exposure" }, + "attributeMappings": { + "id": { "value": { "column": "device_exposure_id" } }, + "device": { + "value": { "column": "device_concept_id" }, + "display": { + "column": "device_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "device_exposure_start_date" } }, + "end_date": { "value": { "column": "device_exposure_end_date" } }, + "source_value": { "value": { "column": "device_source_value" } }, + "source_criteria_id": { "value": { "column": "device_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_ingredient.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_ingredient.json new file mode 100644 index 000000000..0238dba24 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_ingredient.json @@ -0,0 +1,64 @@ +{ + "name": "t_ingredient", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "rawSqlFile": "t_ingredient_all.sql" }, + "attributeMappings": { + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_ingredient_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_ingredient_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "ATC" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "ATC 1st" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "C" } } ] } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 8 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_ingredient_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_ingredient_occurrence.json new file mode 100644 index 000000000..2668de6d0 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_ingredient_occurrence.json @@ -0,0 +1,39 @@ +{ + "name": "t_ingredient_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "ingredient" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "stop_reason" }, + { "type": "SIMPLE", "name": "refills" }, + { "type": "SIMPLE", "name": "days_supply" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "drug_exposure" }, + "attributeMappings": { + "id": { "value": { "column": "drug_exposure_id" } }, + "ingredient": { + "value": { "column": "drug_concept_id" }, + "display": { + "column": "drug_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "drug_exposure_start_date" } }, + "end_date": { "value": { "column": "drug_exposure_end_date" } }, + "source_value": { "value": { "column": "drug_source_value" } }, + "source_criteria_id": { "value": { "column": "drug_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_measurement.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_measurement.json new file mode 100644 index 000000000..f53bf7a0c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_measurement.json @@ -0,0 +1,115 @@ +{ + "name": "t_measurement", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Measurement" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "SNOMED" } } ] }, + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC" } }, + { "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC Hierarchy" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC Component" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Lab Test" } } + ] } ] } ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_measurement_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_measurement_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Measurement" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "SNOMED" } } ] }, + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC" } }, + { "type": "BINARY", + "field": { "column": "concept_id" }, + "operator": "EQUALS", + "value": { "int64Val": 36206173 } } ] } ] } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 11 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_measurement_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_measurement_occurrence.json new file mode 100644 index 000000000..9b76a40a2 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_measurement_occurrence.json @@ -0,0 +1,52 @@ +{ + "name": "t_measurement_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "measurement" }, + { "type": "SIMPLE", "name": "date" }, + { "type": "SIMPLE", "name": "value_numeric" }, + { "type": "KEY_AND_DISPLAY", "name": "value_enum" }, + { "type": "KEY_AND_DISPLAY", "name": "unit" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "measurement" }, + "attributeMappings": { + "id": { "value": { "column": "measurement_id" } }, + "measurement": { + "value": { "column": "measurement_concept_id" }, + "display": { + "column": "measurement_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "date": { "value": { "column": "measurement_date" } }, + "value_numeric": { "value": { "column": "value_as_number" } }, + "value_enum": { + "value": { "column": "value_as_concept_id" }, + "display": { + "column": "value_as_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "unit": { + "value": { "column": "unit_concept_id" }, + "display": { + "column": "unit_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "source_value": { "value": { "column": "measurement_source_value" } }, + "source_criteria_id": { "value": { "column": "measurement_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_observation.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_observation.json new file mode 100644 index 000000000..feed01fd9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_observation.json @@ -0,0 +1,57 @@ +{ + "name": "t_observation", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Observation" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "S" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "NOT_EQUALS", + "value": { "stringVal": "PPI" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "NOT_EQUALS", + "value": { "stringVal": "Survey" } } + ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_observation_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_observation_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_observation_occurrence.json new file mode 100644 index 000000000..284d0899c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_observation_occurrence.json @@ -0,0 +1,51 @@ +{ + "name": "t_observation_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "observation" }, + { "type": "SIMPLE", "name": "date" }, + { "type": "SIMPLE", "name": "value_as_string" }, + { "type": "KEY_AND_DISPLAY", "name": "value" }, + { "type": "KEY_AND_DISPLAY", "name": "unit" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "observation" }, + "attributeMappings": { + "id": { "value": { "column": "observation_id" } }, + "observation": { + "value": { "column": "observation_concept_id" }, + "display": { + "column": "observation_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "date": { "value": { "column": "observation_date" } }, + "value": { + "value": { "column": "value_as_concept_id" }, + "display": { + "column": "value_as_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "unit": { + "value": { "column": "unit_concept_id" }, + "display": { + "column": "unit_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "source_value": { "value": { "column": "observation_source_value" } }, + "source_criteria_id": { "value": { "column": "observation_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_person.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_person.json new file mode 100644 index 000000000..8063a55e7 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_person.json @@ -0,0 +1,52 @@ +{ + "name": "t_person", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "year_of_birth" }, + { "type": "SIMPLE", "name": "age" }, + { "type": "KEY_AND_DISPLAY", "name": "gender" }, + { "type": "KEY_AND_DISPLAY", "name": "race" }, + { "type": "KEY_AND_DISPLAY", "name": "ethnicity" }, + { "type": "KEY_AND_DISPLAY", "name": "sex_at_birth" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "person" }, + "attributeMappings": { + "id": { "value": { "column": "person_id" } }, + "age": { "value": { "column": "year_of_birth", "runtimeCalculated": true, "sqlFunctionWrapper": "EXTRACT(YEAR FROM CURRENT_DATE()) - ${fieldSql}" } }, + "gender": { + "value": { "column": "gender_concept_id" }, + "display": { + "column": "gender_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "race": { + "value": { "column": "race_concept_id" }, + "display": { + "column": "race_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "ethnicity": { + "value": { "column": "ethnicity_concept_id" }, + "display": { + "column": "ethnicity_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "sex_at_birth": { + "value": { "column": "sex_at_birth_concept_id" }, + "display": { + "column": "sex_at_birth_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } } + } }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_procedure.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_procedure.json new file mode 100644 index 000000000..cbeca40ca --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_procedure.json @@ -0,0 +1,57 @@ +{ + "name": "t_procedure", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Procedure" } } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_procedure_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_procedure_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { "type": "BINARY", "field": { "column": "concept_id" }, "operator": "EQUALS", "value": { "int64Val": 4322976 } } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 19 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_procedure_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_procedure_occurrence.json new file mode 100644 index 000000000..ae09ad795 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_procedure_occurrence.json @@ -0,0 +1,34 @@ +{ + "name": "t_procedure_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "procedure" }, + { "type": "SIMPLE", "name": "date" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "procedure_occurrence" }, + "attributeMappings": { + "id": { "value": { "column": "procedure_occurrence_id" } }, + "procedure": { + "value": { "column": "procedure_concept_id" }, + "display": { + "column": "procedure_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "date": { "value": { "column": "procedure_date" } }, + "source_value": { "value": { "column": "procedure_source_value" } }, + "source_criteria_id": { "value": { "column": "procedure_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_visit.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_visit.json new file mode 100644 index 000000000..1670f3b13 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_visit.json @@ -0,0 +1,33 @@ +{ + "name": "t_visit", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Visit" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "S" } } ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_visit_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_visit_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_visit_occurrence.json new file mode 100644 index 000000000..c023657a0 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entity/t_visit_occurrence.json @@ -0,0 +1,35 @@ +{ + "name": "t_visit_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "visit" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "visit_occurrence" }, + "attributeMappings": { + "id": { "value": { "column": "visit_occurrence_id" } }, + "visit": { + "value": { "column": "visit_concept_id" }, + "display": { + "column": "visit_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "visit_start_date" } }, + "end_date": { "value": { "column": "visit_end_date" } }, + "source_value": { "value": { "column": "visit_source_value" } }, + "source_criteria_id": { "value": { "column": "visit_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_brand_ingredient.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_brand_ingredient.json new file mode 100644 index 000000000..2530503aa --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_brand_ingredient.json @@ -0,0 +1,19 @@ +{ + "name": "t_brand_ingredient", + "type": "GROUP_ITEMS", + "groupEntity": "t_brand", + "itemsEntity": "t_ingredient", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "groupToItems": { + "idPairsTable": { "rawSqlFile": "t_brand_ingredients.sql" }, + "idPairsIdA": { "column": "concept_id_1" }, + "idPairsIdB": { "column": "concept_id_2" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_condition_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_condition_person_occurrence.json new file mode 100644 index 000000000..2ed6ced4e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_condition_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_condition_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_condition", + "occurrenceEntity": "t_condition_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "condition_occurrence" }, + "idPairsIdA": { "column": "condition_occurrence_id" }, + "idPairsIdB": { "column": "condition_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "condition_occurrence" }, + "idPairsIdA": { "column": "condition_occurrence_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "condition_occurrence" }, + "idPairsIdA": { "column": "condition_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_device_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_device_person_occurrence.json new file mode 100644 index 000000000..dfef3b9a8 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_device_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_device_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_device", + "occurrenceEntity": "t_device_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "device_exposure" }, + "idPairsIdA": { "column": "device_exposure_id" }, + "idPairsIdB": { "column": "device_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "device_exposure" }, + "idPairsIdA": { "column": "device_exposure_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "device_exposure" }, + "idPairsIdA": { "column": "device_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_ingredient_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_ingredient_person_occurrence.json new file mode 100644 index 000000000..ff8b5d26f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_ingredient_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_ingredient_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_ingredient", + "occurrenceEntity": "t_ingredient_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "drug_exposure" }, + "idPairsIdA": { "column": "drug_exposure_id" }, + "idPairsIdB": { "column": "drug_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "drug_exposure" }, + "idPairsIdA": { "column": "drug_exposure_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "drug_exposure" }, + "idPairsIdA": { "column": "drug_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_measurement_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_measurement_person_occurrence.json new file mode 100644 index 000000000..c9feebba2 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_measurement_person_occurrence.json @@ -0,0 +1,30 @@ +{ + "name": "t_measurement_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_measurement", + "occurrenceEntity": "t_measurement_occurrence", + "modifierAttributes": [ "value_numeric", "value_enum" ], + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "measurement" }, + "idPairsIdA": { "column": "measurement_id" }, + "idPairsIdB": { "column": "measurement_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "measurement" }, + "idPairsIdA": { "column": "measurement_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "measurement" }, + "idPairsIdA": { "column": "measurement_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_observation_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_observation_person_occurrence.json new file mode 100644 index 000000000..291b042fd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_observation_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_observation_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_observation", + "occurrenceEntity": "t_observation_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "observation" }, + "idPairsIdA": { "column": "observation_id" }, + "idPairsIdB": { "column": "observation_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "observation" }, + "idPairsIdA": { "column": "observation_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "observation" }, + "idPairsIdA": { "column": "observation_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_procedure_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_procedure_person_occurrence.json new file mode 100644 index 000000000..4eddb08d3 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_procedure_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_procedure_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_procedure", + "occurrenceEntity": "t_procedure_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "procedure_occurrence" }, + "idPairsIdA": { "column": "procedure_occurrence_id" }, + "idPairsIdB": { "column": "procedure_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "procedure_occurrence" }, + "idPairsIdA": { "column": "procedure_occurrence_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "procedure_occurrence" }, + "idPairsIdA": { "column": "procedure_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_visit_person_occurrence.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_visit_person_occurrence.json new file mode 100644 index 000000000..02a5c85d5 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/entitygroup/t_visit_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_visit_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_visit", + "occurrenceEntity": "t_visit_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "visit_occurrence" }, + "idPairsIdA": { "column": "visit_occurrence_id" }, + "idPairsIdB": { "column": "visit_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "visit_occurrence" }, + "idPairsIdA": { "column": "visit_occurrence_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "visit_occurrence" }, + "idPairsIdA": { "column": "visit_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_all.sql new file mode 100644 index 000000000..bb48f139f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_all.sql @@ -0,0 +1,6 @@ +SELECT * +FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` +WHERE + domain_id = 'Drug' AND concept_class_id = 'Brand Name' + AND vocabulary_id IN ('RxNorm', 'RxNorm Extension') + AND DATE_DIFF(CAST(valid_end_date AS DATE), CURRENT_DATE(), DAY) > 0 diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_ingredients.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_ingredients.sql new file mode 100644 index 000000000..8930f3000 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_ingredients.sql @@ -0,0 +1,17 @@ +/* + 1. User searches for Brand Tylenol + 2. User expands Tylenol to see which ingredients are in Tylenol + 3. Ingredient Acetaminophen is shown + + Acetaminophen has over 300 descendants (eg "acetaminophen 100 MG/ML Oral Suspension"). Acetaminophen's + concept_class_id is Ingredient; descendants' concept_class_ids are Clinical Drug Comp, Quant Clinical Drug, etc. + + Most descendants have a relationship with Brand Tylenol in concept_relationship. However, we only want to show + Acetaminophen in step 3. So only keep relationships with concept_class_id=Ingredient. +*/ +SELECT cr.* +FROM + `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr, + `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 +WHERE + cr.concept_id_2 = c2.concept_id AND c2.concept_class_id = 'Ingredient' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_textSearch.sql new file mode 100644 index 000000000..4f42f4636 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_brand_textSearch.sql @@ -0,0 +1,26 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Drug' +AND c.concept_class_id = 'Brand Name' +AND c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_occurrence_all.sql new file mode 100644 index 000000000..9d56b90c4 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + co.condition_occurrence_id AS id, co.person_id, co.condition_concept_id, + co.condition_start_date AS start_date, co.condition_end_date AS end_date, co.stop_reason, + co.condition_source_value AS source_value, co.condition_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(co.condition_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + co.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SC2022Q4R6.condition_occurrence` AS co + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = co.person_id + +LEFT JOIN `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = co.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_parentChild.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_parentChild.sql new file mode 100644 index 000000000..75505c69b --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_parentChild.sql @@ -0,0 +1,12 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child, +FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + cr.relationship_id = 'Subsumes' + AND c1.domain_id = c2.domain_id + AND c2.domain_id = 'Condition' + AND c1.vocabulary_id = c2.vocabulary_id + AND c2.vocabulary_id = 'SNOMED' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_textSearch.sql new file mode 100644 index 000000000..7758b8aea --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_condition_textSearch.sql @@ -0,0 +1,23 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Condition' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_device_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_device_occurrence_all.sql new file mode 100644 index 000000000..afa84229e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_device_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + de.device_exposure_id AS id, de.person_id, de.device_concept_id, + de.device_exposure_start_date AS start_date, de.device_exposure_end_date AS end_date, + de.device_source_value AS source_value, de.device_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(de.device_exposure_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + de.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SC2022Q4R6.device_exposure` AS de + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = de.person_id + +LEFT JOIN `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = de.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_device_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_device_textSearch.sql new file mode 100644 index 000000000..475f8d27c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_device_textSearch.sql @@ -0,0 +1,24 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Device' +AND c.standard_concept = 'S' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_all.sql new file mode 100644 index 000000000..bc7d5214c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_all.sql @@ -0,0 +1,8 @@ +SELECT + c.concept_id AS id, c.concept_name AS name, c.vocabulary_id, c.standard_concept, c.concept_code +FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +WHERE c.domain_id = 'Drug' +AND ( + (c.vocabulary_id = 'ATC' AND c.standard_concept = 'C') + OR (c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c.standard_concept = 'S') +) diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_occurrence_all.sql new file mode 100644 index 000000000..d5bcf1b09 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_occurrence_all.sql @@ -0,0 +1,15 @@ +SELECT + de.drug_exposure_id AS id, de.person_id, de.drug_concept_id, + de.drug_exposure_start_date AS start_date, de.drug_exposure_end_date AS end_date, + de.stop_reason, de.refills, de.days_supply, + de.drug_source_value AS source_value, de.drug_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(de.drug_exposure_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + de.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SC2022Q4R6.drug_exposure` AS de + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = de.person_id + +LEFT JOIN `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = de.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_parentChild.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_parentChild.sql new file mode 100644 index 000000000..c20ec23e2 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_parentChild.sql @@ -0,0 +1,37 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child +FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + c1.concept_id != c2.concept_id + AND c1.domain_id = 'Drug' AND c2.domain_id = 'Drug' + AND ( + + /* + Populate Ingredients' ancestors', which are ATCs. See + https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:atc#:~:text=the%20original%20ATC%20hierarchy%20is%20extended%20by%20Standard%20Drug%20Products%20of%20RxNorm%20and%20RxNorm%20Extension%20vocabularies%2C%20which%20are%20assigned%20to%20be%20descendants%20of%20the%205th%20ATC%20Classes. + Eg: + ATC 1st (highest ancestor) Subsumes ATC 2nd + ATC 5th (direct parent of RxNorm) Maps to RxNorm + */ + (c1.vocabulary_id IN ('ATC') AND cr.relationship_id IN ('Subsumes', 'Maps to')) + + OR + + /* + Populate Ingredients and their descendants: Branded Drug, Clinical Drug, etc. Ingredients and their + descendants are RxNorm. drug_exposure contains Ingredients or their descendants. + Use [1] and [2] to define hierarchy. Eg "Marketed Product" is most specific and is bottom of hierarchy. + [1] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:cdm:drug_exposure#:~:text=These%20are%20indicated,is%20available%20%E2%80%9CIngredient%E2%80%9D + [2] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:drug#:~:text=are%20not%20implemented.-,Relationships,-As%20usual%2C%20all + */ + ( + c1.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + AND c2.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + /* Only keep relationships where c1 is "parent" of c2 */ + AND cr.relationship_id IN ('Constitutes', 'Contained in' , 'Has form', 'Has quantified form', 'RxNorm ing of', 'RxNorm inverse is a', 'Precise ing of') + ) + + ) diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_textSearch.sql new file mode 100644 index 000000000..3fd8a1170 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_ingredient_textSearch.sql @@ -0,0 +1,31 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Drug' +AND ((c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + AND c.concept_class_id = 'Ingredient' + AND c.standard_concept = 'S') + OR (c.vocabulary_id = 'RxNorm' + AND c.concept_class_id = 'Precise Ingredient') + OR (c.vocabulary_id = 'ATC' + AND c.concept_class_id IN ('ATC 1st', 'ATC 2nd', 'ATC 3rd', 'ATC 4th', 'ATC 5th') + AND c.standard_concept = 'C')) diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_occurrence_all.sql new file mode 100644 index 000000000..7c7d9c07f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + mo.measurement_id AS id, mo.person_id, mo.measurement_concept_id, mo.measurement_date, + mo.value_as_number AS value_numeric, mo.value_as_concept_id, mo.unit_concept_id, + mo.measurement_source_value AS source_value, mo.measurement_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(mo.measurement_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + mo.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SC2022Q4R6.measurement` AS mo + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = mo.person_id + +LEFT JOIN `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = mo.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_parentChild.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_parentChild.sql new file mode 100644 index 000000000..875647166 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_parentChild.sql @@ -0,0 +1,13 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child, +FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + cr.relationship_id = 'Subsumes' + AND c1.vocabulary_id = c2.vocabulary_id + AND ((c1.vocabulary_id = 'SNOMED' AND c1.domain_id = c2.domain_id AND c1.domain_id = 'Measurement') + OR (c1.vocabulary_id = 'LOINC' + AND c1.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test') + AND c2.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_textSearch.sql new file mode 100644 index 000000000..44290fd86 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_measurement_textSearch.sql @@ -0,0 +1,24 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE ((c.domain_id = 'Measurement' AND c.vocabulary_id = 'SNOMED') + OR (c.vocabulary_id = 'LOINC' AND c.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_observation_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_observation_occurrence_all.sql new file mode 100644 index 000000000..8f516f5fd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_observation_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + o.observation_id AS id, o.person_id, o.observation_concept_id, + o.observation_date, o.value_as_string, o.value_as_concept_id, o.unit_concept_id, + o.observation_source_value AS source_value, o.observation_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(o.observation_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + o.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SC2022Q4R6.observation` AS o + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = o.person_id + +LEFT JOIN `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = o.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_observation_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_observation_textSearch.sql new file mode 100644 index 000000000..8694e32d1 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_observation_textSearch.sql @@ -0,0 +1,26 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Observation' +AND c.standard_concept = 'S' +AND c.vocabulary_id != 'PPI' +AND c.concept_class_id != 'Survey' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_person.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_person.sql new file mode 100644 index 000000000..16f9c4423 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_person.sql @@ -0,0 +1,4 @@ +SELECT + p.person_id, p.year_of_birth, p.birth_datetime, p.gender_concept_id, p.race_concept_id, p.ethnicity_concept_id +FROM `all-of-us-ehr-dev.SC2022Q4R6.person` p + diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_occurrence_all.sql new file mode 100644 index 000000000..1aff30cf4 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_occurrence_all.sql @@ -0,0 +1,13 @@ +SELECT + po.procedure_occurrence_id AS id, po.person_id, po.procedure_concept_id, po.procedure_date, + po.procedure_source_value AS source_value, po.procedure_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(po.procedure_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + po.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SC2022Q4R6.procedure_occurrence` AS po + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = po.person_id + +LEFT JOIN `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = po.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_parentChild.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_parentChild.sql new file mode 100644 index 000000000..4c6aaf8a4 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_parentChild.sql @@ -0,0 +1,12 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child, +FROM `all-of-us-ehr-dev.SC2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + cr.relationship_id = 'Subsumes' + AND c1.domain_id = c2.domain_id + AND c2.domain_id = 'Procedure' + AND c1.vocabulary_id = c2.vocabulary_id + AND c2.vocabulary_id = 'SNOMED' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_textSearch.sql new file mode 100644 index 000000000..a666571f0 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_procedure_textSearch.sql @@ -0,0 +1,23 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Procedure' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_visit_occurrence_all.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_visit_occurrence_all.sql new file mode 100644 index 000000000..7f87f5b99 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_visit_occurrence_all.sql @@ -0,0 +1,10 @@ +SELECT + vo.visit_occurrence_id AS id, vo.person_id, vo.visit_concept_id, + vo.visit_start_date AS start_date, vo.visit_end_date AS end_date, + vo.visit_source_value AS source_value, vo.visit_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(vo.visit_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence + +FROM `all-of-us-ehr-dev.SC2022Q4R6.visit_occurrence` AS vo + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.person` AS p +ON p.person_id = vo.person_id diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_visit_textSearch.sql b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_visit_textSearch.sql new file mode 100644 index 000000000..540cf9e40 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/sql/t_visit_textSearch.sql @@ -0,0 +1,24 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SC2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SC2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Visit' +AND c.standard_concept = 'S' diff --git a/service/src/main/resources/config/aou/test/SC2022Q4R6/original/ui/top_level.json b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/ui/top_level.json new file mode 100644 index 000000000..d9c8df81c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SC2022Q4R6/original/ui/top_level.json @@ -0,0 +1,468 @@ +{ + "dataConfig": { + "primaryEntity": { + "displayName": "Person", + "entity": "t_person", + "key": "id", + "classifications": [ + ] + }, + "occurrences": [ + { + "id": "condition_occurrence", + "displayName": "Condition Occurrences", + "entity": "t_condition_occurrence", + "key": "id", + "classifications": [ + { + "id": "condition", + "attribute": "condition", + "entity": "t_condition", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + } + } + ] + }, + { + "id": "procedure_occurrence", + "displayName": "Procedure Occurrences", + "entity": "t_procedure_occurrence", + "key": "id", + "classifications": [ + { + "id": "procedure", + "attribute": "procedure", + "entity": "t_procedure", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + } + } + ] + }, + { + "id": "observation_occurrence", + "displayName": "Observation Occurrence", + "entity": "t_observation_occurrence", + "key": "id", + "classifications": [ + { + "id": "observation", + "attribute": "observation", + "entity": "t_observation", + "entityAttribute": "id", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + } + } + ] + }, + { + "id": "ingredient_occurrence", + "displayName": "Drug Occurrence", + "entity": "t_ingredient_occurrence", + "key": "id", + "classifications": [ + { + "id": "ingredient", + "attribute": "id", + "entity": "t_ingredient", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + }, + "groupings": [ + { + "id": "brand", + "entity": "t_brand", + "defaultSort": { + "attribute": "name", + "direction": "ASC" + }, + "attributes": ["name", "id", "standard_concept", "concept_code"] + } + ] + } + ] + }, + { + "id": "measurement_occurrence", + "displayName": "Measurement Occurrence", + "entity": "t_measurement_occurrence", + "key": "id", + "classifications": [ + { + "id": "measurement", + "attribute": "measurement", + "entity": "t_measurement", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_item_count", + "direction": "DESC" + } + } + ] + } + ] + }, + "criteriaConfigs": [ + { + "type": "classification", + "id": "tanagra-conditions", + "title": "Condition", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Condition" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "condition_occurrence", + "classification": "condition", + "modifiers": [ + "age_at_occurrence", + "visit_type", + "start_date_group_by_count" + ] + }, + { + "type": "classification", + "id": "tanagra-procedures", + "title": "Procedure", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Procedure" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "procedure_occurrence", + "classification": "procedure", + "modifiers": ["age_at_occurrence", "visit_type", "date_group_by_count"] + }, + { + "type": "classification", + "id": "tanagra-observations", + "title": "Observation", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "observation_occurrence", + "classification": "observation", + "modifiers": ["age_at_occurrence", "visit_type", "date_group_by_count"] + }, + { + "type": "classification", + "id": "tanagra-drugs", + "title": "Drug", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Drug" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "ingredient_occurrence", + "classification": "ingredient", + "modifiers": [ + "age_at_occurrence", + "visit_type", + "start_date_group_by_count" + ] + }, + { + "type": "classification", + "id": "tanagra-measurement", + "title": "Labs and measurements", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_item_count", "width": 120, "title": "Count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Condition" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "measurement_occurrence", + "classification": "measurement", + "modifiers": ["age_at_occurrence", "visit_type", "date_group_by_count"], + "valueConfigs": [ + { + "title": "Categorical value", + "attribute": "value_enum" + }, + { + "title": "Numeric value", + "attribute": "value_numeric" + } + ] + }, + { + "type": "attribute", + "id": "tanagra-ethnicity", + "title": "Ethnicity", + "category": "Program data", + "attribute": "ethnicity" + }, + { + "type": "attribute", + "id": "tanagra-gender", + "title": "Gender identity", + "category": "Program data", + "attribute": "gender" + }, + { + "type": "attribute", + "id": "tanagra-race", + "title": "Race", + "category": "Program data", + "attribute": "race" + }, + { + "type": "attribute", + "id": "tanagra-age", + "title": "Age", + "category": "Program data", + "attribute": "age" + } + ], + "modifierConfigs": [ + { + "type": "unhinted-value", + "id": "start_date_group_by_count", + "title": "Occurrence count", + "attribute": "start_date", + "groupByCount": true + }, + { + "type": "unhinted-value", + "id": "date_group_by_count", + "title": "Occurrence count", + "attribute": "date", + "groupByCount": true + }, + { + "type": "attribute", + "id": "visit_type", + "title": "Visit type", + "attribute": "visit_type" + }, + { + "type": "attribute", + "id": "age_at_occurrence", + "title": "Age at occurrence", + "attribute": "age_at_occurrence" + } + ], + "demographicChartConfigs": { + "groupByAttributes": ["gender", "race", "age"], + "chartConfigs": [ + { + "title": "Gender identity", + "primaryProperties": [{ "key": "gender" }] + }, + { + "title": "Gender identity, Current age, Race", + "primaryProperties": [ + { "key": "gender" }, + { + "key": "age", + "buckets": [ + { + "min": 18, + "max": 45, + "displayName": "18-44" + }, + { + "min": 45, + "max": 65, + "displayName": "45-64" + }, + { + "min": 65, + "displayName": "65+" + } + ] + } + ], + "stackedProperty": { "key": "race" } + } + ] + }, + "prepackagedConceptSets": [ + { + "id": "_demographics", + "name": "Demographics", + "occurrence": "" + }, + { + "id": "_analgesics", + "name": "Analgesics", + "occurrence": "ingredient_occurrence", + "filter": { + "type": "CLASSIFICATION", + "occurrenceId": "ingredient_occurrence", + "classificationId": "ingredient", + "keys": [21604253] + } + } + ], + "criteriaSearchConfig": { + "criteriaTypeWidth": 120, + "columns": [ + { "key": "name", "width": "100%", "title": "Concept Name" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up Count" } + ] + }, + "cohortReviewConfig": { + "participantsListColumns": [ + { "key": "id", "width": 100, "title": "Id" }, + { "key": "gender", "width": 100, "title": "Gender" }, + { "key": "race", "width": 100, "title": "Race" }, + { "key": "ethnicity", "width": 100, "title": "Ethnicity" }, + { "key": "age", "width": 60, "title": "Year of Birth" } + ], + "attributes": [ + { + "title": "Gender", + "key": "gender" + }, + { + "title": "Age", + "key": "age" + }, + { + "title": "Race", + "key": "race" + }, + { + "title": "Ethnicity", + "key": "ethnicity" + } + ], + "pages": [ + { + "type": "occurrenceTable", + "id": "condition", + "title": "Conditions", + "plugin": { + "occurrence": "condition_occurrence", + "columns": [ + { "key": "condition", "width": "100%", "title": "Condition name" }, + { "key": "start_date", "width": 200, "title": "Start date" }, + { "key": "end_date", "width": 200, "title": "End date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "procedure", + "title": "Procedures", + "plugin": { + "occurrence": "procedure_occurrence", + "columns": [ + { "key": "procedure", "width": "100%", "title": "Procedure name" }, + { "key": "date", "width": 200, "title": "Date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "observation", + "title": "Observations", + "plugin": { + "occurrence": "observation_occurrence", + "columns": [ + { + "key": "observation", + "width": "100%", + "title": "Observation name" + }, + { "key": "date", "width": 200, "title": "Date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "ingredient", + "title": "Drugs", + "plugin": { + "occurrence": "ingredient_occurrence", + "columns": [ + { "key": "ingredient", "width": "100%", "title": "Drug name" }, + { "key": "start_date", "width": 200, "title": "Start date" }, + { "key": "end_date", "width": 200, "title": "End date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "measurements", + "title": "Labs and measurements", + "plugin": { + "occurrence": "measurement_occurrence", + "columns": [ + { + "key": "measurement", + "width": "100%", + "title": "Lab/measurement name" + }, + { "key": "date", "width": 200, "title": "Date" }, + { "key": "value_enum", "width": 160, "title": "Categorical value" }, + { "key": "value_numeric", "width": 160, "title": "Numeric value" }, + { "key": "unit", "width": 160, "title": "Unit" } + ] + } + } + ] + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/SR2022Q4R6.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/SR2022Q4R6.json new file mode 100644 index 000000000..89fc76d36 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/SR2022Q4R6.json @@ -0,0 +1,29 @@ +{ + "name" : "SR2022Q4R6", + "dataPointers" : [ { + "type" : "BQ_DATASET", + "name" : "index_dataset", + "projectId" : "fc-aou-cdr-synth-test", + "datasetId" : "SR2022Q4R6", + "queryProjectId" : "fc-aou-cdr-synth-test", + "dataflowServiceAccountEmail" : "tanagra-indexing-runner@all-of-us-ehr-dev.iam.gserviceaccount.com", + "dataflowTempLocation" : "gs://all-of-us-ehr-dev-tanagra-indexing/SR2022Q4R6/tanagra_index_temp", + "dataflowRegion" : "us-central1", + "dataflowWorkerMachineType" : "n1-standard-4", + "dataflowUsePublicIps" : true + }, { + "type" : "BQ_DATASET", + "name" : "omop_dataset", + "projectId" : "fc-aou-cdr-synth-test", + "datasetId" : "SR2022Q4R6", + "queryProjectId" : "fc-aou-cdr-synth-test", + "dataflowRegion" : "us-central1", + "dataflowWorkerMachineType" : "n1-standard-4", + "dataflowUsePublicIps" : true + } ], + "entities" : [ "t_device.json", "t_visit_occurrence.json", "t_procedure_occurrence.json", "t_measurement_occurrence.json", "t_measurement.json", "t_condition_occurrence.json", "t_procedure.json", "t_ingredient.json", "t_ingredient_occurrence.json", "t_observation_occurrence.json", "t_brand.json", "t_observation.json", "t_condition.json", "t_device_occurrence.json", "t_person.json", "t_visit.json" ], + "entityGroups" : [ "t_procedure_person_occurrence.json", "t_visit_person_occurrence.json", "t_ingredient_person_occurrence.json", "t_device_person_occurrence.json", "t_condition_person_occurrence.json", "t_measurement_person_occurrence.json", "t_observation_person_occurrence.json", "t_brand_ingredient.json" ], + "primaryEntity" : "t_person", + "uiConfig" : "{ \"dataConfig\": { \"primaryEntity\": { \"displayName\": \"Person\", \"entity\": \"t_person\", \"key\": \"id\", \"classifications\": [ ] }, \"occurrences\": [ { \"id\": \"condition_occurrence\", \"displayName\": \"Condition Occurrences\", \"entity\": \"t_condition_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"condition\", \"attribute\": \"condition\", \"entity\": \"t_condition\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" } } ] }, { \"id\": \"procedure_occurrence\", \"displayName\": \"Procedure Occurrences\", \"entity\": \"t_procedure_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"procedure\", \"attribute\": \"procedure\", \"entity\": \"t_procedure\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" } } ] }, { \"id\": \"observation_occurrence\", \"displayName\": \"Observation Occurrence\", \"entity\": \"t_observation_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"observation\", \"attribute\": \"observation\", \"entity\": \"t_observation\", \"entityAttribute\": \"id\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" } } ] }, { \"id\": \"ingredient_occurrence\", \"displayName\": \"Drug Occurrence\", \"entity\": \"t_ingredient_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"ingredient\", \"attribute\": \"id\", \"entity\": \"t_ingredient\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_rollup_count\", \"direction\": \"DESC\" }, \"groupings\": [ { \"id\": \"brand\", \"entity\": \"t_brand\", \"defaultSort\": { \"attribute\": \"name\", \"direction\": \"ASC\" }, \"attributes\": [\"name\", \"id\", \"standard_concept\", \"concept_code\"] } ] } ] }, { \"id\": \"measurement_occurrence\", \"displayName\": \"Measurement Occurrence\", \"entity\": \"t_measurement_occurrence\", \"key\": \"id\", \"classifications\": [ { \"id\": \"measurement\", \"attribute\": \"measurement\", \"entity\": \"t_measurement\", \"entityAttribute\": \"id\", \"hierarchy\": \"standard\", \"defaultSort\": { \"attribute\": \"t_item_count\", \"direction\": \"DESC\" } } ] } ] }, \"criteriaConfigs\": [ { \"type\": \"classification\", \"id\": \"tanagra-conditions\", \"title\": \"Condition\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Condition\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"condition_occurrence\", \"classification\": \"condition\", \"modifiers\": [ \"age_at_occurrence\", \"visit_type\", \"start_date_group_by_count\" ] }, { \"type\": \"classification\", \"id\": \"tanagra-procedures\", \"title\": \"Procedure\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Procedure\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"procedure_occurrence\", \"classification\": \"procedure\", \"modifiers\": [\"age_at_occurrence\", \"visit_type\", \"date_group_by_count\"] }, { \"type\": \"classification\", \"id\": \"tanagra-observations\", \"title\": \"Observation\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"observation_occurrence\", \"classification\": \"observation\", \"modifiers\": [\"age_at_occurrence\", \"visit_type\", \"date_group_by_count\"] }, { \"type\": \"classification\", \"id\": \"tanagra-drugs\", \"title\": \"Drug\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Drug\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"ingredient_occurrence\", \"classification\": \"ingredient\", \"modifiers\": [ \"age_at_occurrence\", \"visit_type\", \"start_date_group_by_count\" ] }, { \"type\": \"classification\", \"id\": \"tanagra-measurement\", \"title\": \"Labs and measurements\", \"conceptSet\": true, \"category\": \"Domains\", \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept name\" }, { \"key\": \"id\", \"width\": 100, \"title\": \"Concept ID\" }, { \"key\": \"standard_concept\", \"width\": 120, \"title\": \"Source/standard\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_item_count\", \"width\": 120, \"title\": \"Count\" } ], \"hierarchyColumns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Condition\" }, { \"key\": \"id\", \"width\": 120, \"title\": \"Concept ID\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up count\" } ], \"occurrence\": \"measurement_occurrence\", \"classification\": \"measurement\", \"modifiers\": [\"age_at_occurrence\", \"visit_type\", \"date_group_by_count\"], \"valueConfigs\": [ { \"title\": \"Categorical value\", \"attribute\": \"value_enum\" }, { \"title\": \"Numeric value\", \"attribute\": \"value_numeric\" } ] }, { \"type\": \"attribute\", \"id\": \"tanagra-ethnicity\", \"title\": \"Ethnicity\", \"category\": \"Program data\", \"attribute\": \"ethnicity\" }, { \"type\": \"attribute\", \"id\": \"tanagra-gender\", \"title\": \"Gender identity\", \"category\": \"Program data\", \"attribute\": \"gender\" }, { \"type\": \"attribute\", \"id\": \"tanagra-race\", \"title\": \"Race\", \"category\": \"Program data\", \"attribute\": \"race\" }, { \"type\": \"attribute\", \"id\": \"tanagra-age\", \"title\": \"Age\", \"category\": \"Program data\", \"attribute\": \"age\" } ], \"modifierConfigs\": [ { \"type\": \"unhinted-value\", \"id\": \"start_date_group_by_count\", \"title\": \"Occurrence count\", \"attribute\": \"start_date\", \"groupByCount\": true }, { \"type\": \"unhinted-value\", \"id\": \"date_group_by_count\", \"title\": \"Occurrence count\", \"attribute\": \"date\", \"groupByCount\": true }, { \"type\": \"attribute\", \"id\": \"visit_type\", \"title\": \"Visit type\", \"attribute\": \"visit_type\" }, { \"type\": \"attribute\", \"id\": \"age_at_occurrence\", \"title\": \"Age at occurrence\", \"attribute\": \"age_at_occurrence\" } ], \"demographicChartConfigs\": { \"groupByAttributes\": [\"gender\", \"race\", \"age\"], \"chartConfigs\": [ { \"title\": \"Gender identity\", \"primaryProperties\": [{ \"key\": \"gender\" }] }, { \"title\": \"Gender identity, Current age, Race\", \"primaryProperties\": [ { \"key\": \"gender\" }, { \"key\": \"age\", \"buckets\": [ { \"min\": 18, \"max\": 45, \"displayName\": \"18-44\" }, { \"min\": 45, \"max\": 65, \"displayName\": \"45-64\" }, { \"min\": 65, \"displayName\": \"65+\" } ] } ], \"stackedProperty\": { \"key\": \"race\" } } ] }, \"prepackagedConceptSets\": [ { \"id\": \"_demographics\", \"name\": \"Demographics\", \"occurrence\": \"\" }, { \"id\": \"_analgesics\", \"name\": \"Analgesics\", \"occurrence\": \"ingredient_occurrence\", \"filter\": { \"type\": \"CLASSIFICATION\", \"occurrenceId\": \"ingredient_occurrence\", \"classificationId\": \"ingredient\", \"keys\": [21604253] } } ], \"criteriaSearchConfig\": { \"criteriaTypeWidth\": 120, \"columns\": [ { \"key\": \"name\", \"width\": \"100%\", \"title\": \"Concept Name\" }, { \"key\": \"vocabulary_t_value\", \"width\": 120, \"title\": \"Vocab\" }, { \"key\": \"concept_code\", \"width\": 120, \"title\": \"Code\" }, { \"key\": \"t_rollup_count\", \"width\": 120, \"title\": \"Roll-up Count\" } ] }, \"cohortReviewConfig\": { \"participantsListColumns\": [ { \"key\": \"id\", \"width\": 100, \"title\": \"Id\" }, { \"key\": \"gender\", \"width\": 100, \"title\": \"Gender\" }, { \"key\": \"race\", \"width\": 100, \"title\": \"Race\" }, { \"key\": \"ethnicity\", \"width\": 100, \"title\": \"Ethnicity\" }, { \"key\": \"age\", \"width\": 60, \"title\": \"Year of Birth\" } ], \"attributes\": [ { \"title\": \"Gender\", \"key\": \"gender\" }, { \"title\": \"Age\", \"key\": \"age\" }, { \"title\": \"Race\", \"key\": \"race\" }, { \"title\": \"Ethnicity\", \"key\": \"ethnicity\" } ], \"pages\": [ { \"type\": \"occurrenceTable\", \"id\": \"condition\", \"title\": \"Conditions\", \"plugin\": { \"occurrence\": \"condition_occurrence\", \"columns\": [ { \"key\": \"condition\", \"width\": \"100%\", \"title\": \"Condition name\" }, { \"key\": \"start_date\", \"width\": 200, \"title\": \"Start date\" }, { \"key\": \"end_date\", \"width\": 200, \"title\": \"End date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"procedure\", \"title\": \"Procedures\", \"plugin\": { \"occurrence\": \"procedure_occurrence\", \"columns\": [ { \"key\": \"procedure\", \"width\": \"100%\", \"title\": \"Procedure name\" }, { \"key\": \"date\", \"width\": 200, \"title\": \"Date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"observation\", \"title\": \"Observations\", \"plugin\": { \"occurrence\": \"observation_occurrence\", \"columns\": [ { \"key\": \"observation\", \"width\": \"100%\", \"title\": \"Observation name\" }, { \"key\": \"date\", \"width\": 200, \"title\": \"Date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"ingredient\", \"title\": \"Drugs\", \"plugin\": { \"occurrence\": \"ingredient_occurrence\", \"columns\": [ { \"key\": \"ingredient\", \"width\": \"100%\", \"title\": \"Drug name\" }, { \"key\": \"start_date\", \"width\": 200, \"title\": \"Start date\" }, { \"key\": \"end_date\", \"width\": 200, \"title\": \"End date\" } ] } }, { \"type\": \"occurrenceTable\", \"id\": \"measurements\", \"title\": \"Labs and measurements\", \"plugin\": { \"occurrence\": \"measurement_occurrence\", \"columns\": [ { \"key\": \"measurement\", \"width\": \"100%\", \"title\": \"Lab/measurement name\" }, { \"key\": \"date\", \"width\": 200, \"title\": \"Date\" }, { \"key\": \"value_enum\", \"width\": 160, \"title\": \"Categorical value\" }, { \"key\": \"value_numeric\", \"width\": 160, \"title\": \"Numeric value\" }, { \"key\": \"unit\", \"width\": 160, \"title\": \"Unit\" } ] } } ] } } ", + "metadata" : { } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_brand.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_brand.json new file mode 100644 index 000000000..e31f880be --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_brand.json @@ -0,0 +1,190 @@ +{ + "name" : "t_brand", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Drug" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Brand Name" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "invalid_reason", + "runtimeCalculated" : false + }, + "operator" : "IS", + "value" : { } + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "RxNorm" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "RxNorm Extension" + } + } ] + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Drug' AND c.concept_class_id = 'Brand Name' AND c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_brand" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_condition.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_condition.json new file mode 100644 index 000000000..f2a0ab2d9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_condition.json @@ -0,0 +1,358 @@ +{ + "name" : "t_condition", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + }, { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 171331 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "PPI" + }, + "display" : "AllOfUs_PPI (Columbia)" + }, + "count" : 74 + }, { + "enumVal" : { + "value" : { + "stringVal" : "CIEL" + }, + "display" : "Columbia International eHealth Laboratory (Columbia University)" + }, + "count" : 38818 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HemOnc" + }, + "display" : "HemOnc" + }, + "count" : 240 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICDO3" + }, + "display" : "International Classification of Diseases for Oncology, Third Edition (WHO)" + }, + "count" : 62535 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD9CM" + }, + "display" : "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" + }, + "count" : 15760 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10CM" + }, + "display" : "International Classification of Diseases, Tenth Revision, Clinical Modification (NCHS)" + }, + "count" : 90699 + }, { + "enumVal" : { + "value" : { + "stringVal" : "Nebraska Lexicon" + }, + "display" : "Nebraska Lexicon" + }, + "count" : 151336 + }, { + "enumVal" : { + "value" : { + "stringVal" : "OMOP Extension" + }, + "display" : "OMOP Extension (OHDSI)" + }, + "count" : 321 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 180133 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Condition" + } + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Condition' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child, FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE cr.relationship_id = 'Subsumes' AND c1.domain_id = c2.domain_id AND c2.domain_id = 'Condition' AND c1.vocabulary_id = c2.vocabulary_id AND c2.vocabulary_id = 'SNOMED' " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "concept_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "int64Val" : 441840 + } + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 20 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_condition" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_condition_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_condition_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_condition" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 20 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_condition_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_condition_occurrence.json new file mode 100644 index 000000000..1b0c6b1cc --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_condition_occurrence.json @@ -0,0 +1,212 @@ +{ + "name" : "t_condition_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "condition", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 2.000023411E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "stop_reason", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : null + }, + "count" : 0 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020479.0, + "maxVal" : 1.5996259E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "condition_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "condition_end_date", + "runtimeCalculated" : false + } + }, + "condition" : { + "value" : { + "column" : "condition_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "condition_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "condition_source_concept_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "condition_occurrence_id", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "condition_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "condition_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_condition_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "condition" : { + "value" : { + "column" : "condition", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_condition", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_device.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_device.json new file mode 100644 index 000000000..1eb2b8e16 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_device.json @@ -0,0 +1,232 @@ +{ + "name" : "t_device", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 218461 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "CPT4" + }, + "display" : "Current Procedural Terminology version 4 (AMA)" + }, + "count" : 24 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 4634 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10PCS" + }, + "display" : "ICD-10 Procedure Coding System (CMS)" + }, + "count" : 3 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NDC" + }, + "display" : "National Drug Code (FDA and manufacturers)" + }, + "count" : 11233 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 202567 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Device" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "S" + } + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Device' AND c.standard_concept = 'S' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_device" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_device_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_device_occurrence.json new file mode 100644 index 000000000..75855f60f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_device_occurrence.json @@ -0,0 +1,185 @@ +{ + "name" : "t_device_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 4.6274116E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020475.0, + "maxVal" : 1.5995732E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "device", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "device_exposure" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "device_exposure_end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "device_source_concept_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "device_exposure_id", + "runtimeCalculated" : false + } + }, + "device" : { + "value" : { + "column" : "device_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "device_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "device_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "device_exposure_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_device_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "device" : { + "value" : { + "column" : "device", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_device", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_ingredient.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_ingredient.json new file mode 100644 index 000000000..5d0422d6d --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_ingredient.json @@ -0,0 +1,317 @@ +{ + "name" : "t_ingredient", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 1983181 + }, { + "enumVal" : { + "value" : { + "stringVal" : "C" + }, + "display" : "Unknown" + }, + "count" : 6509 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "RxNorm" + }, + "display" : "RxNorm (NLM)" + }, + "count" : 148594 + }, { + "enumVal" : { + "value" : { + "stringVal" : "RxNorm Extension" + }, + "display" : "RxNorm Extension (OHDSI)" + }, + "count" : 1834587 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ATC" + }, + "display" : "WHO Anatomic Therapeutic Chemical Classification" + }, + "count" : 6509 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "rawSql" : "SELECT c.concept_id AS id, c.concept_name AS name, c.vocabulary_id, c.standard_concept, c.concept_code FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c WHERE c.domain_id = 'Drug' AND ( (c.vocabulary_id = 'ATC' AND c.standard_concept = 'C') OR (c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c.standard_concept = 'S') ) " + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Drug' AND ((c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c.concept_class_id = 'Ingredient' AND c.standard_concept = 'S') OR (c.vocabulary_id = 'RxNorm' AND c.concept_class_id = 'Precise Ingredient') OR (c.vocabulary_id = 'ATC' AND c.concept_class_id IN ('ATC 1st', 'ATC 2nd', 'ATC 3rd', 'ATC 4th', 'ATC 5th') AND c.standard_concept = 'C')) " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE c1.concept_id != c2.concept_id AND c1.domain_id = 'Drug' AND c2.domain_id = 'Drug' AND ( /* Populate Ingredients' ancestors', which are ATCs. See https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:atc#:~:text=the%20original%20ATC%20hierarchy%20is%20extended%20by%20Standard%20Drug%20Products%20of%20RxNorm%20and%20RxNorm%20Extension%20vocabularies%2C%20which%20are%20assigned%20to%20be%20descendants%20of%20the%205th%20ATC%20Classes. Eg: ATC 1st (highest ancestor) Subsumes ATC 2nd ATC 5th (direct parent of RxNorm) Maps to RxNorm */ (c1.vocabulary_id IN ('ATC') AND cr.relationship_id IN ('Subsumes', 'Maps to')) OR /* Populate Ingredients and their descendants: Branded Drug, Clinical Drug, etc. Ingredients and their descendants are RxNorm. drug_exposure contains Ingredients or their descendants. Use [1] and [2] to define hierarchy. Eg \"Marketed Product\" is most specific and is bottom of hierarchy. [1] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:cdm:drug_exposure#:~:text=These%20are%20indicated,is%20available%20%E2%80%9CIngredient%E2%80%9D [2] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:drug#:~:text=are%20not%20implemented.-,Relationships,-As%20usual%2C%20all */ ( c1.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c2.vocabulary_id IN ('RxNorm', 'RxNorm Extension') /* Only keep relationships where c1 is \"parent\" of c2 */ AND cr.relationship_id IN ('Constitutes', 'Contained in' , 'Has form', 'Has quantified form', 'RxNorm ing of', 'RxNorm inverse is a', 'Precise ing of') ) ) " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "ATC" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "ATC 1st" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "C" + } + } ] + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 8 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_ingredient" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_ingredient_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_ingredient_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_ingredient" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 8 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_ingredient_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_ingredient_occurrence.json new file mode 100644 index 000000000..7665ba2e5 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_ingredient_occurrence.json @@ -0,0 +1,256 @@ +{ + "name" : "t_ingredient_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "ingredient", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "refills", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 10.0 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 2.000007519E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "stop_reason", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : null + }, + "count" : 0 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020479.0, + "maxVal" : 1.5996253E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "days_supply", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 180.0 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "drug_exposure" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "drug_exposure_end_date", + "runtimeCalculated" : false + } + }, + "ingredient" : { + "value" : { + "column" : "drug_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "drug_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "refills" : { + "value" : { + "column" : "refills", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "drug_source_concept_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "drug_exposure_id", + "runtimeCalculated" : false + } + }, + "days_supply" : { + "value" : { + "column" : "days_supply", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "drug_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "drug_exposure_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_ingredient_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "ingredient" : { + "value" : { + "column" : "ingredient", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_ingredient", + "runtimeCalculated" : false + } + }, + "refills" : { + "value" : { + "column" : "refills", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "stop_reason" : { + "value" : { + "column" : "stop_reason", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "days_supply" : { + "value" : { + "column" : "days_supply", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_measurement.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_measurement.json new file mode 100644 index 000000000..5a3eceae2 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_measurement.json @@ -0,0 +1,410 @@ +{ + "name" : "t_measurement", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + }, { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 75626 + }, { + "enumVal" : { + "value" : { + "stringVal" : "C" + }, + "display" : "Unknown" + }, + "count" : 41859 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "LOINC" + }, + "display" : "Logical Observation Identifiers Names and Codes (Regenstrief Institute)" + }, + "count" : 191836 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 29999 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Measurement" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "SNOMED" + } + } ] + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC" + } + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC Hierarchy" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC Component" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Lab Test" + } + } ] + } ] + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE ((c.domain_id = 'Measurement' AND c.vocabulary_id = 'SNOMED') OR (c.vocabulary_id = 'LOINC' AND c.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child, FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE cr.relationship_id = 'Subsumes' AND c1.vocabulary_id = c2.vocabulary_id AND ((c1.vocabulary_id = 'SNOMED' AND c1.domain_id = c2.domain_id AND c1.domain_id = 'Measurement') OR (c1.vocabulary_id = 'LOINC' AND c1.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test') AND c2.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "OR", + "subfilters" : [ { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Measurement" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "SNOMED" + } + } ] + }, { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "LOINC" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "int64Val" : 36206173 + } + } ] + } ] + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 11 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_measurement" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_measurement_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_measurement_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_measurement" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 11 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_measurement_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_measurement_occurrence.json new file mode 100644 index 000000000..8df913266 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_measurement_occurrence.json @@ -0,0 +1,241 @@ +{ + "name" : "t_measurement_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "unit", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -9.223372036854776E18, + "maxVal" : 3.040008559E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020475.0, + "maxVal" : 1.5996262E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "value_numeric", + "dataType" : "DOUBLE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "value_enum", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "measurement", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201234E7, + "maxVal" : 2.0435758E7 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "measurement" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "measurement_date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "unit_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "measurement_source_concept_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "measurement_id", + "runtimeCalculated" : false + } + }, + "value_numeric" : { + "value" : { + "column" : "value_as_number", + "runtimeCalculated" : false + } + }, + "value_enum" : { + "value" : { + "column" : "value_as_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "value_as_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "measurement" : { + "value" : { + "column" : "measurement_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "measurement_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "measurement_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_measurement_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_unit", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "value_numeric" : { + "value" : { + "column" : "value_numeric", + "runtimeCalculated" : false + } + }, + "value_enum" : { + "value" : { + "column" : "value_enum", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_value_enum", + "runtimeCalculated" : false + } + }, + "measurement" : { + "value" : { + "column" : "measurement", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_measurement", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_observation.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_observation.json new file mode 100644 index 000000000..62269b19c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_observation.json @@ -0,0 +1,340 @@ +{ + "name" : "t_observation", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 134800 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "APC" + }, + "display" : "Ambulatory Payment Classification (CMS)" + }, + "count" : 715 + }, { + "enumVal" : { + "value" : { + "stringVal" : "AoU_Custom" + }, + "display" : "AoU_Custom" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "stringVal" : "AoU_General" + }, + "display" : "AoU_General" + }, + "count" : 13 + }, { + "enumVal" : { + "value" : { + "stringVal" : "CPT4" + }, + "display" : "Current Procedural Terminology version 4 (AMA)" + }, + "count" : 1092 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NAACCR" + }, + "display" : "Data Standards & Data Dictionary Volume II (NAACCR)" + }, + "count" : 96 + }, { + "enumVal" : { + "value" : { + "stringVal" : "DRG" + }, + "display" : "Diagnosis-related group (CMS)" + }, + "count" : 752 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 2667 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICDO3" + }, + "display" : "International Classification of Diseases for Oncology, Third Edition (WHO)" + }, + "count" : 49 + }, { + "enumVal" : { + "value" : { + "stringVal" : "LOINC" + }, + "display" : "Logical Observation Identifiers Names and Codes (Regenstrief Institute)" + }, + "count" : 10831 + }, { + "enumVal" : { + "value" : { + "stringVal" : "MDC" + }, + "display" : "Major Diagnostic Categories (CMS)" + }, + "count" : 26 + }, { + "enumVal" : { + "value" : { + "stringVal" : "PCORNet" + }, + "display" : "National Patient-Centered Clinical Research Network (PCORI)" + }, + "count" : 2 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NUCC" + }, + "display" : "National Uniform Claim Committee Health Care Provider Taxonomy Code Set (NUCC)" + }, + "count" : 4 + }, { + "enumVal" : { + "value" : { + "stringVal" : "Nebraska Lexicon" + }, + "display" : "Nebraska Lexicon" + }, + "count" : 1004 + }, { + "enumVal" : { + "value" : { + "stringVal" : "OMOP Extension" + }, + "display" : "OMOP Extension (OHDSI)" + }, + "count" : 136 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 117406 + }, { + "enumVal" : { + "value" : { + "stringVal" : "UB04 Pri Typ of Adm" + }, + "display" : "UB04 Claim Inpatient Admission Type Code (CMS)" + }, + "count" : 6 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Observation" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "S" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "operator" : "NOT_EQUALS", + "value" : { + "stringVal" : "PPI" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "concept_class_id", + "runtimeCalculated" : false + }, + "operator" : "NOT_EQUALS", + "value" : { + "stringVal" : "Survey" + } + } ] + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Observation' AND c.standard_concept = 'S' AND c.vocabulary_id != 'PPI' AND c.concept_class_id != 'Survey' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_observation" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_observation_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_observation_occurrence.json new file mode 100644 index 000000000..882b93e01 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_observation_occurrence.json @@ -0,0 +1,493 @@ +{ + "name" : "t_observation_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "unit", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 4118133 + }, + "display" : "IU/L" + }, + "count" : 5 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 35289501 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4121007 + }, + "display" : "Seconds" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8799 + }, + "display" : "copies per milliliter" + }, + "count" : 231 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8512 + }, + "display" : "day" + }, + "count" : 2028 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9484 + }, + "display" : "degree" + }, + "count" : 55 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8653 + }, + "display" : "degree Celsius" + }, + "count" : 53 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8529 + }, + "display" : "index" + }, + "count" : 88 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8519 + }, + "display" : "liter" + }, + "count" : 15 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9546 + }, + "display" : "meter" + }, + "count" : 66 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4121396 + }, + "display" : "mg/dL" + }, + "count" : 26047 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8720 + }, + "display" : "microgram per gram" + }, + "count" : 23 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8587 + }, + "display" : "milliliter" + }, + "count" : 87 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8588 + }, + "display" : "millimeter" + }, + "count" : 55 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8876 + }, + "display" : "millimeter mercury column" + }, + "count" : 36 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8753 + }, + "display" : "millimole per liter" + }, + "count" : 22 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8931 + }, + "display" : "million per cubic millimeter" + }, + "count" : 957 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4118323 + }, + "display" : "mmHg" + }, + "count" : 63 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4122417 + }, + "display" : "ng/dL" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9372 + }, + "display" : "ounce (apothecary)" + }, + "count" : 25481 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8647 + }, + "display" : "per microliter" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8554 + }, + "display" : "percent" + }, + "count" : 360 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4120725 + }, + "display" : "pg/mL" + }, + "count" : 1235 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8729 + }, + "display" : "picomole per liter" + }, + "count" : 3 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8555 + }, + "display" : "second" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8525 + }, + "display" : "titer" + }, + "count" : 534 + }, { + "enumVal" : { + "value" : { + "int64Val" : 4121397 + }, + "display" : "ug/dL" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8510 + }, + "display" : "unit" + }, + "count" : 908557 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8763 + }, + "display" : "unit per milliliter" + }, + "count" : 164 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9234 + }, + "display" : "volume percent" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9448 + }, + "display" : "year" + }, + "count" : 129781 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : -2.0, + "maxVal" : 2.000023487E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "observation", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "value_as_string", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020475.0, + "maxVal" : 1.5996262E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "value", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201234E7, + "maxVal" : 2.0435758E7 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "observation" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "observation_date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "unit_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "observation_source_concept_id", + "runtimeCalculated" : false + } + }, + "observation" : { + "value" : { + "column" : "observation_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "observation_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "value_as_string" : { + "value" : { + "column" : "value_as_string", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "observation_id", + "runtimeCalculated" : false + } + }, + "value" : { + "value" : { + "column" : "value_as_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "value_as_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "observation_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_observation_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "date", + "runtimeCalculated" : false + } + }, + "unit" : { + "value" : { + "column" : "unit", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_unit", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "observation" : { + "value" : { + "column" : "observation", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_observation", + "runtimeCalculated" : false + } + }, + "value_as_string" : { + "value" : { + "column" : "value_as_string", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "value" : { + "value" : { + "column" : "value", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_value", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_person.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_person.json new file mode 100644 index 000000000..e6e651472 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_person.json @@ -0,0 +1,382 @@ +{ + "name" : "t_person", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "gender", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 45878463 + }, + "display" : "Female" + }, + "count" : 142307 + }, { + "enumVal" : { + "value" : { + "int64Val" : 45880669 + }, + "display" : "Male" + }, + "count" : 87099 + }, { + "enumVal" : { + "value" : { + "int64Val" : 2000000002 + }, + "display" : "Not man only, not woman only, prefer not to answer, or skipped" + }, + "count" : 5119 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "race", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 2000000001 + }, + "display" : "Another single population" + }, + "count" : 5443 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8515 + }, + "display" : "Asian" + }, + "count" : 7476 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8516 + }, + "display" : "Black or African American" + }, + "count" : 46967 + }, { + "enumVal" : { + "value" : { + "int64Val" : 1177221 + }, + "display" : "I prefer not to answer" + }, + "count" : 1614 + }, { + "enumVal" : { + "value" : { + "int64Val" : 2000000008 + }, + "display" : "More than one population" + }, + "count" : 10727 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 37524 + }, { + "enumVal" : { + "value" : { + "int64Val" : 45882607 + }, + "display" : "None of these" + }, + "count" : 2465 + }, { + "enumVal" : { + "value" : { + "int64Val" : 903096 + }, + "display" : "PMI: Skip" + }, + "count" : 1584 + }, { + "enumVal" : { + "value" : { + "int64Val" : 8527 + }, + "display" : "White" + }, + "count" : 120725 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "ethnicity", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 38003563 + }, + "display" : "Hispanic or Latino" + }, + "count" : 44673 + }, { + "enumVal" : { + "value" : { + "int64Val" : 38003564 + }, + "display" : "Not Hispanic or Latino" + }, + "count" : 184189 + }, { + "enumVal" : { + "value" : { + "int64Val" : 903079 + }, + "display" : "PMI: Prefer Not To Answer" + }, + "count" : 1614 + }, { + "enumVal" : { + "value" : { + "int64Val" : 903096 + }, + "display" : "PMI: Skip" + }, + "count" : 1584 + }, { + "enumVal" : { + "value" : { + "int64Val" : 1586148 + }, + "display" : "What Race Ethnicity: Race Ethnicity None Of These" + }, + "count" : 2465 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "sex_at_birth", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 45878463 + }, + "display" : "Female" + }, + "count" : 143479 + }, { + "enumVal" : { + "value" : { + "int64Val" : 45880669 + }, + "display" : "Male" + }, + "count" : 87821 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 257 + }, { + "enumVal" : { + "value" : { + "int64Val" : 2000000009 + }, + "display" : "Not male, not female, prefer not to answer, or skipped" + }, + "count" : 2968 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "age", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 22.0, + "maxVal" : 93.0 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "year_of_birth", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 1930.0, + "maxVal" : 2001.0 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "person" + }, + "attributeMappings" : { + "gender" : { + "value" : { + "column" : "gender_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "gender_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "race" : { + "value" : { + "column" : "race_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "race_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "ethnicity" : { + "value" : { + "column" : "ethnicity_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "ethnicity_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "sex_at_birth" : { + "value" : { + "column" : "sex_at_birth_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "sex_at_birth_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "age" : { + "value" : { + "column" : "year_of_birth", + "sqlFunctionWrapper" : "EXTRACT(YEAR FROM CURRENT_DATE()) - ${fieldSql}", + "runtimeCalculated" : true + } + }, + "year_of_birth" : { + "value" : { + "column" : "year_of_birth", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_person" + }, + "attributeMappings" : { + "gender" : { + "value" : { + "column" : "gender", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_gender", + "runtimeCalculated" : false + } + }, + "race" : { + "value" : { + "column" : "race", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_race", + "runtimeCalculated" : false + } + }, + "ethnicity" : { + "value" : { + "column" : "ethnicity", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_ethnicity", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "sex_at_birth" : { + "value" : { + "column" : "sex_at_birth", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_sex_at_birth", + "runtimeCalculated" : false + } + }, + "age" : { + "value" : { + "column" : "age", + "sqlFunctionWrapper" : "EXTRACT(YEAR FROM CURRENT_DATE()) - ${fieldSql}", + "runtimeCalculated" : true + } + }, + "year_of_birth" : { + "value" : { + "column" : "year_of_birth", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_procedure.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_procedure.json new file mode 100644 index 000000000..156c6c947 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_procedure.json @@ -0,0 +1,390 @@ +{ + "name" : "t_procedure", + "idAttribute" : "id", + "attributes" : [ { + "type" : "KEY_AND_DISPLAY", + "name" : "standard_concept", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { }, + "display" : "Source" + }, + "count" : 0 + }, { + "enumVal" : { + "value" : { + "stringVal" : "S" + }, + "display" : "Standard" + }, + "count" : 266323 + }, { + "enumVal" : { + "value" : { + "stringVal" : "C" + }, + "display" : "Unknown" + }, + "count" : 5756 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "vocabulary", + "dataType" : "STRING", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "stringVal" : "CIEL" + }, + "display" : "Columbia International eHealth Laboratory (Columbia University)" + }, + "count" : 648 + }, { + "enumVal" : { + "value" : { + "stringVal" : "CPT4" + }, + "display" : "Current Procedural Terminology version 4 (AMA)" + }, + "count" : 13409 + }, { + "enumVal" : { + "value" : { + "stringVal" : "NAACCR" + }, + "display" : "Data Standards & Data Dictionary Volume II (NAACCR)" + }, + "count" : 710 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HCPCS" + }, + "display" : "Healthcare Common Procedure Coding System (CMS)" + }, + "count" : 1289 + }, { + "enumVal" : { + "value" : { + "stringVal" : "HemOnc" + }, + "display" : "HemOnc" + }, + "count" : 99 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10PCS" + }, + "display" : "ICD-10 Procedure Coding System (CMS)" + }, + "count" : 194874 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD9CM" + }, + "display" : "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" + }, + "count" : 177 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD9Proc" + }, + "display" : "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 3 (NCHS)" + }, + "count" : 4657 + }, { + "enumVal" : { + "value" : { + "stringVal" : "ICD10CM" + }, + "display" : "International Classification of Diseases, Tenth Revision, Clinical Modification (NCHS)" + }, + "count" : 7 + }, { + "enumVal" : { + "value" : { + "stringVal" : "LOINC" + }, + "display" : "Logical Observation Identifiers Names and Codes (Regenstrief Institute)" + }, + "count" : 9280 + }, { + "enumVal" : { + "value" : { + "stringVal" : "Nebraska Lexicon" + }, + "display" : "Nebraska Lexicon" + }, + "count" : 72683 + }, { + "enumVal" : { + "value" : { + "stringVal" : "OMOP Extension" + }, + "display" : "OMOP Extension (OHDSI)" + }, + "count" : 2 + }, { + "enumVal" : { + "value" : { + "stringVal" : "SNOMED" + }, + "display" : "Systematic Nomenclature of Medicine - Clinical Terms (IHTSDO)" + }, + "count" : 86910 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "concept_code", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Procedure" + } + } + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "standard_concept", + "sqlFunctionWrapper" : "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "vocabulary_id", + "foreignTable" : "vocabulary", + "foreignKey" : "vocabulary_id", + "foreignColumn" : "vocabulary_name", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Procedure' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "rawSql" : "SELECT cr.concept_id_1 AS parent, cr.concept_id_2 AS child, FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 WHERE cr.relationship_id = 'Subsumes' AND c1.domain_id = c2.domain_id AND c2.domain_id = 'Procedure' AND c1.vocabulary_id = c2.vocabulary_id AND c2.vocabulary_id = 'SNOMED' " + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "rootNodesFilter" : { + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BINARY", + "field" : { + "column" : "concept_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "int64Val" : 4322976 + } + } + }, + "fieldPointers" : { + "id" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 19 + } + } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_procedure" + }, + "attributeMappings" : { + "standard_concept" : { + "value" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_standard_concept", + "runtimeCalculated" : false + } + }, + "vocabulary" : { + "value" : { + "column" : "vocabulary", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_vocabulary", + "runtimeCalculated" : false + } + }, + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "concept_code" : { + "value" : { + "column" : "concept_code", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { + "standard" : { + "childParent" : { + "tablePointer" : { + "table" : "t_procedure_standard_childParent" + }, + "fieldPointers" : { + "parent" : { + "column" : "parent", + "runtimeCalculated" : false + }, + "child" : { + "column" : "child", + "runtimeCalculated" : false + } + } + }, + "ancestorDescendant" : { + "tablePointer" : { + "table" : "t_procedure_standard_ancestorDescendant" + }, + "fieldPointers" : { + "ancestor" : { + "column" : "ancestor", + "runtimeCalculated" : false + }, + "descendant" : { + "column" : "descendant", + "runtimeCalculated" : false + } + } + }, + "pathNumChildren" : { + "tablePointer" : { + "table" : "t_procedure" + }, + "fieldPointers" : { + "path" : { + "column" : "t_standard_path", + "runtimeCalculated" : false + }, + "num_children" : { + "column" : "t_standard_num_children", + "runtimeCalculated" : false + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "maxHierarchyDepth" : 19 + } + } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_procedure_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_procedure_occurrence.json new file mode 100644 index 000000000..e2dc63ee7 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_procedure_occurrence.json @@ -0,0 +1,168 @@ +{ + "name" : "t_procedure_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 2.000023474E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "visit_occurrence_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2020476.0, + "maxVal" : 1.5996259E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "procedure", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201235E7, + "maxVal" : 2.0435757E7 + }, + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "procedure_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "procedure_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "procedure_source_concept_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "procedure_occurrence_id", + "runtimeCalculated" : false + } + }, + "procedure" : { + "value" : { + "column" : "procedure_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "procedure_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "procedure_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_procedure_occurrence" + }, + "attributeMappings" : { + "date" : { + "value" : { + "column" : "date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "visit_occurrence_id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "procedure" : { + "value" : { + "column" : "procedure", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_procedure", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_visit.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_visit.json new file mode 100644 index 000000000..39f561731 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_visit.json @@ -0,0 +1,105 @@ +{ + "name" : "t_visit", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "name", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "concept", + "filter" : { + "type" : "BOOLEAN_AND_OR", + "operator" : "AND", + "subfilters" : [ { + "type" : "BINARY", + "field" : { + "column" : "domain_id", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "Visit" + } + }, { + "type" : "BINARY", + "field" : { + "column" : "standard_concept", + "runtimeCalculated" : false + }, + "operator" : "EQUALS", + "value" : { + "stringVal" : "S" + } + } ] + } + }, + "attributeMappings" : { + "name" : { + "value" : { + "column" : "concept_name", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "concept_id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchStringTable" : { + "tablePointer" : { + "rawSql" : "SELECT textsearch.id, textsearch.text FROM ( SELECT c.concept_id AS id, c.concept_name AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, CAST(c.concept_id AS STRING) AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c UNION ALL SELECT c.concept_id AS id, c.concept_code AS text FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c ) AS textsearch JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c ON c.concept_id = textsearch.id WHERE c.domain_id = 'Visit' AND c.standard_concept = 'S' " + }, + "fieldPointers" : { + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "text" : { + "column" : "text", + "runtimeCalculated" : false + } + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_visit" + }, + "attributeMappings" : { + "name" : { + "value" : { + "column" : "name", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + } + }, + "textSearchMapping" : { + "searchString" : { + "column" : "text", + "runtimeCalculated" : false + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_visit_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_visit_occurrence.json new file mode 100644 index 000000000..ccf7d7ecd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entity/t_visit_occurrence.json @@ -0,0 +1,367 @@ +{ + "name" : "t_visit_occurrence", + "idAttribute" : "id", + "attributes" : [ { + "type" : "SIMPLE", + "name" : "end_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_criteria_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 0.0, + "maxVal" : 5.542608719E9 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "id", + "dataType" : "INT64", + "displayHintTypes" : [ ] + }, { + "type" : "KEY_AND_DISPLAY", + "name" : "visit", + "dataType" : "INT64", + "displayHint" : { + "type" : "ENUM", + "enumVals" : [ { + "enumVal" : { + "value" : { + "int64Val" : 21039000 + }, + "display" : "10 ML Morphine 0.2 MG/ML Prefilled Syringe Box of 10" + }, + "count" : 21 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21050000 + }, + "display" : "2000 ML benzyl benzoate 250 MG/ML Topical Solution" + }, + "count" : 60 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581478 + }, + "display" : "Ambulance Visit" + }, + "count" : 1746 + }, { + "enumVal" : { + "value" : { + "int64Val" : 38004207 + }, + "display" : "Ambulatory Clinic / Center" + }, + "count" : 80437 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581479 + }, + "display" : "Ambulatory Rehabilitation Visit" + }, + "count" : 179 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21056626 + }, + "display" : "Amiodarone 50 MG/ML Oral Suspension" + }, + "count" : 10 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090200 + }, + "display" : "Cholecalciferol 50000 UNT Oral Capsule [Aciferol D3] Box of 10 by Rhodes" + }, + "count" : 2 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090300 + }, + "display" : "Chondroitin Sulfates 400 MG / Glucosamine 500 MG Oral Tablet [Joint-Flex] Box of 60" + }, + "count" : 32 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21036000 + }, + "display" : "Daptomycin 500 MG Injection Box of 1" + }, + "count" : 100 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090500 + }, + "display" : "Diphenhydramine 25 MG Oral Tablet by Ennogen" + }, + "count" : 1 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9203 + }, + "display" : "Emergency Room Visit" + }, + "count" : 439748 + }, { + "enumVal" : { + "value" : { + "int64Val" : 262 + }, + "display" : "Emergency Room and Inpatient Visit" + }, + "count" : 25323 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21090400 + }, + "display" : "Ergocalciferol 300000 UNT/ML Prefilled Syringe Box of 10" + }, + "count" : 75 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581476 + }, + "display" : "Home Visit" + }, + "count" : 40500 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9201 + }, + "display" : "Inpatient Visit" + }, + "count" : 568911 + }, { + "enumVal" : { + "value" : { + "int64Val" : 32036 + }, + "display" : "Laboratory Visit" + }, + "count" : 1850 + }, { + "enumVal" : { + "value" : { + "int64Val" : 12 + }, + "display" : "Modifier" + }, + "count" : 30318 + }, { + "enumVal" : { + "value" : { + "int64Val" : 0 + }, + "display" : "No matching concept" + }, + "count" : 1340218 + }, { + "enumVal" : { + "value" : { + "int64Val" : 42898160 + }, + "display" : "Non-hospital institution Visit" + }, + "count" : 22 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581477 + }, + "display" : "Office Visit" + }, + "count" : 629739 + }, { + "enumVal" : { + "value" : { + "int64Val" : 44814711 + }, + "display" : "Other ambulatory visit" + }, + "count" : 4720 + }, { + "enumVal" : { + "value" : { + "int64Val" : 9202 + }, + "display" : "Outpatient Visit" + }, + "count" : 9929594 + }, { + "enumVal" : { + "value" : { + "int64Val" : 581458 + }, + "display" : "Pharmacy visit" + }, + "count" : 25279 + }, { + "enumVal" : { + "value" : { + "int64Val" : 21033000 + }, + "display" : "Risperidone 0.5 MG Oral Tablet by Consilient" + }, + "count" : 17 + }, { + "enumVal" : { + "value" : { + "int64Val" : 44818518 + }, + "display" : "Visit derived from EHR record" + }, + "count" : 856887 + } ] + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "source_value", + "dataType" : "STRING", + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "person_id", + "dataType" : "INT64", + "displayHint" : { + "type" : "RANGE", + "minVal" : 2.0201234E7, + "maxVal" : 2.0435758E7 + }, + "displayHintTypes" : [ ] + }, { + "type" : "SIMPLE", + "name" : "start_date", + "dataType" : "DATE", + "displayHintTypes" : [ ] + } ], + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "tablePointer" : { + "table" : "visit_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "visit_end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "visit_source_concept_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + } + }, + "visit" : { + "value" : { + "column" : "visit_concept_id", + "runtimeCalculated" : false + }, + "display" : { + "column" : "visit_concept_id", + "foreignTable" : "concept", + "foreignKey" : "concept_id", + "foreignColumn" : "concept_name", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "visit_source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "visit_start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "tablePointer" : { + "table" : "t_visit_occurrence" + }, + "attributeMappings" : { + "end_date" : { + "value" : { + "column" : "end_date", + "runtimeCalculated" : false + } + }, + "source_criteria_id" : { + "value" : { + "column" : "source_criteria_id", + "runtimeCalculated" : false + } + }, + "id" : { + "value" : { + "column" : "id", + "runtimeCalculated" : false + } + }, + "visit" : { + "value" : { + "column" : "visit", + "runtimeCalculated" : false + }, + "display" : { + "column" : "t_display_visit", + "runtimeCalculated" : false + } + }, + "source_value" : { + "value" : { + "column" : "source_value", + "runtimeCalculated" : false + } + }, + "person_id" : { + "value" : { + "column" : "person_id", + "runtimeCalculated" : false + } + }, + "start_date" : { + "value" : { + "column" : "start_date", + "runtimeCalculated" : false + } + } + }, + "hierarchyMappings" : { } + } +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_brand_ingredient.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_brand_ingredient.json new file mode 100644 index 000000000..e9161b6bb --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_brand_ingredient.json @@ -0,0 +1,101 @@ +{ + "type" : "GROUP_ITEMS", + "name" : "t_brand_ingredient", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "groupToItems" : { + "idPairsTable" : { + "rawSql" : "/* 1. User searches for Brand Tylenol 2. User expands Tylenol to see which ingredients are in Tylenol 3. Ingredient Acetaminophen is shown Acetaminophen has over 300 descendants (eg \"acetaminophen 100 MG/ML Oral Suspension\"). Acetaminophen's concept_class_id is Ingredient; descendants' concept_class_ids are Clinical Drug Comp, Quant Clinical Drug, etc. Most descendants have a relationship with Brand Tylenol in concept_relationship. However, we only want to show Acetaminophen in step 3. So only keep relationships with concept_class_id=Ingredient. */ SELECT cr.* FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr, `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 WHERE cr.concept_id_2 = c2.concept_id AND c2.concept_class_id = 'Ingredient' " + }, + "idPairsIdA" : { + "column" : "concept_id_1", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "concept_id_2", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "groupToItems" : { + "idPairsTable" : { + "table" : "idpairs_t_brand_t_ingredient" + }, + "idPairsIdA" : { + "column" : "id_t_brand", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_ingredient", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_brand" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_brand_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_brand_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_brand", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_brand", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "groupEntity" : "t_brand", + "itemsEntity" : "t_ingredient" +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_condition_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_condition_person_occurrence.json new file mode 100644 index 000000000..b942859a6 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_condition_person_occurrence.json @@ -0,0 +1,251 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_condition_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "condition_occurrence" + }, + "idPairsIdA" : { + "column" : "condition_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "condition_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "condition_occurrence" + }, + "idPairsIdA" : { + "column" : "condition_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "condition_occurrence" + }, + "idPairsIdA" : { + "column" : "condition_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_condition_occurrence_t_condition" + }, + "idPairsIdA" : { + "column" : "id_t_condition_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_condition", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_condition_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_condition", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_condition_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_condition_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_condition_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_condition_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_condition_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_condition", + "occurrenceEntity" : "t_condition_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_device_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_device_person_occurrence.json new file mode 100644 index 000000000..3a6ad63d9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_device_person_occurrence.json @@ -0,0 +1,217 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_device_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "device_exposure" + }, + "idPairsIdA" : { + "column" : "device_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "device_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "device_exposure" + }, + "idPairsIdA" : { + "column" : "device_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "device_exposure" + }, + "idPairsIdA" : { + "column" : "device_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_device_occurrence_t_device" + }, + "idPairsIdA" : { + "column" : "id_t_device_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_device", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_device_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_device", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_device_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_device_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_device_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_device_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_device_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_device", + "occurrenceEntity" : "t_device_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_ingredient_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_ingredient_person_occurrence.json new file mode 100644 index 000000000..39d7e4aab --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_ingredient_person_occurrence.json @@ -0,0 +1,251 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_ingredient_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "drug_exposure" + }, + "idPairsIdA" : { + "column" : "drug_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "drug_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "drug_exposure" + }, + "idPairsIdA" : { + "column" : "drug_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "drug_exposure" + }, + "idPairsIdA" : { + "column" : "drug_exposure_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_ingredient_occurrence_t_ingredient" + }, + "idPairsIdA" : { + "column" : "id_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_ingredient", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_ingredient_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_ingredient", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_ingredient_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_ingredient_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_ingredient_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_ingredient_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_ingredient", + "occurrenceEntity" : "t_ingredient_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_measurement_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_measurement_person_occurrence.json new file mode 100644 index 000000000..3533f504d --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_measurement_person_occurrence.json @@ -0,0 +1,287 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_measurement_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "measurement" + }, + "idPairsIdA" : { + "column" : "measurement_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "measurement_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "measurement" + }, + "idPairsIdA" : { + "column" : "measurement_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "measurement" + }, + "idPairsIdA" : { + "column" : "measurement_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_measurement_occurrence_t_measurement" + }, + "idPairsIdA" : { + "column" : "id_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_measurement", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_measurement_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_measurement", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_measurement_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_measurement_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_measurement_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_measurement_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { + "modifiers" : { + "tablePointer" : { + "table" : "t_measurement_person_occurrence_modifiers" + }, + "fieldPointers" : { + "min" : { + "column" : "min", + "runtimeCalculated" : false + }, + "enum_count" : { + "column" : "enum_count", + "runtimeCalculated" : false + }, + "max" : { + "column" : "max", + "runtimeCalculated" : false + }, + "enum_display" : { + "column" : "enum_display", + "runtimeCalculated" : false + }, + "enum_value" : { + "column" : "enum_value", + "runtimeCalculated" : false + }, + "attribute_name" : { + "column" : "attribute_name", + "runtimeCalculated" : false + }, + "entity_id" : { + "column" : "entity_id", + "runtimeCalculated" : false + } + } + } + } + }, + "criteriaEntity" : "t_measurement", + "occurrenceEntity" : "t_measurement_occurrence", + "modifierAttributes" : [ "value_numeric", "value_enum" ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_observation_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_observation_person_occurrence.json new file mode 100644 index 000000000..13c5ccc71 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_observation_person_occurrence.json @@ -0,0 +1,217 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_observation_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "observation" + }, + "idPairsIdA" : { + "column" : "observation_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "observation_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "observation" + }, + "idPairsIdA" : { + "column" : "observation_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "observation" + }, + "idPairsIdA" : { + "column" : "observation_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_observation_occurrence_t_observation" + }, + "idPairsIdA" : { + "column" : "id_t_observation_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_observation", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_observation_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_observation", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_observation_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_observation_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_observation_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_observation_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_observation_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_observation", + "occurrenceEntity" : "t_observation_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_procedure_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_procedure_person_occurrence.json new file mode 100644 index 000000000..a56cf02b4 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_procedure_person_occurrence.json @@ -0,0 +1,251 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_procedure_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "procedure_occurrence" + }, + "idPairsIdA" : { + "column" : "procedure_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "procedure_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "procedure_occurrence" + }, + "idPairsIdA" : { + "column" : "procedure_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "procedure_occurrence" + }, + "idPairsIdA" : { + "column" : "procedure_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_procedure_occurrence_t_procedure" + }, + "idPairsIdA" : { + "column" : "id_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_procedure", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "standard" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure_occurrence_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure_occurrence_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_procedure_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_procedure", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "standard" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person_standard", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person_standard", + "runtimeCalculated" : false + } + }, + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_procedure_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_procedure_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_procedure_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_procedure_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_procedure", + "occurrenceEntity" : "t_procedure_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_visit_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_visit_person_occurrence.json new file mode 100644 index 000000000..c3ed53b03 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/expanded/entitygroup/t_visit_person_occurrence.json @@ -0,0 +1,217 @@ +{ + "type" : "CRITERIA_OCCURRENCE", + "name" : "t_visit_person_occurrence", + "sourceDataMapping" : { + "dataPointer" : "omop_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "visit_occurrence" + }, + "idPairsIdA" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "visit_concept_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "visit_occurrence" + }, + "idPairsIdA" : { + "column" : "visit_concept_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "visit_occurrence" + }, + "idPairsIdA" : { + "column" : "visit_occurrence_id", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "person_id", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { }, + "rollupInformationMapB" : { } + } + }, + "auxiliaryDataMappings" : { } + }, + "indexDataMapping" : { + "dataPointer" : "index_dataset", + "relationshipMappings" : { + "occurrenceToCriteria" : { + "idPairsTable" : { + "table" : "idpairs_t_visit_occurrence_t_visit" + }, + "idPairsIdA" : { + "column" : "id_t_visit_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_visit", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit_occurrence", + "runtimeCalculated" : false + } + } + } + }, + "criteriaToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_visit_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_visit", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit", + "runtimeCalculated" : false + } + } + } + }, + "occurrenceToPrimary" : { + "idPairsTable" : { + "table" : "idpairs_t_visit_occurrence_t_person" + }, + "idPairsIdA" : { + "column" : "id_t_visit_occurrence", + "runtimeCalculated" : false + }, + "idPairsIdB" : { + "column" : "id_t_person", + "runtimeCalculated" : false + }, + "rollupInformationMapA" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_visit_occurrence" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_person", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_person", + "runtimeCalculated" : false + } + } + }, + "rollupInformationMapB" : { + "NO_HIERARCHY" : { + "table" : { + "table" : "t_person" + }, + "id" : { + "column" : "id", + "runtimeCalculated" : false + }, + "count" : { + "column" : "t_count_t_visit_occurrence", + "runtimeCalculated" : false + }, + "displayHints" : { + "column" : "t_displayhints_t_visit_occurrence", + "runtimeCalculated" : false + } + } + } + } + }, + "auxiliaryDataMappings" : { } + }, + "criteriaEntity" : "t_visit", + "occurrenceEntity" : "t_visit_occurrence", + "modifierAttributes" : [ ] +} \ No newline at end of file diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/SR2022Q4R6.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/SR2022Q4R6.json new file mode 100644 index 000000000..31cd05e7e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/SR2022Q4R6.json @@ -0,0 +1,50 @@ +{ + "name": "SR2022Q4R6", + "displayName": " Controlled Tier Vxx", + "dataPointers": [ + { "type": "BQ_DATASET", + "name": "omop_dataset", + "projectId": "all-of-us-ehr-dev", + "datasetId": "SR2022Q4R6", + "queryProjectId": "all-of-us-ehr-dev" + }, + { "type": "BQ_DATASET", + "name": "index_dataset", + "projectId": "all-of-us-ehr-dev", + "datasetId": "SR2022Q4R6", + "dataflowServiceAccountEmail" : "tanagra-indexing-runner@all-of-us-ehr-dev.iam.gserviceaccount.com", + "dataflowTempLocation" : "gs://all-of-us-ehr-dev-tanagra-indexing/SR2022Q4R6/tanagra_index_temp", + "dataflowRegion": "us-central1", + "dataflowWorkerMachineType" : "n1-standard-4", + "dataflowUsePublicIps": true + } + ], + "entities": [ + "t_brand.json", + "t_condition.json", + "t_condition_occurrence.json", + "t_device.json", + "t_device_occurrence.json", + "t_ingredient.json", + "t_ingredient_occurrence.json", + "t_measurement.json", + "t_measurement_occurrence.json", + "t_observation.json", + "t_observation_occurrence.json", + "t_person.json", + "t_procedure.json", + "t_procedure_occurrence.json", + "t_visit.json", + "t_visit_occurrence.json"], + "primaryEntity": "t_person", + "entityGroups": [ + "t_brand_ingredient.json", + "t_condition_person_occurrence.json", + "t_device_person_occurrence.json", + "t_ingredient_person_occurrence.json", + "t_measurement_person_occurrence.json", + "t_observation_person_occurrence.json", + "t_procedure_person_occurrence.json", + "t_visit_person_occurrence.json"], + "uiConfigFile": "top_level.json" +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_brand.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_brand.json new file mode 100644 index 000000000..4e845ec61 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_brand.json @@ -0,0 +1,56 @@ +{ + "name": "t_brand", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Drug" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Brand Name" } }, + { "type": "BINARY", + "field": { "column": "invalid_reason" }, + "operator": "IS", + "value": { "stringVal": null } }, + { "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "RxNorm" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "RxNorm Extension" } } + ] } ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_brand_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_condition.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_condition.json new file mode 100644 index 000000000..472bbe841 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_condition.json @@ -0,0 +1,57 @@ +{ + "name": "t_condition", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Condition" } } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_condition_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_condition_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { "type": "BINARY", "field": { "column": "concept_id" }, "operator": "EQUALS", "value": { "int64Val": 441840 } } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 20 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_condition_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_condition_occurrence.json new file mode 100644 index 000000000..e6cfcd402 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_condition_occurrence.json @@ -0,0 +1,37 @@ +{ + "name": "t_condition_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "condition" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "stop_reason" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "condition_occurrence" }, + "attributeMappings": { + "id": { "value": { "column": "condition_occurrence_id" } }, + "condition": { + "value": { "column": "condition_concept_id" }, + "display": { + "column": "condition_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "condition_start_date" } }, + "end_date": { "value": { "column": "condition_end_date" } }, + "source_value": { "value": { "column": "condition_source_value" } }, + "source_criteria_id": { "value": { "column": "condition_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_device.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_device.json new file mode 100644 index 000000000..76f2ff4fb --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_device.json @@ -0,0 +1,49 @@ +{ + "name": "t_device", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Device" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "S" } } + ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_device_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_device_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_device_occurrence.json new file mode 100644 index 000000000..93062226e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_device_occurrence.json @@ -0,0 +1,36 @@ +{ + "name": "t_device_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "device" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "device_exposure" }, + "attributeMappings": { + "id": { "value": { "column": "device_exposure_id" } }, + "device": { + "value": { "column": "device_concept_id" }, + "display": { + "column": "device_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "device_exposure_start_date" } }, + "end_date": { "value": { "column": "device_exposure_end_date" } }, + "source_value": { "value": { "column": "device_source_value" } }, + "source_criteria_id": { "value": { "column": "device_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_ingredient.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_ingredient.json new file mode 100644 index 000000000..0238dba24 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_ingredient.json @@ -0,0 +1,64 @@ +{ + "name": "t_ingredient", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "rawSqlFile": "t_ingredient_all.sql" }, + "attributeMappings": { + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_ingredient_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_ingredient_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "ATC" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "ATC 1st" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "C" } } ] } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 8 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_ingredient_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_ingredient_occurrence.json new file mode 100644 index 000000000..2668de6d0 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_ingredient_occurrence.json @@ -0,0 +1,39 @@ +{ + "name": "t_ingredient_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "ingredient" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "stop_reason" }, + { "type": "SIMPLE", "name": "refills" }, + { "type": "SIMPLE", "name": "days_supply" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "drug_exposure" }, + "attributeMappings": { + "id": { "value": { "column": "drug_exposure_id" } }, + "ingredient": { + "value": { "column": "drug_concept_id" }, + "display": { + "column": "drug_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "drug_exposure_start_date" } }, + "end_date": { "value": { "column": "drug_exposure_end_date" } }, + "source_value": { "value": { "column": "drug_source_value" } }, + "source_criteria_id": { "value": { "column": "drug_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_measurement.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_measurement.json new file mode 100644 index 000000000..f53bf7a0c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_measurement.json @@ -0,0 +1,115 @@ +{ + "name": "t_measurement", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Measurement" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "SNOMED" } } ] }, + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC" } }, + { "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC Hierarchy" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC Component" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Lab Test" } } + ] } ] } ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_measurement_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_measurement_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "OR", + "subfilters": [ + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Measurement" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "SNOMED" } } ] }, + { "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "EQUALS", + "value": { "stringVal": "LOINC" } }, + { "type": "BINARY", + "field": { "column": "concept_id" }, + "operator": "EQUALS", + "value": { "int64Val": 36206173 } } ] } ] } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 11 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_measurement_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_measurement_occurrence.json new file mode 100644 index 000000000..9b76a40a2 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_measurement_occurrence.json @@ -0,0 +1,52 @@ +{ + "name": "t_measurement_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "measurement" }, + { "type": "SIMPLE", "name": "date" }, + { "type": "SIMPLE", "name": "value_numeric" }, + { "type": "KEY_AND_DISPLAY", "name": "value_enum" }, + { "type": "KEY_AND_DISPLAY", "name": "unit" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "measurement" }, + "attributeMappings": { + "id": { "value": { "column": "measurement_id" } }, + "measurement": { + "value": { "column": "measurement_concept_id" }, + "display": { + "column": "measurement_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "date": { "value": { "column": "measurement_date" } }, + "value_numeric": { "value": { "column": "value_as_number" } }, + "value_enum": { + "value": { "column": "value_as_concept_id" }, + "display": { + "column": "value_as_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "unit": { + "value": { "column": "unit_concept_id" }, + "display": { + "column": "unit_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "source_value": { "value": { "column": "measurement_source_value" } }, + "source_criteria_id": { "value": { "column": "measurement_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_observation.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_observation.json new file mode 100644 index 000000000..feed01fd9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_observation.json @@ -0,0 +1,57 @@ +{ + "name": "t_observation", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Observation" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "S" } }, + { "type": "BINARY", + "field": { "column": "vocabulary_id" }, + "operator": "NOT_EQUALS", + "value": { "stringVal": "PPI" } }, + { "type": "BINARY", + "field": { "column": "concept_class_id" }, + "operator": "NOT_EQUALS", + "value": { "stringVal": "Survey" } } + ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_observation_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_observation_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_observation_occurrence.json new file mode 100644 index 000000000..284d0899c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_observation_occurrence.json @@ -0,0 +1,51 @@ +{ + "name": "t_observation_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "observation" }, + { "type": "SIMPLE", "name": "date" }, + { "type": "SIMPLE", "name": "value_as_string" }, + { "type": "KEY_AND_DISPLAY", "name": "value" }, + { "type": "KEY_AND_DISPLAY", "name": "unit" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "observation" }, + "attributeMappings": { + "id": { "value": { "column": "observation_id" } }, + "observation": { + "value": { "column": "observation_concept_id" }, + "display": { + "column": "observation_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "date": { "value": { "column": "observation_date" } }, + "value": { + "value": { "column": "value_as_concept_id" }, + "display": { + "column": "value_as_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "unit": { + "value": { "column": "unit_concept_id" }, + "display": { + "column": "unit_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "source_value": { "value": { "column": "observation_source_value" } }, + "source_criteria_id": { "value": { "column": "observation_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_person.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_person.json new file mode 100644 index 000000000..8063a55e7 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_person.json @@ -0,0 +1,52 @@ +{ + "name": "t_person", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "year_of_birth" }, + { "type": "SIMPLE", "name": "age" }, + { "type": "KEY_AND_DISPLAY", "name": "gender" }, + { "type": "KEY_AND_DISPLAY", "name": "race" }, + { "type": "KEY_AND_DISPLAY", "name": "ethnicity" }, + { "type": "KEY_AND_DISPLAY", "name": "sex_at_birth" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "person" }, + "attributeMappings": { + "id": { "value": { "column": "person_id" } }, + "age": { "value": { "column": "year_of_birth", "runtimeCalculated": true, "sqlFunctionWrapper": "EXTRACT(YEAR FROM CURRENT_DATE()) - ${fieldSql}" } }, + "gender": { + "value": { "column": "gender_concept_id" }, + "display": { + "column": "gender_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "race": { + "value": { "column": "race_concept_id" }, + "display": { + "column": "race_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "ethnicity": { + "value": { "column": "ethnicity_concept_id" }, + "display": { + "column": "ethnicity_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "sex_at_birth": { + "value": { "column": "sex_at_birth_concept_id" }, + "display": { + "column": "sex_at_birth_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } } + } }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_procedure.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_procedure.json new file mode 100644 index 000000000..cbeca40ca --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_procedure.json @@ -0,0 +1,57 @@ +{ + "name": "t_procedure", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" }, + { "type": "KEY_AND_DISPLAY", "name": "vocabulary" }, + { "type": "KEY_AND_DISPLAY", "name": "standard_concept" }, + { "type": "SIMPLE", "name": "concept_code" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Procedure" } } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } }, + "vocabulary": { + "value": { "column": "vocabulary_id" }, + "display": { + "column": "vocabulary_id", + "foreignTable": "vocabulary", + "foreignKey": "vocabulary_id", + "foreignColumn": "vocabulary_name" } }, + "standard_concept": { + "value": { "column": "standard_concept" }, + "display": { + "column": "standard_concept", + "sqlFunctionWrapper": "(CASE WHEN ${fieldSql} IS NULL THEN 'Source' WHEN ${fieldSql} = 'S' THEN 'Standard' ELSE 'Unknown' END)" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_procedure_textSearch.sql" } } }, + "hierarchyMappings": { + "standard": { + "childParent": { + "tablePointer": { "rawSqlFile": "t_procedure_parentChild.sql" } + }, + "rootNodesFilter": { + "tablePointer": { + "table": "concept", + "filter": { "type": "BINARY", "field": { "column": "concept_id" }, "operator": "EQUALS", "value": { "int64Val": 4322976 } } }, + "fieldPointers": { + "id": { "column": "concept_id" } + } + }, + "maxHierarchyDepth": 19 + } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_procedure_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_procedure_occurrence.json new file mode 100644 index 000000000..ae09ad795 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_procedure_occurrence.json @@ -0,0 +1,34 @@ +{ + "name": "t_procedure_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "procedure" }, + { "type": "SIMPLE", "name": "date" }, + { "type": "SIMPLE", "name": "visit_occurrence_id" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "procedure_occurrence" }, + "attributeMappings": { + "id": { "value": { "column": "procedure_occurrence_id" } }, + "procedure": { + "value": { "column": "procedure_concept_id" }, + "display": { + "column": "procedure_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "date": { "value": { "column": "procedure_date" } }, + "source_value": { "value": { "column": "procedure_source_value" } }, + "source_criteria_id": { "value": { "column": "procedure_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_visit.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_visit.json new file mode 100644 index 000000000..1670f3b13 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_visit.json @@ -0,0 +1,33 @@ +{ + "name": "t_visit", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "name" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { + "table": "concept", + "filter": { + "type": "BOOLEAN_AND_OR", + "operator": "AND", + "subfilters": [ + { "type": "BINARY", + "field": { "column": "domain_id" }, + "operator": "EQUALS", + "value": { "stringVal": "Visit" } }, + { "type": "BINARY", + "field": { "column": "standard_concept" }, + "operator": "EQUALS", + "value": { "stringVal": "S" } } ] } }, + "attributeMappings": { + "id": { "value": { "column": "concept_id" } }, + "name": { "value": { "column": "concept_name" } } }, + "textSearchMapping": { "searchStringTable": { "tablePointer": { "rawSqlFile": "t_visit_textSearch.sql" } } } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_visit_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_visit_occurrence.json new file mode 100644 index 000000000..c023657a0 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entity/t_visit_occurrence.json @@ -0,0 +1,35 @@ +{ + "name": "t_visit_occurrence", + "idAttribute": "id", + "attributes": [ + { "type": "SIMPLE", "name": "id" }, + { "type": "SIMPLE", "name": "person_id" }, + { "type": "KEY_AND_DISPLAY", "name": "visit" }, + { "type": "SIMPLE", "name": "start_date" }, + { "type": "SIMPLE", "name": "end_date" }, + { "type": "SIMPLE", "name": "source_value" }, + { "type": "SIMPLE", "name": "source_criteria_id" } ], + + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "tablePointer": { "table": "visit_occurrence" }, + "attributeMappings": { + "id": { "value": { "column": "visit_occurrence_id" } }, + "visit": { + "value": { "column": "visit_concept_id" }, + "display": { + "column": "visit_concept_id", + "foreignTable": "concept", + "foreignKey": "concept_id", + "foreignColumn": "concept_name" } }, + "start_date": { "value": { "column": "visit_start_date" } }, + "end_date": { "value": { "column": "visit_end_date" } }, + "source_value": { "value": { "column": "visit_source_value" } }, + "source_criteria_id": { "value": { "column": "visit_source_concept_id" } } + } + }, + + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_brand_ingredient.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_brand_ingredient.json new file mode 100644 index 000000000..2530503aa --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_brand_ingredient.json @@ -0,0 +1,19 @@ +{ + "name": "t_brand_ingredient", + "type": "GROUP_ITEMS", + "groupEntity": "t_brand", + "itemsEntity": "t_ingredient", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "groupToItems": { + "idPairsTable": { "rawSqlFile": "t_brand_ingredients.sql" }, + "idPairsIdA": { "column": "concept_id_1" }, + "idPairsIdB": { "column": "concept_id_2" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_condition_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_condition_person_occurrence.json new file mode 100644 index 000000000..2ed6ced4e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_condition_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_condition_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_condition", + "occurrenceEntity": "t_condition_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "condition_occurrence" }, + "idPairsIdA": { "column": "condition_occurrence_id" }, + "idPairsIdB": { "column": "condition_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "condition_occurrence" }, + "idPairsIdA": { "column": "condition_occurrence_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "condition_occurrence" }, + "idPairsIdA": { "column": "condition_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_device_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_device_person_occurrence.json new file mode 100644 index 000000000..dfef3b9a8 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_device_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_device_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_device", + "occurrenceEntity": "t_device_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "device_exposure" }, + "idPairsIdA": { "column": "device_exposure_id" }, + "idPairsIdB": { "column": "device_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "device_exposure" }, + "idPairsIdA": { "column": "device_exposure_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "device_exposure" }, + "idPairsIdA": { "column": "device_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_ingredient_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_ingredient_person_occurrence.json new file mode 100644 index 000000000..ff8b5d26f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_ingredient_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_ingredient_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_ingredient", + "occurrenceEntity": "t_ingredient_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "drug_exposure" }, + "idPairsIdA": { "column": "drug_exposure_id" }, + "idPairsIdB": { "column": "drug_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "drug_exposure" }, + "idPairsIdA": { "column": "drug_exposure_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "drug_exposure" }, + "idPairsIdA": { "column": "drug_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_measurement_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_measurement_person_occurrence.json new file mode 100644 index 000000000..c9feebba2 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_measurement_person_occurrence.json @@ -0,0 +1,30 @@ +{ + "name": "t_measurement_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_measurement", + "occurrenceEntity": "t_measurement_occurrence", + "modifierAttributes": [ "value_numeric", "value_enum" ], + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "measurement" }, + "idPairsIdA": { "column": "measurement_id" }, + "idPairsIdB": { "column": "measurement_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "measurement" }, + "idPairsIdA": { "column": "measurement_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "measurement" }, + "idPairsIdA": { "column": "measurement_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_observation_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_observation_person_occurrence.json new file mode 100644 index 000000000..291b042fd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_observation_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_observation_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_observation", + "occurrenceEntity": "t_observation_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "observation" }, + "idPairsIdA": { "column": "observation_id" }, + "idPairsIdB": { "column": "observation_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "observation" }, + "idPairsIdA": { "column": "observation_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "observation" }, + "idPairsIdA": { "column": "observation_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_procedure_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_procedure_person_occurrence.json new file mode 100644 index 000000000..4eddb08d3 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_procedure_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_procedure_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_procedure", + "occurrenceEntity": "t_procedure_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "procedure_occurrence" }, + "idPairsIdA": { "column": "procedure_occurrence_id" }, + "idPairsIdB": { "column": "procedure_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "procedure_occurrence" }, + "idPairsIdA": { "column": "procedure_occurrence_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "procedure_occurrence" }, + "idPairsIdA": { "column": "procedure_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_visit_person_occurrence.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_visit_person_occurrence.json new file mode 100644 index 000000000..02a5c85d5 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/entitygroup/t_visit_person_occurrence.json @@ -0,0 +1,29 @@ +{ + "name": "t_visit_person_occurrence", + "type": "CRITERIA_OCCURRENCE", + "criteriaEntity": "t_visit", + "occurrenceEntity": "t_visit_occurrence", + "sourceDataMapping": { + "dataPointer": "omop_dataset", + "relationshipMappings": { + "occurrenceToCriteria": { + "idPairsTable": { "table": "visit_occurrence" }, + "idPairsIdA": { "column": "visit_occurrence_id" }, + "idPairsIdB": { "column": "visit_concept_id" } + }, + "occurrenceToPrimary": { + "idPairsTable": { "table": "visit_occurrence" }, + "idPairsIdA": { "column": "visit_occurrence_id" }, + "idPairsIdB": { "column": "person_id" } + }, + "criteriaToPrimary": { + "idPairsTable": { "table": "visit_occurrence" }, + "idPairsIdA": { "column": "visit_concept_id" }, + "idPairsIdB": { "column": "person_id" } + } + } + }, + "indexDataMapping": { + "dataPointer": "index_dataset" + } +} diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_all.sql new file mode 100644 index 000000000..33c791c80 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_all.sql @@ -0,0 +1,6 @@ +SELECT * +FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` +WHERE + domain_id = 'Drug' AND concept_class_id = 'Brand Name' + AND vocabulary_id IN ('RxNorm', 'RxNorm Extension') + AND DATE_DIFF(CAST(valid_end_date AS DATE), CURRENT_DATE(), DAY) > 0 diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_ingredients.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_ingredients.sql new file mode 100644 index 000000000..c092f0baa --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_ingredients.sql @@ -0,0 +1,17 @@ +/* + 1. User searches for Brand Tylenol + 2. User expands Tylenol to see which ingredients are in Tylenol + 3. Ingredient Acetaminophen is shown + + Acetaminophen has over 300 descendants (eg "acetaminophen 100 MG/ML Oral Suspension"). Acetaminophen's + concept_class_id is Ingredient; descendants' concept_class_ids are Clinical Drug Comp, Quant Clinical Drug, etc. + + Most descendants have a relationship with Brand Tylenol in concept_relationship. However, we only want to show + Acetaminophen in step 3. So only keep relationships with concept_class_id=Ingredient. +*/ +SELECT cr.* +FROM + `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr, + `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 +WHERE + cr.concept_id_2 = c2.concept_id AND c2.concept_class_id = 'Ingredient' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_textSearch.sql new file mode 100644 index 000000000..fb790fd2f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_brand_textSearch.sql @@ -0,0 +1,26 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Drug' +AND c.concept_class_id = 'Brand Name' +AND c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_occurrence_all.sql new file mode 100644 index 000000000..c1ea73c77 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + co.condition_occurrence_id AS id, co.person_id, co.condition_concept_id, + co.condition_start_date AS start_date, co.condition_end_date AS end_date, co.stop_reason, + co.condition_source_value AS source_value, co.condition_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(co.condition_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + co.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SR2022Q4R6.condition_occurrence` AS co + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = co.person_id + +LEFT JOIN `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = co.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_parentChild.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_parentChild.sql new file mode 100644 index 000000000..11d2d938b --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_parentChild.sql @@ -0,0 +1,12 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child, +FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + cr.relationship_id = 'Subsumes' + AND c1.domain_id = c2.domain_id + AND c2.domain_id = 'Condition' + AND c1.vocabulary_id = c2.vocabulary_id + AND c2.vocabulary_id = 'SNOMED' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_textSearch.sql new file mode 100644 index 000000000..971776eac --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_condition_textSearch.sql @@ -0,0 +1,23 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Condition' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_device_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_device_occurrence_all.sql new file mode 100644 index 000000000..2855c3d3f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_device_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + de.device_exposure_id AS id, de.person_id, de.device_concept_id, + de.device_exposure_start_date AS start_date, de.device_exposure_end_date AS end_date, + de.device_source_value AS source_value, de.device_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(de.device_exposure_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + de.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SR2022Q4R6.device_exposure` AS de + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = de.person_id + +LEFT JOIN `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = de.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_device_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_device_textSearch.sql new file mode 100644 index 000000000..2037af1d9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_device_textSearch.sql @@ -0,0 +1,24 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Device' +AND c.standard_concept = 'S' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_all.sql new file mode 100644 index 000000000..960135b67 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_all.sql @@ -0,0 +1,8 @@ +SELECT + c.concept_id AS id, c.concept_name AS name, c.vocabulary_id, c.standard_concept, c.concept_code +FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +WHERE c.domain_id = 'Drug' +AND ( + (c.vocabulary_id = 'ATC' AND c.standard_concept = 'C') + OR (c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') AND c.standard_concept = 'S') +) diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_occurrence_all.sql new file mode 100644 index 000000000..a0ba0a621 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_occurrence_all.sql @@ -0,0 +1,15 @@ +SELECT + de.drug_exposure_id AS id, de.person_id, de.drug_concept_id, + de.drug_exposure_start_date AS start_date, de.drug_exposure_end_date AS end_date, + de.stop_reason, de.refills, de.days_supply, + de.drug_source_value AS source_value, de.drug_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(de.drug_exposure_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + de.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SR2022Q4R6.drug_exposure` AS de + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = de.person_id + +LEFT JOIN `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = de.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_parentChild.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_parentChild.sql new file mode 100644 index 000000000..7a94ef71a --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_parentChild.sql @@ -0,0 +1,37 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child +FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + c1.concept_id != c2.concept_id + AND c1.domain_id = 'Drug' AND c2.domain_id = 'Drug' + AND ( + + /* + Populate Ingredients' ancestors', which are ATCs. See + https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:atc#:~:text=the%20original%20ATC%20hierarchy%20is%20extended%20by%20Standard%20Drug%20Products%20of%20RxNorm%20and%20RxNorm%20Extension%20vocabularies%2C%20which%20are%20assigned%20to%20be%20descendants%20of%20the%205th%20ATC%20Classes. + Eg: + ATC 1st (highest ancestor) Subsumes ATC 2nd + ATC 5th (direct parent of RxNorm) Maps to RxNorm + */ + (c1.vocabulary_id IN ('ATC') AND cr.relationship_id IN ('Subsumes', 'Maps to')) + + OR + + /* + Populate Ingredients and their descendants: Branded Drug, Clinical Drug, etc. Ingredients and their + descendants are RxNorm. drug_exposure contains Ingredients or their descendants. + Use [1] and [2] to define hierarchy. Eg "Marketed Product" is most specific and is bottom of hierarchy. + [1] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:cdm:drug_exposure#:~:text=These%20are%20indicated,is%20available%20%E2%80%9CIngredient%E2%80%9D + [2] https://www.ohdsi.org/web/wiki/doku.php?id=documentation:vocabulary:drug#:~:text=are%20not%20implemented.-,Relationships,-As%20usual%2C%20all + */ + ( + c1.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + AND c2.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + /* Only keep relationships where c1 is "parent" of c2 */ + AND cr.relationship_id IN ('Constitutes', 'Contained in' , 'Has form', 'Has quantified form', 'RxNorm ing of', 'RxNorm inverse is a', 'Precise ing of') + ) + + ) diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_textSearch.sql new file mode 100644 index 000000000..a4c73c471 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_ingredient_textSearch.sql @@ -0,0 +1,31 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Drug' +AND ((c.vocabulary_id IN ('RxNorm', 'RxNorm Extension') + AND c.concept_class_id = 'Ingredient' + AND c.standard_concept = 'S') + OR (c.vocabulary_id = 'RxNorm' + AND c.concept_class_id = 'Precise Ingredient') + OR (c.vocabulary_id = 'ATC' + AND c.concept_class_id IN ('ATC 1st', 'ATC 2nd', 'ATC 3rd', 'ATC 4th', 'ATC 5th') + AND c.standard_concept = 'C')) diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_occurrence_all.sql new file mode 100644 index 000000000..96471292c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + mo.measurement_id AS id, mo.person_id, mo.measurement_concept_id, mo.measurement_date, + mo.value_as_number AS value_numeric, mo.value_as_concept_id, mo.unit_concept_id, + mo.measurement_source_value AS source_value, mo.measurement_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(mo.measurement_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + mo.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SR2022Q4R6.measurement` AS mo + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = mo.person_id + +LEFT JOIN `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = mo.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_parentChild.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_parentChild.sql new file mode 100644 index 000000000..394ab9ffc --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_parentChild.sql @@ -0,0 +1,13 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child, +FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + cr.relationship_id = 'Subsumes' + AND c1.vocabulary_id = c2.vocabulary_id + AND ((c1.vocabulary_id = 'SNOMED' AND c1.domain_id = c2.domain_id AND c1.domain_id = 'Measurement') + OR (c1.vocabulary_id = 'LOINC' + AND c1.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test') + AND c2.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_textSearch.sql new file mode 100644 index 000000000..f654db86a --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_measurement_textSearch.sql @@ -0,0 +1,24 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE ((c.domain_id = 'Measurement' AND c.vocabulary_id = 'SNOMED') + OR (c.vocabulary_id = 'LOINC' AND c.concept_class_id IN ('LOINC Hierarchy', 'LOINC Component', 'Lab Test'))) diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_observation_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_observation_occurrence_all.sql new file mode 100644 index 000000000..f43eae13f --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_observation_occurrence_all.sql @@ -0,0 +1,14 @@ +SELECT + o.observation_id AS id, o.person_id, o.observation_concept_id, + o.observation_date, o.value_as_string, o.value_as_concept_id, o.unit_concept_id, + o.observation_source_value AS source_value, o.observation_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(o.observation_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + o.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SR2022Q4R6.observation` AS o + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = o.person_id + +LEFT JOIN `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = o.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_observation_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_observation_textSearch.sql new file mode 100644 index 000000000..9efe93376 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_observation_textSearch.sql @@ -0,0 +1,26 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Observation' +AND c.standard_concept = 'S' +AND c.vocabulary_id != 'PPI' +AND c.concept_class_id != 'Survey' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_person.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_person.sql new file mode 100644 index 000000000..0f6a7ff67 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_person.sql @@ -0,0 +1,4 @@ +SELECT + p.person_id, p.year_of_birth, p.birth_datetime, p.gender_concept_id, p.race_concept_id, p.ethnicity_concept_id +FROM `all-of-us-ehr-dev.SR2022Q4R6.person` p + diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_occurrence_all.sql new file mode 100644 index 000000000..4a89cd37e --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_occurrence_all.sql @@ -0,0 +1,13 @@ +SELECT + po.procedure_occurrence_id AS id, po.person_id, po.procedure_concept_id, po.procedure_date, + po.procedure_source_value AS source_value, po.procedure_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(po.procedure_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence, + po.visit_occurrence_id, vo.visit_concept_id + +FROM `all-of-us-ehr-dev.SR2022Q4R6.procedure_occurrence` AS po + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = po.person_id + +LEFT JOIN `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo +ON vo.visit_occurrence_id = po.visit_occurrence_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_parentChild.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_parentChild.sql new file mode 100644 index 000000000..141af2cb9 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_parentChild.sql @@ -0,0 +1,12 @@ +SELECT + cr.concept_id_1 AS parent, + cr.concept_id_2 AS child, +FROM `all-of-us-ehr-dev.SR2022Q4R6.concept_relationship` cr +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c1 ON c1.concept_id = cr.concept_id_1 +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c2 ON c2.concept_id = cr.concept_id_2 +WHERE + cr.relationship_id = 'Subsumes' + AND c1.domain_id = c2.domain_id + AND c2.domain_id = 'Procedure' + AND c1.vocabulary_id = c2.vocabulary_id + AND c2.vocabulary_id = 'SNOMED' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_textSearch.sql new file mode 100644 index 000000000..9b3d90a36 --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_procedure_textSearch.sql @@ -0,0 +1,23 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Procedure' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_visit_occurrence_all.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_visit_occurrence_all.sql new file mode 100644 index 000000000..62ba1ffbd --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_visit_occurrence_all.sql @@ -0,0 +1,10 @@ +SELECT + vo.visit_occurrence_id AS id, vo.person_id, vo.visit_concept_id, + vo.visit_start_date AS start_date, vo.visit_end_date AS end_date, + vo.visit_source_value AS source_value, vo.visit_source_concept_id AS source_criteria_id, + CAST(FLOOR(TIMESTAMP_DIFF(vo.visit_start_datetime, p.birth_datetime, DAY) / 365.25) AS INT64) AS age_at_occurrence + +FROM `all-of-us-ehr-dev.SR2022Q4R6.visit_occurrence` AS vo + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.person` AS p +ON p.person_id = vo.person_id diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_visit_textSearch.sql b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_visit_textSearch.sql new file mode 100644 index 000000000..290a4e80c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/sql/t_visit_textSearch.sql @@ -0,0 +1,24 @@ +SELECT textsearch.id, textsearch.text FROM ( + + SELECT + c.concept_id AS id, c.concept_name AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, CAST(c.concept_id AS STRING) AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c + + UNION ALL + + SELECT + c.concept_id AS id, c.concept_code AS text + FROM `all-of-us-ehr-dev.SR2022Q4R6.concept` c +) AS textsearch + +JOIN `all-of-us-ehr-dev.SR2022Q4R6.concept` c +ON c.concept_id = textsearch.id + +WHERE c.domain_id = 'Visit' +AND c.standard_concept = 'S' diff --git a/service/src/main/resources/config/aou/test/SR2022Q4R6/original/ui/top_level.json b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/ui/top_level.json new file mode 100644 index 000000000..d9c8df81c --- /dev/null +++ b/service/src/main/resources/config/aou/test/SR2022Q4R6/original/ui/top_level.json @@ -0,0 +1,468 @@ +{ + "dataConfig": { + "primaryEntity": { + "displayName": "Person", + "entity": "t_person", + "key": "id", + "classifications": [ + ] + }, + "occurrences": [ + { + "id": "condition_occurrence", + "displayName": "Condition Occurrences", + "entity": "t_condition_occurrence", + "key": "id", + "classifications": [ + { + "id": "condition", + "attribute": "condition", + "entity": "t_condition", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + } + } + ] + }, + { + "id": "procedure_occurrence", + "displayName": "Procedure Occurrences", + "entity": "t_procedure_occurrence", + "key": "id", + "classifications": [ + { + "id": "procedure", + "attribute": "procedure", + "entity": "t_procedure", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + } + } + ] + }, + { + "id": "observation_occurrence", + "displayName": "Observation Occurrence", + "entity": "t_observation_occurrence", + "key": "id", + "classifications": [ + { + "id": "observation", + "attribute": "observation", + "entity": "t_observation", + "entityAttribute": "id", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + } + } + ] + }, + { + "id": "ingredient_occurrence", + "displayName": "Drug Occurrence", + "entity": "t_ingredient_occurrence", + "key": "id", + "classifications": [ + { + "id": "ingredient", + "attribute": "id", + "entity": "t_ingredient", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_rollup_count", + "direction": "DESC" + }, + "groupings": [ + { + "id": "brand", + "entity": "t_brand", + "defaultSort": { + "attribute": "name", + "direction": "ASC" + }, + "attributes": ["name", "id", "standard_concept", "concept_code"] + } + ] + } + ] + }, + { + "id": "measurement_occurrence", + "displayName": "Measurement Occurrence", + "entity": "t_measurement_occurrence", + "key": "id", + "classifications": [ + { + "id": "measurement", + "attribute": "measurement", + "entity": "t_measurement", + "entityAttribute": "id", + "hierarchy": "standard", + "defaultSort": { + "attribute": "t_item_count", + "direction": "DESC" + } + } + ] + } + ] + }, + "criteriaConfigs": [ + { + "type": "classification", + "id": "tanagra-conditions", + "title": "Condition", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Condition" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "condition_occurrence", + "classification": "condition", + "modifiers": [ + "age_at_occurrence", + "visit_type", + "start_date_group_by_count" + ] + }, + { + "type": "classification", + "id": "tanagra-procedures", + "title": "Procedure", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Procedure" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "procedure_occurrence", + "classification": "procedure", + "modifiers": ["age_at_occurrence", "visit_type", "date_group_by_count"] + }, + { + "type": "classification", + "id": "tanagra-observations", + "title": "Observation", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "observation_occurrence", + "classification": "observation", + "modifiers": ["age_at_occurrence", "visit_type", "date_group_by_count"] + }, + { + "type": "classification", + "id": "tanagra-drugs", + "title": "Drug", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Drug" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "ingredient_occurrence", + "classification": "ingredient", + "modifiers": [ + "age_at_occurrence", + "visit_type", + "start_date_group_by_count" + ] + }, + { + "type": "classification", + "id": "tanagra-measurement", + "title": "Labs and measurements", + "conceptSet": true, + "category": "Domains", + "columns": [ + { "key": "name", "width": "100%", "title": "Concept name" }, + { "key": "id", "width": 100, "title": "Concept ID" }, + { "key": "standard_concept", "width": 120, "title": "Source/standard" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_item_count", "width": 120, "title": "Count" } + ], + "hierarchyColumns": [ + { "key": "name", "width": "100%", "title": "Condition" }, + { "key": "id", "width": 120, "title": "Concept ID" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up count" } + ], + "occurrence": "measurement_occurrence", + "classification": "measurement", + "modifiers": ["age_at_occurrence", "visit_type", "date_group_by_count"], + "valueConfigs": [ + { + "title": "Categorical value", + "attribute": "value_enum" + }, + { + "title": "Numeric value", + "attribute": "value_numeric" + } + ] + }, + { + "type": "attribute", + "id": "tanagra-ethnicity", + "title": "Ethnicity", + "category": "Program data", + "attribute": "ethnicity" + }, + { + "type": "attribute", + "id": "tanagra-gender", + "title": "Gender identity", + "category": "Program data", + "attribute": "gender" + }, + { + "type": "attribute", + "id": "tanagra-race", + "title": "Race", + "category": "Program data", + "attribute": "race" + }, + { + "type": "attribute", + "id": "tanagra-age", + "title": "Age", + "category": "Program data", + "attribute": "age" + } + ], + "modifierConfigs": [ + { + "type": "unhinted-value", + "id": "start_date_group_by_count", + "title": "Occurrence count", + "attribute": "start_date", + "groupByCount": true + }, + { + "type": "unhinted-value", + "id": "date_group_by_count", + "title": "Occurrence count", + "attribute": "date", + "groupByCount": true + }, + { + "type": "attribute", + "id": "visit_type", + "title": "Visit type", + "attribute": "visit_type" + }, + { + "type": "attribute", + "id": "age_at_occurrence", + "title": "Age at occurrence", + "attribute": "age_at_occurrence" + } + ], + "demographicChartConfigs": { + "groupByAttributes": ["gender", "race", "age"], + "chartConfigs": [ + { + "title": "Gender identity", + "primaryProperties": [{ "key": "gender" }] + }, + { + "title": "Gender identity, Current age, Race", + "primaryProperties": [ + { "key": "gender" }, + { + "key": "age", + "buckets": [ + { + "min": 18, + "max": 45, + "displayName": "18-44" + }, + { + "min": 45, + "max": 65, + "displayName": "45-64" + }, + { + "min": 65, + "displayName": "65+" + } + ] + } + ], + "stackedProperty": { "key": "race" } + } + ] + }, + "prepackagedConceptSets": [ + { + "id": "_demographics", + "name": "Demographics", + "occurrence": "" + }, + { + "id": "_analgesics", + "name": "Analgesics", + "occurrence": "ingredient_occurrence", + "filter": { + "type": "CLASSIFICATION", + "occurrenceId": "ingredient_occurrence", + "classificationId": "ingredient", + "keys": [21604253] + } + } + ], + "criteriaSearchConfig": { + "criteriaTypeWidth": 120, + "columns": [ + { "key": "name", "width": "100%", "title": "Concept Name" }, + { "key": "vocabulary_t_value", "width": 120, "title": "Vocab" }, + { "key": "concept_code", "width": 120, "title": "Code" }, + { "key": "t_rollup_count", "width": 120, "title": "Roll-up Count" } + ] + }, + "cohortReviewConfig": { + "participantsListColumns": [ + { "key": "id", "width": 100, "title": "Id" }, + { "key": "gender", "width": 100, "title": "Gender" }, + { "key": "race", "width": 100, "title": "Race" }, + { "key": "ethnicity", "width": 100, "title": "Ethnicity" }, + { "key": "age", "width": 60, "title": "Year of Birth" } + ], + "attributes": [ + { + "title": "Gender", + "key": "gender" + }, + { + "title": "Age", + "key": "age" + }, + { + "title": "Race", + "key": "race" + }, + { + "title": "Ethnicity", + "key": "ethnicity" + } + ], + "pages": [ + { + "type": "occurrenceTable", + "id": "condition", + "title": "Conditions", + "plugin": { + "occurrence": "condition_occurrence", + "columns": [ + { "key": "condition", "width": "100%", "title": "Condition name" }, + { "key": "start_date", "width": 200, "title": "Start date" }, + { "key": "end_date", "width": 200, "title": "End date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "procedure", + "title": "Procedures", + "plugin": { + "occurrence": "procedure_occurrence", + "columns": [ + { "key": "procedure", "width": "100%", "title": "Procedure name" }, + { "key": "date", "width": 200, "title": "Date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "observation", + "title": "Observations", + "plugin": { + "occurrence": "observation_occurrence", + "columns": [ + { + "key": "observation", + "width": "100%", + "title": "Observation name" + }, + { "key": "date", "width": 200, "title": "Date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "ingredient", + "title": "Drugs", + "plugin": { + "occurrence": "ingredient_occurrence", + "columns": [ + { "key": "ingredient", "width": "100%", "title": "Drug name" }, + { "key": "start_date", "width": 200, "title": "Start date" }, + { "key": "end_date", "width": 200, "title": "End date" } + ] + } + }, + { + "type": "occurrenceTable", + "id": "measurements", + "title": "Labs and measurements", + "plugin": { + "occurrence": "measurement_occurrence", + "columns": [ + { + "key": "measurement", + "width": "100%", + "title": "Lab/measurement name" + }, + { "key": "date", "width": 200, "title": "Date" }, + { "key": "value_enum", "width": 160, "title": "Categorical value" }, + { "key": "value_numeric", "width": 160, "title": "Numeric value" }, + { "key": "unit", "width": 160, "title": "Unit" } + ] + } + } + ] + } +}