Returns the distribution of condition occurrence per season in the northern hemisphere, defined in the following way:
|| March 21 - June 21
|| June 22 - September 22
|| September 23 - December 21
|| December 22 - March 20
Sample query run:
||Condition concept identifier for 'Nausea'
The following is a sample run of the query. The input parameters are highlighted in blue
SELECT CASE WHEN (daymonth>0320 AND daymonth<=0621) THEN 'Spring'
WHEN (daymonth>0621 AND daymonth<=0922) THEN 'Summer'
WHEN (daymonth>0922 AND daymonth<=1221) THEN 'Fall'
WHEN (daymonth>1221 OR (daymonth>0000 AND daymonth<=0520)) THEN 'Winter'
ELSE 'Unknown' end AS season
SELECT cast(substring(condition_start_date from 6 for 2)||
substring(condition_start_date from 9 for 2) as int) AS daymonth,condition_start_date
WHERE condition_concept_id = 31967
) AS condition_season
GROUP BY season
ORDER BY season_freq
Output field list:
||Season as defined in the northern hemisphere.
||Frequency of condition occurrence in the season.
Sample output record: