CO11: Counts of persons with conditions

This query is used to count the persons with any number of occurrences of a certain condition (condition_concept_id). The input to the query is a value of a condition_concept_id.

Input:
 Parameter  Example  Mandatory  Notes
condition_concept_id 31967 Yes Condition concept identifier for 'Nausea'

Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue

SELECT COUNT(distinct person_id) AS persons_with_condition_count FROM condition_occurrence WHERE condition_concept_id = 31967 AND person_id IS NOT NULL
Output:
Output field list:
 Field  Description
persons_with_condition_count Number of persons who had at least one occurrence of a certain condition.

Sample output record:
 Field  Description
persons_with_condition_count 2142100
Comments