The Epi Info™ 7 User Guide introduces the Check Code tool, which allows users to customize the data entry process. It can be used to check for errors during data entry, to do automatic calculations in fields, and to skip over parts of the questionnaire if certain conditions are met.
This chapter of the Epi Info 7 User Guide covers Check Code, the tool that lets users customize the data entry process in the Enter tool. Check Code can check for errors during data entry, perform automatic calculations in fields, and skip over parts of a questionnaire when certain conditions are met. Examples of operations include displaying messages, calculating fields from mathematical operations, checking fields for relationships or inconsistencies, displaying error messages for improper entries, and automatic indexing of fields for faster searching.
The chapter explains how to access the Check Code Program Editor from the Form Designer toolbar or the Tools menu, describes the four sections of the Check Code Editor window, and covers the structure of check code blocks built around field, page, or form names with BEFORE and AFTER events. Step-by-step tutorials show how to create a check code block, build a skip pattern with the GOTO command, create a conditional skip pattern using IF/THEN and GOTO, and use functions such as YEARS with a date field to calculate a respondent's age from the date of birth.
Click the Check Code button in the Form Designer tool bar after opening your Epi Info 7 project, or select Tools > Check Code Editor from the Form Designer navigation menu.
It can check for errors during data entry, do automatic calculations in fields, and skip over parts of the questionnaire if certain conditions are met.
Commands are structured in blocks that begin with a field, page or form name and end with the word END, and all commands must be within a field-name block.
Use the ASSIGN command with the YEARS function, which calculates the difference between two date fields and provides the result in years, for example ASSIGN AGE=YEARS(DOB,SYSTEMDATE).