inst/QueryLibrary/Aggregate/condition_occurrence/CO20.md

CO20: Counts of stop reasons

Description

This query is used to count stop reasons (stop_reason) across all condition occurrence records.

Query

SELECT 
  COUNT(stop_reason) AS stop_reason_count,
  stop_reason
FROM @cdm.condition_occurrence 
GROUP BY stop_reason;

Input

None

Output

| Field | Description | | --- | --- | | stop_reason_count | The number of the condition occurrences with a specific stop reason. | | stop_reason | Reason for condition stop |

Example output record

| Field | Description | | --- | --- | | stop_reason_count | 20100 | | stop_reason | resolved |

Documentation

https://github.com/OHDSI/CommonDataModel/wiki/



sib-swiss/dsQueryLibraryServer documentation built on Feb. 13, 2025, 8:07 p.m.