Skip to content

Commit

Permalink
Configure source queries for new ingredient attributes in sd (#1149)
Browse files Browse the repository at this point in the history
* configure source queries for new ingredient attributes

* updated source queries to use INT64 for drug_exposure_id and for person_id

---------

Co-authored-by: Chenchal Subraveti <[email protected]>
  • Loading branch information
dolbeew and chenchals authored Jan 29, 2025
1 parent bf28064 commit 6bc2b90
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"attributes": [
{ "name": "id", "dataType": "INT64", "valueFieldName": "condition_occurrence_id", "isSuppressedForExport": true },
{ "name": "person_id", "dataType": "INT64" },
{ "name": "GRID", "dataType": "STRING", "valueFieldName": "person_id", "displayFieldName": "person_source_value",
{ "name": "GRID", "dataType": "INT64", "valueFieldName": "person_id", "displayFieldName": "person_source_value",
"sourceQuery": {
"displayFieldName": "person_source_value",
"displayFieldTable": "${omopDataset}.person",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SELECT
tc.concept_name AS drug_type_concept_name,
vo.visit_concept_id,
vc.concept_name AS visit_concept_name,
de.route_source_value AS route,
de.route_source_value,
x.x_drug_form AS drug_form,
x.x_strength AS drug_strength,
x.x_dose AS dose_amt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,49 @@
{ "name": "age_at_occurrence", "dataType": "INT64", "isComputeDisplayHint": true, "displayHintRangeMin": 0, "displayHintRangeMax": 89, "isSuppressedForExport": true },
{ "name": "visit_occurrence_id", "dataType": "INT64" },
{ "name": "visit_type", "dataType": "INT64", "valueFieldName": "visit_concept_id", "displayFieldName": "visit_concept_name", "isComputeDisplayHint": true, "isSuppressedForExport": true },
{"name": "exposure_type", "dataType": "INT64", "valueFieldName": "drug_type_concept_id", "displayFieldName": "drug_type_concept_name"},
{"name": "form", "dataType": "STRING", "valueFieldName": "drug_form"},
{"name": "strength", "dataType": "STRING", "valueFieldName": "drug_strength"},
{"name": "amount", "dataType": "STRING", "valueFieldName": "dose_amt"},
{"name": "route", "dataType": "STRING", "valueFieldName": "route"},
{"name": "frequency", "dataType": "STRING", "valueFieldName": "drug_freq"},
{"name": "source", "dataType": "STRING", "valueFieldName": "source_table"}
{"name": "exposure_type", "dataType": "INT64", "valueFieldName": "drug_type_concept_id", "displayFieldName": "drug_type_concept_name",
"sourceQuery": {
"displayFieldName": "concept_name",
"displayFieldTable": "${omopDataset}.concept",
"displayFieldTableJoinFieldName": "concept_id"
}
},
{"name": "form", "dataType": "INT64", "valueFieldName": "drug_exposure_id", "displayFieldName": "drug_form",
"sourceQuery": {
"displayFieldName": "x_drug_form",
"displayFieldTable": "${omopDataset}.x_drug_exposure",
"displayFieldTableJoinFieldName": "drug_exposure_id"
}
},
{"name": "strength", "dataType": "INT64", "valueFieldName": "drug_exposure_id", "displayFieldName": "drug_strength",
"sourceQuery": {
"displayFieldName": "x_strength",
"displayFieldTable": "${omopDataset}.x_drug_exposure",
"displayFieldTableJoinFieldName": "drug_exposure_id"
}
},
{"name": "amount", "dataType": "INT64", "valueFieldName": "drug_exposure_id", "displayFieldName": "dose_amt",
"sourceQuery": {
"displayFieldName": "x_dose",
"displayFieldTable": "${omopDataset}.x_drug_exposure",
"displayFieldTableJoinFieldName": "drug_exposure_id"
}
},
{"name": "route", "dataType": "STRING", "valueFieldName": "route_source_value"},
{"name": "frequency", "dataType": "INT64", "valueFieldName": "drug_exposure_id", "displayFieldName": "drug_freq",
"sourceQuery": {
"displayFieldName": "x_frequency",
"displayFieldTable": "${omopDataset}.x_drug_exposure",
"displayFieldTableJoinFieldName": "drug_exposure_id"
}
},
{"name": "source", "dataType": "INT64", "valueFieldName": "drug_exposure_id", "displayFieldName": "source_table",
"sourceQuery": {
"displayFieldName": "x_doc_type",
"displayFieldTable": "${omopDataset}.x_drug_exposure",
"displayFieldTableJoinFieldName": "drug_exposure_id"
}
}
],
"idAttribute": "id",
"optimizeGroupByAttributes": [ "ingredient" ],
Expand Down

0 comments on commit 6bc2b90

Please sign in to comment.