Check Code: Customizing the Data Entry Process

How to use EpiWeek Function

Epidemiological weeks are usually complete weeks. The ministries of health around the world define the day of the week as the first epidemiologic day. As a result, some countries may consider Sunday as the first day of the week while others may consider the first day of the week to be either Saturday or Monday.

By default, Epi InfoTM 7 marks Sunday as the beginning of the epidemiological week. However, the parameter for the EpiWeek function can be modified in order to change the beginning of the epidemiological week as desired.

If the year of occurrence is not relevant, use the EpiWeek method instead. The advantage of using EpiWeek is that the value is returned as a number and it can be stored in a numerical field. EpiWeek takes one required parameter that must be a date. The week is calculated relative to the year of the date provided. The Epidemiological week is calculated using the following code:

ASSIGN MyEpiWeek = EPIWEEK( <start_date>, {<first_day_of_week>} )

 

The example below shows the check code needed for automatically calculating the corresponding Epi Week into a field called SurveillanceWeek based on the value entered in a date field called OnsetDate.

Check Code Sample showing the EPIWEEK function

Figure 3.63: Check code syntax for EPIWEEK function

On the other hand, if you are required to modify the first day of the week parameter because the week does not start on a Sunday, the check code syntax would need to be updated. In the example below, the epidemiological week will be calculated based on a starting day of Monday (i.e. Sunday will be 1, Monday will be 2, Tuesday will be 3, etc.)

Check Code Sample showing the EPIWEEK function with Beginning Week parameter

Figure 3.63: Check code syntax for EPIWEEK function with beginning week parameter

Page last reviewed: September 16, 2022, 12:00 pm