I have created a cohort in Atlas using standard condition_concept_ids for a Condition with the additional attribute of having specific condition_source_concept_ids to allow an exact comparison to the source data which are coded with ICD9CM/ICD10CM. When I add the condition_source_concept_id as an attribute of the Condition cohort entry event, my record count drops to 0. I also tried adding the condition_source_concept_id requirement as an inclusion criteria instead of an attribute of the cohort entry event, but the record count also drops to 0. I did verify my data is in the CDM and mapped correctly, verified I have Persons with both the condition_concept_id and condition_source_concept_id, and dropped all other requirements/criteria from the cohort in Atlas.
@Adam_Black is helping me trouble shoot the issue and we think it comes down to this part of the SQL:
“SELECT co.*
FROM cdm_531.CONDITION_OCCURRENCE co
JOIN Codesets codesets on ((co.condition_concept_id = codesets.concept_id and codesets.codeset_id = 0)
AND (co.condition_source_concept_id = codesets.concept_id and codesets.codeset_id = 1))”
The current working theory is the above will always return 0 rows since codeset_id cannot be both 0 and 1. Thoughts? Ideas?