Skip to content
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

Manuscript Supplementary material for ICD10 based case definition should distinguish past VS present cases. #9

Open
comorbidity opened this issue May 22, 2024 · 0 comments

Comments

@comorbidity
Copy link
Contributor

Example logic:

CasePastPresent as (
select distinct
CaseDef.subject_ref, CaseDef.encounter_ref,
CaseDef.dx_suicidality, CaseDef.dx_subtype, CaseDef.dx_code,
case
when dx_code in ('Z91.5', 'Z91.51', 'Z91.52') then 'action-past' -- history of self harm
when (dx_code like 'T%D') or (dx_code like 'X%D') then 'action-past-present' -- subsequent suicide attempt, and other codes for subsequent encounter
when (dx_code like 'T%S') or (dx_code like 'X%S') then 'action-past-present' -- subsequent encounter
else concat(CaseDef.label, '-present') end as label
from CaseDef
)

comorbidity added a commit that referenced this issue May 22, 2024
…sues/9

"Manuscript Supplementary material for ICD10 based case definition should have a column for past VS present cases"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant