250 likes | 533 Views
Epi Info™ 7 Introductory Training. José Aponte. Public Health Advisor Module 3: Adding Intelligence to Forms 12 June 2012. Office of Surveillance, Epidemiology, and Laboratory Services. Epidemiology and Analysis Program Office. Module 3 Outline. Module Learning Objectives
E N D
Epi Info™ 7 Introductory Training José Aponte Public Health Advisor Module 3: Adding Intelligence to Forms 12 June 2012 Office of Surveillance, Epidemiology, and Laboratory Services Epidemiology and Analysis Program Office
Module 3 Outline • Module Learning Objectives • PowerPoint presentations for adding intelligence • Instructor-led demonstration • End of lesson questions
Learning Objectives • After completing this module the participant will be able to: • Familiarize with the Check Code workspace • Understand the basics of Check Code • Identify different Check Code commands • Create basic Check Code logic
What do we mean by adding intelligence? • Add certain logic to the form using Check Code • The term comes from the need to “check” user input to ensure it is valid • Used to implement data entry “rules” – invalid input can be rejected • You don’t need to be a programmer!
What can Check Code do? • Check Code can be used to… • Automatically calculate values, such as figuring out a patient’s age • Implement skip patterns • Prompt the user • Automatically populate fields • Hide fields from data entry workers
Check Code is Easy Check Code is created using the Check Code Editor The editor lets you implement the desired logic without requiring any programming skills. Anyone can do it!
Use Case • A clerk enters 05/12/2020 instead of 05/12/2012 • During analysis, calculations are done using this date • The resulting statistics are thrown off because of incorrect input
Creating a Check Code • Where do you want it happen? • What do you want it to do?
Identify the relevant field • Open Check Code Editor • Determine when you want the “action” to take place • E.g. after a certain field is entered • Locate and select the appropriate field in the Check Code Editor
Select the timing • Expand the field and select whether you want the “action” to occur before or after the field
Before and After sections • Anything in the “BEFORE” section is run as soon as the cursor enters that field • Anything in the “AFTER” section is run as soon as the cursor leaves that field
Enable the Check Code Editor • Notice the Add Block box • Click it • If the block already exist: • position the curser under the last item entered in that block.
Position the cursor • The curser will move under: • “//add code here” • You may need to manually reposition the curser
What do you want it to do? • Many options
Common Check Code Commands • IF-THEN-ELSE: Allows different actions to occur for the same block depending on a condition. For example, if the patient is male, hide all questions on pregnancy. • GOTO: Forces the cursor to move to another field. GOTO is used to implement skip patterns. • HIDE / UNHIDE: Hides and un-hides fields.
Common Check Code Commands • ENABLE / DISABLE: Enable and disables fields. • ASSIGN: Used to assign a value to a field • DIALOG: Used to display pop-up messages to the user • CLEAR: Used to erase the value of a field
Combining Commands • Multiple commands can be issued in the same block • Most commands can be placed inside of an IF-THEN-ELSE command
Combining Commands • Example • IF the user enters an invalid date… • CLEAR the invalid date • Use a DIALOG to warn the user about their error • It would look like: IF DOB > 06/01/2012 THEN CLEAR DOB DIALOG "Invalid date detected“ END-IF
Functions and Operators • Functions and operators are used to assist you in creating useful check code • For example: You want to automatically calculate a patient’s age. You know the date of birth and the report date. • Use the YEARS() function to calculate the difference • Use the ASSIGN command to assign the value to a field
Example of the YEARS function • It would look like: ASSIGN Age = YEARS(DateOfBirth, ReportDate) • The values in the parenthesis are also known as the function’s parameters
More about Check Code • You can add comments by starting a line with the “//” characters • Comments are a way of documenting your work so others may understand what it is you were trying to do • Also, use comments to disable specific commands
EColi Project Instructor-led Demonstration
Student Practice Open the EColi.prj in the EColi_Fulton_County_NoCheckCode Project folder Adding Intelligence to Forms (Student Handout) Module 3 – Student Practice
This Slide Presentation • This slide presentation can be downloaded from the Epi Info™ Community of Users in phConnect: http://www.phconnect.org/group/epiinfo/forum/topics/epi-info-7-training-module-3
Questions? The findings and conclusions in this report are those of the authors and do not necessarily represent the official position of the Centers for Disease Control and Prevention. Office of Surveillance, Epidemiology, and Laboratory Services Epidemiology and Analysis Program Office