Skip to content

Commit

Permalink
Updated indexing changes for cpt4, phewas for no-longer used columns (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchals authored Nov 19, 2024
1 parent 8f068a5 commit 7315691
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
SELECT
pc.criteria_meta_seq as id,
pc.criteria_meta_seq as concept_id,
regexp_replace(pc.name,concat(regexp_replace(pc.label, r'CPT Codes_Include_', ''),' '),'') as name,
pc.type,
'Source' AS is_standard,
regexp_replace(pc.label, r'CPT Codes_Include_', '') as concept_code,
name as label
FROM `${omopDataset}.cpt_criteria` pc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "INT64" },
{ "name": "concept_id", "dataType": "INT64" },
{ "name": "name", "dataType": "STRING" },
{ "name": "is_standard", "dataType": "STRING", "isComputeDisplayHint": true },
{ "name": "concept_code", "dataType": "STRING" },
{ "name": "label", "dataType": "STRING" }
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
SELECT
pc.criteria_meta_seq AS id,
pc.criteria_meta_seq AS concept_id,
REGEXP_EXTRACT(label, r'^PHEWAS_[0-9.]+-(.*)') AS name,
pc.type,
'Source' AS is_standard,
REGEXP_EXTRACT(label, r'^PHEWAS_([0-9.]+)-') AS concept_code,
REGEXP_EXTRACT(label, r'^PHEWAS_(.*)') AS label
FROM `${omopDataset}.phewas_criteria` pc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"allInstancesSqlFile": "all.sql",
"attributes": [
{ "name": "id", "dataType": "INT64" },
{ "name": "concept_id", "dataType": "INT64" },
{ "name": "name", "dataType": "STRING" },
{ "name": "is_standard", "dataType": "STRING", "isComputeDisplayHint": true },
{ "name": "concept_code", "dataType": "STRING" },
{ "name": "label", "dataType": "STRING" }
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM `${omopDataset}.icd_codes` AS io
LEFT JOIN `${omopDataset}.phewas_criteria_icd` AS pci
ON pci.ICD9 = io.code
LEFT JOIN (
SELECT criteria_meta_seq AS id, REGEXP_EXTRACT(label, r'^PHEWAS_([0-9.]+)-') AS code,*
FROM `${omopDataset}.phewas_criteria`
SELECT criteria_meta_seq AS id, REGEXP_EXTRACT(label, r'^PHEWAS_([0-9.]+)-') AS code
FROM `${omopDataset}.phewas_criteria`
) pc ON pc.code = pci.icd9
WHERE pc.id IS NOT NULL

0 comments on commit 7315691

Please sign in to comment.