-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Verification: Steroid Induced Osteonecrosis Cohort #107
Comments
rx_case_inclusion_criteria_1:
|
dx_case_inclusion_criteria_1: |
all_case_inclusion_criteria_1
|
Remaining all_case_inclusion -- I see you used the same "shell" that looks at conditions, medications, observations, procedures even when the code set probably is "looking" only at a single domain (e.g. conditions). This is fine even if inefficient and more expensive. I suspect folks not using GBQ would object to such brute force queries. But it does work since the concept codes will only match in the right domains. |
rx_control_inclusion_criteria_1
|
Overall logic: I think you have the logic for exclusions wrong for both cases and controls. Any exclusion removes a patient. So you need to "OR" (= UNION DISTINCT) all of the exclusions so that a patient_id that appears in ANY exclusion is included in your "EXCEPT DISTINCT" subquery. As currently written, a patient would only be excluded if they met ALL exclusion criteria. |
End of mgk comments on steroid induced osteonecrosis |
Good point, I will remove that.
OK, I will update accordingly.
That's a great idea! I wonder if it also makes sense to do that for conditions too? I won't have that in time for our AMIA Informatics Summit, but I can adjust the queries and implement this afterwards. I created issue #114 For WITH rx_case_inclusion_criteria_1 AS (
SELECT de.person_id, cohort.standard_code_set AS code_set
FROM
{database}.drug_exposure de,
{database}.concept c,
{database}.STEROIDINDUCEDOSTEONECROSIS_COHORT_VARS cohort
WHERE de.route_concept_id IN (4132161, 4171047, 4302612)
AND de.drug_concept_id = CAST(cohort.standard_concept_id AS int64)
AND cohort.phenotype_definition_number = 1
AND cohort.standard_code_set = {code_set_group}
GROUP BY
de.person_id, code_set, de.drug_exposure_order_datetime, de.drug_exposure_end_datetime
HAVING
COUNT(DISTINCT de.drug_concept_id) >= 1
AND DATETIME_DIFF(DATETIME(de.drug_exposure_end_datetime), DATETIME(de.drug_exposure_order_datetime), day) >= 14
), |
Thanks for thinking about this so critically, it sounds like we are in the same page about this. I was intending for the query to run this way 😄. |
Bullets 1 and 3: Thanks for pointing this out. I did run the query confirm that it returns the same rows as when adding in the missing argument to the subqueries. That said, I agree that this seems sketchy so I updated all Bullet 2: I agree that this is a brute-force approach and not the most elegant, but it works 😄! I am happy to change if there is a different way that you would like me to write this. Just let me know. |
Consistent with response above, I agree that this is a brute-force approach and not the most elegant, but it works 😄! I am happy to change if there is a different way that you would like me to write this. Just let me know. |
This might be a bigger question on my end then. I take it that unless you commented, the other queries looked OK? I am only asking so I know whether or not I need to go back the other queries. So, if the logical definitions says: "NOT presence of ANY A AND NOT presence of ANY B AND NOT presence of ANY C" You would write this like? EXCEPT DISTINCT
(A UNION DISTINCT B UNION DISTINCT C) |
It looks like MIMIC-OMOP does not have |
Yes. Next best alternative.
NOTE: NEW EMAIL ADDRESS
Michael G. Kahn MD, PhD
Professor with Tenure, Section of Clinical Informatics, Department of Pediatrics
Co-Director & Translational Informatics Core Director, Colorado Clinical and Translational Sciences Institute
Director, Health Data Compass
Associate Director, Colorado Center for Personalized Medicine
University of Colorado Denver Anschutz Medical Campus
Aurora, Colorado 80045 USA
Medical Director, Research Informatics
Children's Hospital Colorado Research Institute Aurora, Colorado
E: Michael.Kahn@cuanschutz.edu<mailto:Michael.Kahn@cuanschutz.edu> | P: 303-724-8334
www.cuanschutz.edu<http://www.cuanschutz.edu>
[CU Anschutz Website]<https://www.cuanschutz.edu/>
[CU Anschutz Facebook]<https://www.facebook.com/CUAnschutzMed/> [CU Anschutz Instagram] <https://www.instagram.com/cuanschutz/> [CU Anschutz Linkedin] <https://www.linkedin.com/school/university-of-colorado-anschutz-medical-campus/> [CU Anschutz Twitter] <https://twitter.com/CUAnschutz>
From: "Tiffany J. Callahan" <notifications@github.com>
Reply-To: callahantiff/PheKnowVec <reply@reply.github.com>
Date: Monday, August 12, 2019 at 1:39 PM
To: callahantiff/PheKnowVec <PheKnowVec@noreply.github.com>
Cc: "Kahn, Michael" <MICHAEL.KAHN@CUANSCHUTZ.EDU>, Mention <mention@noreply.github.com>
Subject: Re: [callahantiff/PheKnowVec] Query Verification: Steroid Induced Osteonecrosis Cohort (#107)
It looks like MIMIC-OMOP does not have de.drug_exposure_order_datetime in the drug_exposure table. Should I substitute it for de.drug_exposure_start_datetime for both CHCO and MIMIC-OMOP?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#107?email_source=notifications&email_token=AA557TRZOW6O6W6HOPVIR5DQEG347A5CNFSM4IF3SZS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4DTH2I#issuecomment-520565737>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AA557TR3R5XUR2TI3RTQ3V3QEG347ANCNFSM4IF3SZSQ>.
|
TODO FOR ME:
|
@mgkahn - Can you please help me verify the query to select Steroid Induced Osteonecrosis patients?
COHORT CRITERIA
Case Criteria:
de.route_concept_id==4171047
), IM (de.route_concept_id==4302612
) or PO (de.route_concept_id==4132161
) ≥ 14 days cumulative) (drug strings - criteria # 1)condition strings;
drug strings;
measurement strings - criteria # 6)
condition strings - criteria # 7)
Control Criteria:
de.route_concept_id==4171047
), IM (de.route_concept_id==4302612
) or PO (de.route_concept_id==4132161
) ≥ 14 days cumulative) (medication strings - criteria # 10)Cohort Logic Table
NOTE.
{database}
withCHCO_DeID_Oct2018
{code_set_group}
Query can be found here and is also included below:
The text was updated successfully, but these errors were encountered: