Count number of condition occurrences per person stratified by condition.
SELECT condition_concept_id,
num_of_occurrences,
count(*)::integer num_of_patients
FROM
(SELECT condition_concept_id,
person_id,
count(*)::integer num_of_occurrences
FROM @cdm.condition_occurrence condition
WHERE condition.condition_concept_id = $1
GROUP BY person_id, condition_concept_id
) AS counts_condition_person
GROUP BY condition_concept_id, num_of_occurrences;
| Parameter | Example | Mandatory | Notes | | --- | --- | --- | --- | | condition_concept_id | 200219 | Yes | Condition concept identifier for 'Abdominal pain' |
| Field | Description | | --- | --- | | condition_concept_id | Condition concept identifier | | num_occurrences | Number of condition occurrences | | num_of_patients | Number of patients with num_occurrences |
| Field | Description | | --- | --- | | condition_concept_id | 200219 | | num_occurrences | 10 | | num_of_patients | 3681 |
https://github.com/OHDSI/CommonDataModel/wiki/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.