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

Negative control outcomes generation bug #177

Closed
anthonysena opened this issue Aug 7, 2024 · 0 comments · Fixed by #178
Closed

Negative control outcomes generation bug #177

anthonysena opened this issue Aug 7, 2024 · 0 comments · Fixed by #178
Milestone

Comments

@anthonysena
Copy link
Collaborator

anthonysena commented Aug 7, 2024

If you generate negative control outcomes more than one time and your cohort_definition_id is not the same as the outcome concept ID, you can produce duplicates in the cohort table due to the improper removal of prior results per this code here:

DELETE FROM @cohort_database_schema.@cohort_table
WHERE cohort_definition_id IN (
SELECT DISTINCT ancestor_concept_id
FROM #Codesets
)
;

This should be:

 DELETE FROM @cohort_database_schema.@cohort_table 
 WHERE cohort_definition_id IN ( 
   SELECT DISTINCT cohort_definition_id
    FROM #Codesets
 ) 
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

Successfully merging a pull request may close this issue.

1 participant