inst/QueryLibrary/Aggregate/observation_period/OP17.md

OP17: Counts of observation period records stratified by observation end date month.

Description

This query is used to count the observation period records stratified by observation month and person end. person end is an indicator whether a person has completed the last observation period in a given observation month. All possible values are summarized.

Query

WITH observation_period_month AS
  ( SELECT
      date_part('month',observation_period_end_date) AS observation_month
      FROM @cdm.observation_period
  )
SELECT
  observation_month,
  count(*)::integer AS num_observations
FROM observation_period_month
GROUP BY observation_month
ORDER BY 1;

Input

None

Output

| Field | Description | | --- | --- | | observation_month | Month of observation | | num_observations | Number of observation within end of observation period month |

Example output record

| Field | Description | | --- | --- | | observation_month | 1 | | num_observations | 62183 |

Documentation

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



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