Skip to content

Commit

Permalink
Include the observation table when creating negative control cohorts (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonysena authored Dec 12, 2024
1 parent 5f94575 commit 1b5453a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inst/sql/sql_server/NegativeControlOutcomes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ FROM (
d.condition_start_date cohort_start_date
FROM @cdm_database_schema.condition_occurrence d
INNER JOIN #Codesets c ON c.concept_id = d.condition_concept_id
UNION ALL
SELECT
o.person_id subject_id,
c.cohort_definition_id,
o.observation_date cohort_start_date
FROM @cdm_database_schema.observation o
INNER JOIN #Codesets c ON c.concept_id = o.observation_concept_id
{@occurrence_type == 'first'}?{
) e
}:{}
Expand Down

0 comments on commit 1b5453a

Please sign in to comment.