Henry Ford Health System Home Page

Entering and Editing Data in a Database

Innovations in Health Education Home Page

IIHE  |  Education  |  Getting Started With Epi Info  |  Entering and Editing Data in a Database

The ENTER program creates a database file from a questionnaire. To use ENTER, first create a questionnaire as described in the previous lesson. The ENTER program creates an Epi Info database (.REC) file using the questionnaire to provide information on the file structure. Once created, the file may be loaded into ENTER for adding more records or editing those already entered. If the questionnaire is revised, ENTER can be instructed to revise the .REC file accordingly.

Running ENTER

From the main EPI menu, highlight the ENTER Data component and press Enter:

DataOpen1.jpg (71089 bytes)

This is the starting screen of ENTER. You mainly use the first two options. You use the second option, Create new data file from .QES file, to create a new database. The first option, Enter and Edit data, is used to add and edit records to an existing database.
 

Creating a New Database

To create a new database, you need to have previously create a questionnaire file. We will use the questionnaire that we created in the previous lesson.

First, you need to enter the name of the database that you are going to create. This is a little backwards since you would think it would ask for the questionnaire that you want to use first. The questionnaire that we created in the last lesson was Test1.QES. So let's use the same name here but with the extension .REC. So type Test1 and press Enter:

DataOpen.jpg (80953 bytes)

Note that you didn't need to type the extension .REC because that is the only type of file that it would except. Now it wants to know which option we want to use. Since we are creating a new database, type 2 and press Enter:

DataOpen3.jpg (77817 bytes)

Here it is asking for the name of the questionnaire. You can either type the name of the file or you can press F9 to display a list of the files in the current directory (folder in Windows' talk). Press the F9 key to see a list of the files:

DataOpen4.jpg (92152 bytes)

Use the arrow keys to highlight the file test1.qes and press Enter. Press Enter again to confirm that test1.qes is indeed the file you want. Finally press Enter one more time to accept the directory path.

Now, Epi Info creates the database and takes you to the editing screens.

Opening an Existing Database

If you have already created a database, opening the database is easy. At the first screen of the ENTER component, you can either type the name of the database or use the F9 key to get a list of the files in the current directory. If you are following this tutorial, you should type Test1 and press Enter.

DataOpen3.jpg (77817 bytes)

You want the first option, Enter or Edit data, so all you need to do is press Enter, and then press Enter one more time for the default path question.

Adding and Editing Records

Now that you have a database opened, you can add some records to the database:

DataEntry1.jpg (35847 bytes)

On the left side are the names of the fields and to the right (the light gray area) is where the data is entered and displayed.At second from bottom line of the window, the program displays what type of data will be accepted. The bottom line shows some of the special commands that can be given and also shows which record is being displayed. Since there is no data in the database now, we are working on the first record. If you already have records in the database, it will start you off adding a new record at the end.

Let's add some records to the database. Type 12345678 for MRN. Notice that after you type the eight, the cursor moves to the DOB field. If you type enough characters to fill a field, the cursor automatically moves to the next field.

If you make a mistake, you use the arrow keys to move through the record.

When you enter a date for the DOB (date of birth), you must enter any leading zeros. So for January, you enter 01. Also when entering a date, you don't enter the slashes, the programs does it automatically. Type 01311983 in the dob field. This is January 31, 1983.

For the weight type 98 and press Enter. You have to press Enter because you didn't completely fill the field. Alternatively, you you could enter 098.

For the sex, type f. Notice that if you type a lower-case f, the program automatically converts it to upper case.

Your screen should look like:

DataEntry1.jpg (40531 bytes)

Notice the new message at the bottom of the screen asking about writing the data to disk. It's really asking if you want to save the data. Y saves the data, while N or Escape lets you continue editing the record. Press Y to save the record that you typed.

Lets enter 3 more records. Here is the second record:

DataEntry2.jpg (40428 bytes)

Here is the third record:

DataEntry4.jpg (39988 bytes)

Here is the fourth record:

DataEntry5.jpg (39957 bytes)

Here are a lot of special editing that can be very useful:

Command Description
Backspace Deletes the character to the left of the cursor.
Right Arrow
Left Arrow
Moves the cursor one character to the right or left.
Up Arrow
Down Arrow
Moves to the previous or next entry field.
Page Up
Page Down
Moves the screen up or down a page (if the questionnaire is larger than a screen).
Home Moves to the first entry field in the questionnaire.
End Moves to the last entry field in the questionnaire.
Insert Turns the insert mode on or off.  When insert mode is off, new characters overwrite (replace) old characters. When it is on, new characters are inserted between the old characters.
Delete Deletes the character at the cursor location.
Control F Allows you to search the data file and find records that match your criteria.
Control N Creates a new blank record. This is mainly used after you have browsed or did a find.
F2 Finds a particular record number. Enter the number, and the record with that number is displayed.
F3 Searches for the first occurrence of the criteria that you entered with the Control F.
F4 Finds the next occurrence of the criteria that you entered with the Control F.
Shift F4 Finds the previous occurrence of the criteria that you entered with the Control F.
F5  
F6 Toggles the delete flag for the current record. This is a little confusing when you look at the screen. Pressing <F6> doesn't appear to do anything. If you browse to the next record and then return to the one you just were at, there will be an asterisk after the record number at the bottom of the screen (or if was there before, it will disappear). You need to be careful with this since pressing the key twice reverses the action.
F7 Moves to the previous record.
F8 Moves to the next record.
F10 Closes the file and returns Epi Info's main screen.

When you enter data,

After the information has been entered in the last field of a questionnaire, the question "Write data to disk (Y/N)?" appears at the bottom of the screen. Replying "Y" or "y" saves the record and brings up the next available empty record. Note that the record number on the lower right changes. If the reply is "N", the cursor jumps to the first field in the questionnaire and you have another opportunity to edit the record.

Finding Records That Match Criteria

You can search the database and find records that match your criteria. To find a record, first be sure the current record has been saved. Press Control F for "Find," and type in the items you want to find in the blank questionnaire. Now press F3 for "Find 1st". You might type SMITH in a "Lastname" field, for example, and then press the <F3> key. All the records with LASTNAME = SMITH will be listed on the screen.

Use the up and down arrow keys to move to the record desired and select it by pressing Enter. The record appears on the screen in questionnaire format.

ENTER will search in this way using any combination of fields that you enter after pressing <Ctrl-F> for the FIND command--a multi-field search on any combination of fields. You could have entered "Smith", "John", and "47" for the age. The search would then be confined to records containing 47-year-old John Smiths.

Sometimes it is useful to do a "fuzzy" search, looking for all names beginning with "Peter", for example, if you are not sure how "Petersen" or "Peterson" was spelled. You can use the "wildcard" character to specify the search, entering "Peter*" in this case. Wildcards are only used in non-numeric fields.

Deleting or Undeleting Records

Pressing the F6 key will mark the current record as deleted. An asterisk ,*, appears next to the record number in the lower right corner of the screen. The data items in the record are still visible in the ENTER program, but tabulations done in the ANALYSIS program will skip this record. The WRITE RECFILE command in ANALYSIS creates a copy of the database without the deleted records and thus provides a permanent way to rid the file of such records, if desired.

A record, once deleted, may be made active again (undeleted) by pressing the F6 key again.

 

Creating a Questionnaire  |  Getting Started With Epi Info  |  Using StatCalc


Copyright 1999-2004 by Henry Ford Health System
Last modified: 07/28/04