Person‎ > ‎

PE05: Number of patients grouped by ethinicity

This query is used to count ethnicities (ethnicity_concept_id) across all person records. The input to the query is a value (or a comma-separated list of values) of an ethnicity_concept_id. If the input is omitted, all possible values for ethnicity_concept_id are summarized. This query is also available from OSCAR runs of CDM V4 and above.

Input:
<None>

Sample query run:
The following is a sample run of the query to run a search for number of persons grouped by ethnicity.
SELECT  CONCEPT.CONCEPT_NAME,
        COUNT(person.person_ID) AS Num_Persons_count
FROM    person
INNER JOIN vocabulary.CONCEPT ON person.ETHNICITY_CONCEPT_ID = CONCEPT.CONCEPT_ID GROUP BY CONCEPT.CONCEPT_NAME
Output:
Output field list:
 Field  Description
Ethnicity_Concept_ID Ethnicity concept identifier as defined in CDM vocabulary
Ethnicity_Name Ethnicity name as defined in CDM vocabulary
Num_Persons_count Number of patients in the dataset of specific ethnicity

Sample output record:
 Field  Value
Ethnicity_Concept_ID 38003563
Ethnicity_Name Hispanic or Latino
Num_Persons_count 655298
Comments