Contents

Choose one of the following Help Topics:

Introduction to DataCol

 Builder:

Introduction to Builder

Import Items List and Layout

Editing the Question List

Expression Building

Designing the Questionnaire

 Import and Export:

Importing Study Data

DataCol Export

 Collector:

Introduction to Collector

Browsing the Project Database

Editing Records--The Demographic Screen

Generating Reports

For Help on Help, Press F1.


Introduction to DataCol

DataCol is a tool for creating and managing data collection projects. Although specifically designed for the needs of medical and health care organizations, it is useful for any application involving the collection and management of data from surveys, case records, and electronic databases. Once the project designer has identified the population to be studied, the specific information needed for the survey, and the sources of data to be used, DataCol provides tools to:

•	Import demographic and clinical data from a variety of external sources, including database files, external lookup files, and other DataCol projects

•	Create an on-screen questionnaire to guide personnel in abstracting specific study-related information from case records or other sources and entering it directly into the project database

•	Generate reports to help manage projects

DataCol maintains a separate project file for each survey or data collection project, so that data for multiple projects can be extracted efficiently from a single set of source files.

Related Topics:

DataCol Basics

Using Windows

Typographical conventions


DataCol Basics

DataCol consists of three main units or modules: Builder, Import, and Collector.

Builder is the development tool. It consists of two basic components:

•	The Import Items component lets you define what information will be imported from the external sources, how it will be structured within the DataCol project file, and how it will be presented on screen.

•	With the Question Builder, you create the on-line survey instrument which personnel trained in reviewing and abstracting data will use in collecting data from case records or documents.

Import handles the transfer of data from the source database to the DataCol project.

Collector is the data collection and analysis tool. Use it to:

•	Present the abstractor with a list of the cases under study and provide demographic and administrative data on each case.

•	Display the on-screen questionnaire created in Builder. Collector leads the user through the abstraction process by dynamically altering the pattern of questions to be answered and automatically validating the answers as they are entered.

•	Analyze the data collection results and generate reports.

Export lets you select any combination of data from a DataCol project file and output it to a text file which can be used by other programs.

Figure 1 illustrates the flow of data through a survey project, and how the main DataCol modules work together.

Figure 1--DataCol project organization


Using Windows

DataCol is written in Microsoft® Visual Basic™ and runs under the Microsoft Windows™ version 3.1 operating environment. It makes extensive use of a number of standard objects and techniques, for example:

•	Buttons and icons

•	Clicking, double-clicking, and drag-and-drop

•	Resizing windows

•	Scroll bars

•	Menus

•	List boxes and dialog boxes

•	Selection and radio buttons

This Help file assumes that users are familiar with Windows interface conventions for using these features. For more details, consult your Windows manual, Windows on-line help, and Windows tutorial.


Typographical conventions

This guide employs the following notational conventions:

•	Names of windows, dialogs, boxes, & other screens appear in italic type: Import Items List.

•	Names of buttons & icons are in boldface type: New Item.

•	Names of keys on the keyboard are in brackets: <Enter>, <Control>.

•	DOS and Windows file names are in small capitals: DCLIB.MDB.

•	Instructions for executing commands from DataCol's pull-down menus are phrased as: "Choose Edit : Insert from the menu."


Introduction to Builder

Starting a project

A DataCol project normally begins in response to a request--either from within an organization or from a governmental or other outside agency--for data on quality of medical care, treatment outcomes, compliance with regulatory guidelines, or the like. The information the requesting agency asks for serves as the basis for the survey instrument that you design with Builder; its first version is often a handwritten or typed draft of a survey questionnaire.

Typically, a nurse, survey worker, or other specialist will follow this questionnaire in abstracting the desired data from patient records, survey forms, or interview transcripts. The actual data entry may be performed by the abstractor or by a data entry operator.

Source files

You will also need an import or source file: an existing database containing known demographic and clinical data on the population to be studied. This might be, for example, a collection of records of hospital patients or HMO enrollees. The import file will be an electronic database file in any of a number of common formats, including Access, Btrieve, dBASE, FoxPro, Paradox, or ODBC-compliant SQL.

External data sources

In addition, it may be useful to have on-line reference sources such as the International Classification of Diseases Ninth Revision Clinical Modification (ICD-9-CM, or ICD-9) database of medical diagnosis and procedure codes, or a database of Universal Physician Identification Numbers (UPINs). DataCol can read from these external data sources to provide additional input data for its study database.

Starting Builder

Once the requester information and any needed source files are in place, you are ready to start Builder and create a DataCol project file.

Related topics:

Overview of Builder functions

Builder Print functions

Setting project passwords

Closing a project file

Selecting External Database types


Starting Builder

In Windows' Program Manager, double-click on the Builder icon in the DataCol program group.

The DataCol Builder window appears, containing a menu bar and two buttons: Open Project and Close.

Related topics:

Overview of Builder Functions

Builder Print Functions

Setting Project Passwords


Opening a Project File

Click on the Open Project icon (or choose File : Projects from the menu) to see a list of available project files.

•	To open an existing file: Select the drive, directory, and file name and click Open, or double-click on the selected file name. Note: You cannot open a project file in Builder if any other user currently has it open, in either Builder or Collector.

•	To create a new project file: Select a drive and directory, then  type the new file name in the Filename box. (If you omit the extension .CMR, Builder will add it.) Click New to open the Project Header window.


Overview of Builder Functions

Opening a new or existing DataCol project file will display the Project Header window. This screen is a control panel for managing individual DataCol project files. The project title and account number you specify here will appear on all reports and other printed output from both Builder and Collector. You may also enter a full text description for a project, which appears nowhere else except this Project Header screen.

The Project Header Window

Click on an area of the illustration below for a description of its function.

If no project is open, the Builder menu contains a Configuration item, for selecting system drivers for access to external databases.

Related topics:

Opening a Project File

Builder Print Functions

Setting Project Passwords

Closing a Project File


Project Header File Menu

Functions for opening and closing project files, setting passwords, and expression library maintenance


Project Header Print Menu

Builder print functions


Project Header Window Menu

Menu items for switching to other Builder screens (equivalent to the control buttons below)


Project Header Help Menu

This help file


Project Title

The project title you specify here will appear on all reports and other printed output from both Builder and Collector.


Account Number

The account number you specify here will appear on all reports and other printed output from both Builder and Collector.


Project Description

Use this space to enter a full text description for a project, which appears nowhere else except this Project Header screen.


Project Header Item List

Import Item List: The screen where fields are selected for importing from the source file into the DataCol project.


Project Header Item Layout

Import Item Layout:  Lets you design an on-screen display of the imported data fields.


Project Header Question List

Question List:  Specifies the questions to be included in the data-collection questionnaire.


Project Header Question Layout

Question Layout:  Lets you design the on-screen appearance of the questionnaire.


Builder Print Functions

The Project Header window's Print menu allows you to print the following:

•	Abstract Form: a printed version of the on-screen questionnaire

•	Import List: a list of the fields to be imported from the source database

•	Question Summary: a summary list of the questions in the project file

•	Question Detail: full details of all questions in the project

•	Expression Detail: details of all expressions associated with the question list

Each of these lists is printed with a header containing the project title and account number (if any), and a footer showing the date and time.

The Print menu also includes an item for Windows' Print setup.


Abstract Form

The Abstract Form option allows you to create a printed version of the on-screen questionnaire, which might be useful for gathering survey information when the electronic version is inconvenient to use. You may print the entire questionnaire or any range of screen pages.


Import List

The printed Import Items List presents a list of all fields to be imported from the source database. It lists the Import Items by number, and gives the name, data type, and field width for each item.

For Import Items that are to be retrieved from an external reference source, the list includes full information on the field source: path and filename, database table name, search field or index key, lookup value, and return field name.


Question Summary

The printed Question Summary lists all questions in the project database by number, with their names, answer types, and field widths. For questions with an answer type of Number, the width field shows the values for field length and number of decimal places, separated by a slash, for example: 015/007.


Question Detail

The Question Detail list gives full details of all questions in the project, listed by number. The report includes the question short name, answer type, answer field width, full question text, and question help text. For questions with an answer type of List, the report gives the full list of possible answers.


Expression Detail

The Expression Detail report resembles the Question Detail list, except that instead of the full question text it presents full details of any expressions associated with each question. This information includes the full text of each expression, whether it is a Validation, Stop, or When expression, and a symbol indicating its verification status:

+ = expression is valid

¼ = expression is not valid

? = not checked

In order to match the Question Detail list report, the Expression Detail report lists all questions in the project, whether or not they have associated expressions.


Setting Project Passwords

You may restrict access to a DataCol project by assigning passwords.

To assign passwords to a DataCol project:

In the Project Header window, choose File : Set Passwords to display the Passwords dialog box.

Builder Access Password

Set Builder Access Password controls access to the current project file through Builder. If you set a password here, no user will be able to open this project without supplying it when prompted.

Builder Access passwords are not case sensitive; that is, "password," "PASSWORD," and "Password" are all interchangeable.

Direct Mode Password

Set Direct Mode Password controls access to the Question List through the Direct Access mode of Collector. If no password is set, all users will be able to access Direct mode. When a password is set, users will be prompted for it when attempting to access Direct mode. Direct mode passwords are not case sensitive.

When finished setting passwords, click OK to return to the Project Header screen.


Closing a Project File

To close the currently open DataCol project file, click the Close button at the upper right, or choose File : Close from the menu. Builder saves any changes you have made before closing the file.

To exit Builder, click the Close button again, or choose File : Exit from the menu.


Selecting External Database Types

In order to use the external data source reference feature, Builder needs to know what database formats to make available. To avoid the problem of users choosing an invalid source type when specifying an external lookup, only those format types which you specifically select will appear in the Source Type list in the External Data Source dialog box. (ODBC and Access formats are included by default.)

To configure external database drivers:

•	Close any open DataCol projects.

•	From the Builder menu, choose File : Configuration to display the Setup window.

For each database format you want to make available, click the corresponding check box. In the Select Driver dialog which appears, locate the correct driver for this format (see note below) and click OK to add it to Builders list of available types.

•	Click OK when finished.

Note: These drivers are library files which enable Visual Basic programs to access database tables in other formats. They are located in your WINDOWS\SYSTEM directory and have an extension of .DLL. Typical file names for the format types included in Builder are:

Btrieve	BTRV200.DLL

FoxPro 2.0, 2.5	XBS200.DLL

dBASE III, IV	XBS200.DLL

Paradox 3.x, 4.x	PDX200.DLL

Related topic:

Overview of Builder Functions


Import Items List

The first step in creating a DataCol project is to define and structure the data to be imported from the source database. This is done with the Builder module's Import Items function.

After entering a project title, account number, and description in the Project Header window, click the Import Items List button (or choose Window : Import Item List from the menu). This displays the Import Items window.

The Import Items window contains:

•	The menu bar, providing access to control and editing functions.

•	The icon bar, which holds tools for adding, deleting, and cutting and pasting Import Items

•	The Items list, where you may specify the name, data type, and field width of each field to be imported from the source database

•	The borrow structure button, for borrowing a database structure from the import file or another DataCol project. Note: This is the preferred method for creating the Import Items list.

•	The Delete All button, for clearing the Import Items list.

Related topics:

Fine-tuning the Structure

External Data Source References

Closing Import Items

Import Items Layout


Borrowing a Database Structure

In order to import data from the source file into the DataCol project, you must select which fields will be transferred from the source database, and provide DataCol with the name, data type, and width of each field. Although it is possible to do this by entering all the information manually, it is faster and more accurate to read the existing record structure from the import file. DataCol can borrow structures from database files in a variety of formats, including Access, Btrieve, dBASE, FoxPro, Paradox, and ODBC-compliant SQL, as well as from another DataCol project file.

 Hint: Even if the actual import file is not available, borrowing from an existing DataCol project with a similar structure can give you a head start on creating the new project.

To borrow the record structure from a source file:

•	Click on the Borrow Structure button in the Import Items window. The External Data Source Type dialog box appears.

•	Highlight the format type of the desired source file and click OK. This opens the Select source file dialog.

•	Locate and select the source database.

•	Click OK. The record structure from the import file is added to the DataCol project file.

To build up a database by using fields from multiple source files, simply repeat these steps to borrow their structures in turn. If Builder finds a field in a source file with the same name as an existing item in the DataCol project file, it will not replace the existing item or try to add it again.

To add fields from a source file at a specific position in the project file, highlight the line in the Import Items list where you want to insert the fields, then follow the steps above. Builder will add the new fields below the currently highlighted item.

 Hint: When building a database structure from one or more source files, it may be that the source files contain a number of fields you do not need for the current project. In this case, it will still usually be easier to borrow the entire record structure from the source file, and then delete the unwanted items, than to enter field descriptions manually.

Related topics:

Fine-tuning the Structure

External Data Source References

Closing Import Items


Fine-tuning the Structure

After you have borrowed the record structure from one or more files into the DataCol project file, you may customize it to the needs of your project by deleting, reordering, modifying, or adding new items.

Related topics:

Deleting items

Moving, cutting, and pasting Import Items

Adding or changing fields manually


Moving, cutting, and pasting Import Items

To move an item to another position on the list, move the cursor over the number column at the left, press and hold the right (secondary) mouse button, and drag the item to its new position.

You can also move one or more items from one place in the list to another using the cut and paste feature:

•	Highlight the item you want to move by clicking on it. To select multiple items, drag the cursor over them.

•	Click the Cut button.

•	Repeat the Cut procedure to add more items to the cut buffer. Cutting new items does not remove the previous ones from the buffer.

•	Click on the line where you want to reinsert the items.

•	Click the Paste button. Builder reinserts all the cut items in order after the highlighted line.

Related topics:

Deleting items

Adding or changing fields manually


Deleting Import Items

 To delete one or more items from the list:

•	Highlight the items by clicking on them with the mouse. Select a group of items by dragging the cursor over them.

•	Click the Delete button (or choose Edit : Delete from the menu).

•	Click Yes to confirm.

To delete all the items from the list and start over, click Delete All and Yes.

Related topics:

Moving, cutting, and pasting Import Items

Adding or changing fields manually


Adding or changing fields manually

In most cases, the bulk of the work of specifying import fields from the source database can and should be done automatically. When necessary, however, you may enter new fields or modify existing ones manually, for example when

•	The structure of the import file is known but the actual file is not yet available.

•	The field names in the import file are short or not descriptive. In this case it is a good idea to replace the existing field names with longer, more informative ones.

To add a new item, click the New Item button (or choose Edit : Insert from the menu). New items are inserted into the list below the currently highlighted entry. To edit an existing item, double-click on it with the mouse.

Double-clicking an item will open the Edit Item dialog box; selecting New Item will open the New Item dialog. (These two dialog boxes look alike, except that the Edit Item dialog contains information for the selected item, whereas the New Item dialog is empty.) For each field, you may specify the following:

Item name	Width
Format	Description
Related topics:

Deleting items

Moving, cutting, and pasting Import Items


Item name

The name of the field as it will appear in the DataCol project database. This name will be presented to users in all project screens in both Builder and Collector, so it should be as descriptive and meaningful as possible. It need not match the field name in the source database, and you may change it at any time. The field name may be up to 30 characters in length.


Format

The format for the data in this field. Use the list box to select one of Text, Number, Date, or True/False. This value must match what is in the import file.


Width

The maximum number of characters allowed in the field. Decreasing this value from that in the import file could cause problems when importing data.


Description

A descriptive explanation of the field's content, useful for recording notes about the field while setting up the project database structure. It does not appear on any other DataCol screens, so it should not be depended upon to identify the field's content for users; the Item Name should do that.


External Data Source References

It is often useful to refer to data in a reference source other than the primary import file. For example, if the main database includes a "Diagnosis" field containing only a code number from the commonly used International Classification of Diseases Ninth Revision Clinical Modification (ICD-9), you might want to add a project field called "Diagnosis Description" that will report the text description for that code. From Builder, you can create a pointer to the ICD-9 database's text description field. Although from Builder's point of view this pointer is treated as a regular project field, no data is actually transferred from the external source into the project. Only when the abstractor activates the Demographic screen in Collector does DataCol read the text description from ICD-9 and display it (in the location you specify in Import Items Layout).

To specify a pointer to an external reference file from the Import Items screen, first add a new item field in the appropriate location, including format, width, and description information as needed. Then click the External Data Source button to display the External Data Source dialog box.

In the External Data Source dialog box:

•	Click the down arrow to display the Source type list box, and select the reference file's database format from the list. (Note: Only formats which the program has been configured to recognize will appear on the list of available types. See Selecting External Database Types.)

•	Next, click the options button next to the Database line. Locate the path and name of the reference file in the Select Database dialog.

After you select the source format and locate the database, Builder presents the rest of the dialog choices in sequence. The list of possible answers appears in the box at the right. Click on the correct item in the list, and the program will continue to the next step. To back up to an earlier step, click on the options button next to that line.

•	Table: If the reference file contains multiple tables, specify the name of the table that contains the desired data.

•	Field: Select from the list the name of the field to search for in the reference database, for example ICD9CODE.

•	Value: Select the name of the corresponding field as it appears in the DataCol project, for example "DX1" for a diagnosis code.

•	Return field: The field in the external reference file that contains the data to be reported to DataCol, for example ICD9DESC.

After you have supplied all the required information, click OK to close the External Data Source window. A red check mark will appear in the New Items box to indicate that the current item is referenced to an external file.


Closing Import Items

When the list of Import Items is complete, you may close the window by clicking the Close button (or choosing File : Close from the menu), go on to Import Items Layout, or switch to the Import module to populate the database.


Import Items Layout

The Import Items Layout screen is where the project designer specifies what information on each case will be visible when the abstractor activates the Demographic screen in Collector.

To begin the layout, click on the Import Items Layout button (or choose Window : Import Item Layout from the Builder menu). This opens the Import Items Layout window. At the left side of this screen is a list of database fields to be imported from the source file, as they were defined in the Import Items List screen. To the right is a layout area where you will design how the database information will be presented on the Collector Demographic screen.

Related topics:

Placing, removing, and formatting Import Items

Changing the position of Import Items

Setting snap to grid


Placing, removing, and formatting Import Items

To place an item on the screen layout:

•	In the fields list, locate the field you want to add. (If the list is too long to fit into the available space, use the scroll bar to view the rest of the entries.)

•	 The item name may appear as a caption either above the data area or to the left of it, or it may be omitted. Click on the corresponding radio button at the lower left of the screen.

•	Click on the item to select it, and while holding the right (secondary) mouse button, drag the item onto the layout screen. The item changes color to indicate that it has been added to the on-screen layout.

•	Continue placing fields as needed.

To remove a field from the layout, click on it once to highlight it, then click the Remove button (or choose Edit : Delete from the menu).

You can extend the display to multiple pages by clicking on the Page No. selector above the item list. Placing items on subsequent pages will require the user to switch to them to view the data in the Demographic screen. Any individual item may be placed on only one page.

The item layout window does not allow you to make changes in field content. If you need to alter the name, data type, width, or description of a field, switch to the Import Items window by choosing Window : Import Item List from the menu. Locate the item you want to modify and edit it as described in Adding or changing fields manually. Return to the layout screen by choosing Window : Import Item Layout.

Related topics:

Changing the position of Import Items

Setting snap to grid


Changing the position of Import Items

Once the database fields have been placed on the screen display, you can move them to any position.

•	Click once on the field you want to move with either mouse button. The field changes color, and the Selected Item box indicates which item has been selected (this is useful in case you have placed the item on screen without a caption).

•	Hold down the right (secondary) mouse button, and drag the item to where you want it.

Note: You cannot move an item to another page of the layout by dragging and dropping. To move an item to another page, remove it and then re-place it on the new page.

Items may not overlap on the screen, nor extend past the edges of the layout form. Any items that overlap each other or the edge of the screen will be removed from the layout when you exit the window.

Related topics:

Placing, removing, and formatting Import Items

Setting snap to grid


Setting snap to grid

The layout screen includes a built-in invisible grid for aligning items. When the snap to grid feature is turned on, any item dropped on the screen will automatically align itself to the nearest grid point. To turn on snap to grid, choose Edit : Snap to Grid from the menu.

To adjust the spacing between grid points, choose Edit : Grid Setup. Enter the desired grid height and width (in multiples of 30) and click OK.


Importing the data

Once you have defined the record structure for the DataCol project, you are ready to use the Import module to populate it with data from the source database.


Editing the Question List

The Question List is where the project designer creates the survey questionnaire which the abstractor will use to gather the desired study data from case records or other sources.

To view the question list, click the Question List icon in the Project Header window (or choose Window : Question List from the Builder menu). The Question List window appears.

The Question List window has three parts: the menu and icon bars, the question list grid, and a details screen at the bottom.

•	The menu and icon bars provide access to program functions such as editing and deleting questions, search, cut, copy, and paste, verifying expressions, and switching to other Builder windows.

•	The question list grid shows the list of questions for the questionnaire and the settings for each question at a glance.

•	The details screen changes when you click on different columns in the grid, showing either the full text of the question or the details of expressions being built.

Related topics:

Adding, deleting, and moving questions

Borrowing questions from another project

Editing the Question fields

Question skipping, validation, and stop expressions

Question Help


The Question List window

Click on an area of the illustration below for an explanation of its function.


Question List menu

Provides access to program functions such as editing and deleting questions, search, cut, copy, and paste, verifying expressions, and switching to other Builder windows.


New Question

Inserts a new Question in the list.


Delete Question

Deletes a Question from the list.


Question List search

Locates a Question on the list. See Find and Find Again.


Question List Cut and Paste

Cut, copy, and paste Questions and text. See Moving, Cutting, and Pasting Questions.


Close Question List

Closes the Question List and returns to the Project Header window.


Question List Grid

Shows the list of questions for the current project and the settings for each question at a glance.


Question List Details screen

Changes when you click on different columns in the grid, showing either the full text of the question or the details of expressions being built.


Adding, Deleting, and Moving Questions

When you open a new project file and access the Question List for the first time, Builder automatically adds a blank question to Row 1, which you may begin editing immediately.

To add a new question to the list, click on the row where the new question is to be inserted, then click the New icon (or choose Edit : Insert from the menu). Builder will insert the new item below the line you highlighted.

To delete a question from the list, click anywhere in the row containing the question, then click the Delete Question button (or choose Edit : Delete from the menu), and click Yes to confirm.

To mark multiple questions for deletion:

•	Hold down the left (primary) mouse button and drag the cursor up or down the list. (To select non-adjacent rows, hold the <Control> key and click on the questions you want to mark.)

•	Click the Delete Question button.

•	Answer Yes to confirm.

Note: Since a project must always have at least one question, Builder does not allow you to delete Row 1 when that is the only question.

Related topics:

Borrowing questions from another project

Moving, cutting and pasting questions

Find and Find Again


Moving, cutting, and pasting Questions

The Question List Cut and Paste function operates in either question mode or text mode.

Question mode Cut and Paste is useful for moving questions around on the Question List. To move one or more questions using Cut and Paste:

•	Select a question on the grid by clicking on it.

•	 Click the Cut button (or choose Edit : Cut from the menu) to remove it from the list and place it in the buffer.

•	 To reinsert it in another position on the grid, click on the question after where you want it to go and click the Paste button (or choose Edit : Paste from the menu).

Text mode Cut and Paste works in the details screen at the bottom of the Question List window, allowing you to cut or copy and paste question text, expression text, or help text from one question to another. To use text mode Cut and Paste:

•	In the Full Question Text or Expression Builder screen, highlight the text you want to cut or copy by dragging the cursor over it.

•	 Click the Cut button (or choose Edit : Cut from the menu) to remove the text and place it in the cut buffer. (To copy the text to the buffer without removing it, choose Edit : Copy.)

•	In the Question List grid, click on the question to which you want to add the cut or copied text.

•	Click in the Full Question Text screen. If you are transferring expression or help text, click in the appropriate column and then click in the Expression Builder or Question Help screen.

•	 Click the Paste button (or choose Edit : Paste from the menu) to insert the text from the buffer.


Find and Find Again

To locate a question in the Question List, click on the Find button (or choose Edit : Find from the menu), then type the text you want to search for in the box. (Searching is not case sensitive.) Select either Forward or Backward to determine the direction of the search, and click OK to begin searching. Starting from the currently highlighted question, Builder scans the Short Names fields for the text you specified.

To find the next entry that matches the search text, click the Find Again icon (or choose Edit : Find Again from the menu).

 Hint: Use partial searches when you are not sure of the full text, or to save time. For example, if you are not sure whether the question you are looking for is named "Date admitted" or "ADM_DT," simply enter "adm" as your search text.


Borrowing Questions

To copy one or more existing questions from another DataCol project:

•	Position the cursor at the point where you want to insert the questions.

•	Choose Question : Borrow from the menu.

•	In the Borrow Source dialog box, locate the file you want to borrow from.

•	After you have selected the desired source file, the Borrow Questions dialog appears, containing a list of questions to choose from. Highlight the questions you want to copy using standard Windows selection conventions:

- To select a single item, click on it with the mouse.

- To select multiple items, drag the mouse over them.

- To select multiple non-adjacent items, hold the <Control> key while clicking on each one.

•	After you have highlighted the questions you want to borrow, click Copy. Builder copies the questions you selected into the new list.

•	When finished, click Done to return to the Question List window.

Note: Borrowed questions must have unique names. If a question with the same name already exists in the project, Builder will not copy it.

Related topics:

Potential page layout conflict

Cutting and pasting questions


Potential page layout conflict

When you borrow a question from another DataCol project, Builder normally copies not only the question text, but also all the information associated with it, such as answer type, field lengths, validation patterns, and format and layout information. If you attempt to borrow a question that is laid out on the same page as an existing question in the current project, Builder displays a warning of a potential page layout conflict and presents you with three options:

•	Cancel the borrow

-or-

•	Borrow without layout data (the question will have to be placed in the new layout manually)

-or-

•	Place borrowed questions at the end of the current project


Editing the Question Fields

For each question on the list, you can specify:

•	A Short Name to appear in the on-screen Question List

•	Full Text of the question as it will appear on the questionnaire, including font, size, and format information

•	The type of answer the question requires

•	The field length, or number of spaces allowed for each answer

•	The number of decimal places for number fields

•	When the question will be asked, in relation to other questions (the skip pattern)

•	A validation expression for the question, to ensure that the answer fits within required parameters

•	Whether a particular answer will stop further questioning

•	Custom help text


Question Short Name

A unique name to identify the question, for example, "Subject's age." This name will appear in various screens throughout the project, and should be descriptive enough to identify the question readily. You may change it at any time while designing the project.


Question full text

The full text of the question as it will appear on the questionnaire. Use the buttons and drop-down lists provided to set any desired options for font, size, and format--bold, italic, or underline.

 Hint: You may omit the full text of a question if you want it to appear on the questionnaire as an answer field only, without any text. For example, if Question 11 is "Enter the two most recent dates," Question 12 would be simply a duplicate answer block on the next line, with no question text of its own.


Answer Type

Click on the Answer Type box to highlight it. Now, clicking the downward-pointing arrow at the right opens a list of possible answer types. Click on the desired type to select it.

After you have selected an answer type, a small button with three dots on it appears to the right of the drop-down arrow, indicating that further options are available. Click this button to open the options dialog box for this question. All answer types except Memo may be set to require an answer, so that the user cannot leave the item blank. Notes on other options and answer types follow:

•	Date, Time, Date/Time: Creates an answer field requiring a response in one of these formats.

•	List: Enter a list of values that will be available for answering the question, one per line.

•	Memo: Free-form text field, unlimited length; no options are available. It cannot be set to "Answer is Required."

•	None: No answer field. Use to create an on-screen comment or instruction.

•	Number: Maximum field length is 15, maximum number of decimal places is 7.

•	Text: Text field, up to 250 characters.

•	Yes/No, Yes/No/NA: Creates a set of radio buttons requiring one of these options.


Input mask

For the Text and Number answer types, you may specify a mask to control what characters can be entered into the answer block and simplify the typing required. For example, in a question that requests a telephone number, you might use the following mask: (###) ###-####. When the abstractor activates this question in Collector's data-entry screen, the # signs will appear as underscored blank spaces where he or she may enter any digit from 0 to 9, but no other character. The parentheses, space, and hyphen will be displayed automatically, and the program will skip over them as the user types the number.

Click here for a table of symbols that may be used in input mask strings.


Valid input mask characters

Symbol	Value
#	Any digit from 0 to 9
?	Any letter: az or AZ
A	Any alphanumeric character: 09, az, or AZ
&	Any ANSI character: 32126 or 128255
.	Decimal point
,	Thousands separator
:	Time separator
/	Date separator
\	Treat next symbol as literal (use to include #, ?, A, or & in the mask)
any other character	Itself


Field length

Field lengths for the Number, Text, and List answer types depend on the content of the answer field.

For the Number type, you may set the field length in either of two ways:

•	click the option button and enter a value in the dialog box

-or-

•	click on the Len column and type in the desired value directly on the grid.

The maximum value allowed is 15.

For the Text answer type, set the field length by either:

•	clicking the option button and entering a value in the dialog box

-or-

•	clicking on the Len column and typing a value directly on the grid (up to 250 characters).

For entries with the List answer type, Builder automatically calculates the field length from the longest item on the list, up to 250 characters. It cannot be changed directly.


Decimal value

Questions with an answer type of Number allow you to specify a number of decimal places for the field. Click on the option button and enter the value in the Number options dialog box, or click on the Dec field and enter the value directly. The maximum allowable value is 7. However, the decimal places value must always be at least 2 less than the total numeric field length, because there must be at least one digit to the left of the decimal point, and the decimal point itself takes up one position. For example, if the numeric field length is 5, the maximum allowable decimal value is 3.


Question Skipping, Validation, and Stop Expressions

As questions are being answered during data entry, DataCol can evaluate the responses and control the process dynamically. It can determine which questions to ask or skip, whether responses are valid, and when to stop and exit the questionnaire. DataCol makes these decisions based on logical rules, or expressions, which you create while designing the questionnaire. These rules can be simple or quite complex, and can make use of any of the imported project data and any of the answers to the questions.

For each question you can create any (or all) of three different expressions:

•	A When expression to control the "skip pattern"

•	A Validation expression to evaluate the answer

•	A Stop expression to terminate the questionnaire

Expressions, therefore, are a powerful means of controlling the flow of questions and answers throughout the abstraction process, and they are meant to be used freely in the design of the questionnaire.

Although they perform different functions, you build basic When, Validation, and Stop expressions in the same way. For complete details on the options available for creating expressions, see Advanced expression building.

Related topic:

Question help


When expressions

Often, a questionnaire item will depend on the answer to a previous question. For example, if the answer to the question "Was the patient admitted to a hospital?" is "No," there is no reason to go on to ask "How long was the patient's hospital stay?" and that question should be skipped.

To determine when a question will be asked, click in the W column for that item in the Question List grid. The lower part of the Question List window changes to the When Expression screen.

The steps to establish a skip pattern for our example are as follows:

•	In the Question List, click in the W column next to the item for which you want to create the expression. The lower part of the Question List window changes to the When Expression box.

•	Click on the Question List button. A secondary Question List window appears.

•	Double-click on the question that will control whether the current item is asked. For this example, double-click "Admitted to hospital?" Builder adds this item to the When Expression area, enclosed in square brackets to show that it is part of an expression to be evaluated. (You may also drag an item from the Question List to the Expression Builder screen using the right [secondary] mouse button.)

•	Type an equals sign (=) after the expression, followed by the word "yes." This tells Builder to present the "Length of stay" question only if the response to "Admitted to hospital" is "Yes." Otherwise, this question's answer block will be grayed out on the finished questionnaire screen.

•	A question mark (?) now appears in the W column, indicating that the expression has not been verified. Click the Verify button (or choose Question : Verify Expression from the menu) to confirm that the expression syntax is correct. If the expression is verified, the question mark will change to a check mark. If there is an error in the syntax, a message will appear on screen detailing the error.

Although this example is a simple one, expressions can be quite complex. For details on the full range of options for creating expressions, see Advanced expression building.

Related topics:

Validation expressions

Stop expressions

Question help


Validation expressions

Validation expressions are used to ensure that data entered in a given answer field falls within a range of specified values. For example, if a questionnaire item asks for the date a hospital patient underwent surgery, you might want to ensure that the response is not earlier than the "Hospital Admission" date recorded in the project database. Adding a validation expression to this item ensures that any attempt to enter an invalid response will generate an error message.

To create a Validation expression for our example:

•	In the Question List, click in the V column next to the item you want to validate. The lower part of the Question List window changes to the Validate Expression box.

•	Click on the Question List button. A secondary Question List window appears.

•	Double-click "Surgery Date." Builder adds this item to the Validate Expression area, enclosed in square brackets. (You may also drag an item from the Question List to the Expression Builder screen using the right [secondary] mouse button.)

•	Type a "greater than or equal to" sign (>=) after the expression.

•	Click on the Import List button to display the Import Items list, and double-click on the Item "Admit Date" (or drag it to the Builder screen with the right mouse button). The expression now reads: "[Surgery Date] >= [Admit Date]."

•	A question mark (?) now appears in the V column, indicating that the expression has not been verified. Click the Verify button (or choose Question : Verify Expression from the menu) to confirm that the expression syntax is correct. If the expression is verified, the question mark will change to a check mark. If there is an error in the syntax, a message will appear on screen detailing the error.

Although this example is a simple one, expressions can be quite complex. For details on the full range of options for creating expressions, see Advanced expression building.

Related topics:

When expressions

Stop expressions

Question help


Stop expressions

Often, it will be desirable to terminate the questionnaire if a particular response is received. In a study of health care for people over 65, for example, subjects younger than 65 must be excluded.

Creating a Stop expression is similar to creating When and Validation expressions. On the Question List grid, click in the S column next to the item that you want to be a Stop question. The lower part of the Question List window changes to the Stop Expression box. Then follow the steps:

•	Click on the Question List button. A secondary Question List window appears.

•	Double-click on the question (or right-drag it to the Builder screen) to create an expression. In the current example, we use "Age."

•	Type an operator and the value that will trigger the stop action. In this case, the complete expression will read: "[Age] < 65."

•	A question mark (?) now appears in the S column, indicating that the expression has not been verified. Click the Verify button (or choose Question : Verify Expression from the menu) to confirm that the expression syntax is correct. If the expression is verified, the question mark will change to a check mark. If there is an error in the syntax, a message will appear on screen detailing the error.

Excluding records

It frequently happens that a response which stops questionnaire processing should also exclude the current record from the survey. In this case, it can be helpful to add an additional item to the questionnaire, with an answer type of None, as an instruction. For example:

[Short name:] Age stop instruction

[Question full text:] If the subject is under 65, editing will stop. Exclude this case.

Advanced expression building

Although this example is a simple one, expressions can be quite complex. For details on the full range of options for creating expressions, see Advanced expression building.

Related topics:

When expressions

Validation expressions

Question help


Question Help

The last column (H) on Builder's Question List grid is for custom Help text. This is a text message you can define to appear when a user presses the <F1> key while answering the question in Collector. The help text will also pop up when a Collector validation error occurs for this question; thus it functions as a customized error message. If you do not enter any help text, the default validation error message will appear.

Related topics:

When expressions

Validation expressions

Stop expressions

Advanced expression building


Expression Building
Advanced Expression Building

Expressions are the means by which DataCol controls the flow of questions and answers in the survey questionnaire, guiding the abstractor through the process of data collection and data entry. The project designer specifies expressions as part of the process of designing the questionnaire in Builder, and most of the same expression-building features are available for creating query expressions in Collector's Report Query Builder. These functions make it possible to construct expressions ranging from simple to extremely complex.

To assign a When, Validation, or Stop expression to a questionnaire item, click on the W, V, or S column next to that item in Builder's Question List window. The lower part of the window changes to the Expression Builder area, where you can see the expression as it is being built.

An expression statement consists of three parts:

1.	A variable, for example an answer to a survey question or the data in an import field from the project database

2.	An operator, such as =, >, or <

3.	A value against which the variable is tested, using the specified operator

Builder provides a range of elements for creating powerful and flexible expressions. Values can be numeric or text strings, algebraic equations, other variables, or come from a set of predefined built-in functions. Builder lets you create expressions quickly by importing variables directly from either the current questionnaire or the project's Import Items list. You can also create a library of reusable, user-defined expressions.

Related topics:

Connectors and Complex Expressions

Verifying Expression Syntax


Expression Variables

The variable is the part of an expression that is evaluated, or tested to see whether it matches a specified value or range of values. Variables may come from the Question List, the Import Items list, or DataCol's built-in expression functions.

Related topics:

Copying an Expression from Another Question

Question Self-Reference and the Notation [Q]


Variables from the Question List

The simplest kind of variable to be evaluated in an expression is an item from the questionnaire, for example "Reason for admission." To insert a questionnaire item as an expression variable:

•	In the Expression Builder screen, click on the Question List button. The Question List window appears, containing a list of the items that appear on the questionnaire.

•	Double-click on the question whose answer you want to evaluate, or drag it to the expression-building area using the right (secondary) mouse button. Builder will insert the item's short form text into the expression-building area, enclosing it in square brackets.

Related topics:

Copying an Expression from Another Question

Variables from the Import Items list

Closing the pop-up windows


Copying an expression from another question

The Question List also allows you to copy and reuse an expression from another question in the same project. To copy an expression:

•	Click in the W, V, or S column for the question to which you want to copy the expression.

•	Open the Question List window, if it is not already open, by clicking the Question List button.

•	In the Question List, click once on the question whose expression you want to copy.

•	Click the Copy Expression button. Builder copies the expression into the Expression Builder area, where you may use it as is or modify it for the current question.


Question self-reference

Often, the variable you will want to place in an expression is the current questionnaire item, as opposed to some previous or later question. That is, the expression will say essentially "If the answer to this question is (equal to, less than, etc.) X, then. . . ." In most cases it is easy enough to add the current question to the expression simply by double-clicking on it from the Question List pop-up window. An alternative method, however, is to use the notation [Q] (or lower-case [q]). Builder interprets [Q] as "The answer to the current questionnaire item."

In fact, even when you do select the current question from the pop-up list, Builder automatically converts it to the [Q] notation. This provides flexibility when copying expressions from other questions or from the Expression Library. For example, expressions such as "[Q] = no" or "[Q] <= DATE(today)" could be useful for any number of items throughout a given questionnaire. The [Q] notation allows you to copy and reuse the same expression for all of them without rewriting it every time.


Variables from the Import Items list

You may build expressions using project Import Item fields which are not part of the questionnaire.

•	In the Expression Builder screen, click on the Import List button. The Import List window appears, containing a list of the import items in the project database.

•	Double-click on the item you want to use in the expression, or drag it to the expression-building area using the right (secondary) mouse button. Builder will insert it into the expression-building area, enclosing it in square brackets.

Note: In order to refer to an Import Item in an expression, you must have completed the Import Items list.

Related topics:

Variables from the Question list

Closing the pop-up windows


Expression Operators

The operator is the part of the expression that specifies the relationship between the variable and the expression value. Expression statement operators may be any of:

=	equals

>	is greater than

<	is less than

>=	is greater than or equal to

<=	is less than or equal to

<>	is less than or greater than (i.e., is not exactly equal to)

To add an operator to an expression you are building, simply type it in from the keyboard. Spaces on either side are optional.


Expression Values

The third part of an expression is the value, which can be a number, date, or text string--including another variable. When an answer is entered, Collector will test this value against the expression variable, using the specified operator. If the values match, the expression is evaluated as "True" and the specified action is taken; if not, the expression is "False" and the answer is rejected.

Builder recognizes four types of values: literals, variable references, algebraic equations, and the built-in functions SUBSTR and ADDYEAR.


Literals

Literals can be numeric or text strings, dates, times, or date/time combinations. Text strings must be enclosed within single or double quotes (except for the key words Yes and No). Date, Time, and Date/Time literals must be inside the corresponding special functions (see Built-in Functions). Examples of expressions with literal values:

[Age] > 64

[Eye color] <> "Blue"

[Abstract date] > DATE(01/01/1995)

[Processing time] > TIME(18:00)

[Receipt date/time] <= DATETIME(12-31-1995 23:59)


Variable references

Expression values may include references to other questions or import items, the same as for expression variables. Example:

[Followup date] >= [Survey date]


Equations

Expression values may include algebraic equations, using any of the following operators (listed in order of precedence):

( )	parentheses

^	exponent

*,  /,  \	multiply, divide, integer divide

+,  	add, subtract

>, >=, <, <=, =, <>	greater than, greater than or equal to, less than, less than or equal to, equal to, less than or greater than

Equations in turn may contain literals or variable references. For example:

[Lab value A] <= [Lab value B]/2 + [Reference value B]

They may also be built of subexpressions.


Built-in Functions

In addition to the Question List and Import Items list, Builder also provides a set of built-in functions that you may add to expressions. These functions provide shortcuts for a number of operations commonly performed on demographic data. Several of them differ from normal expression statements in that they work as independent statements of their own, returning a true/false value just as a full three-part statement does.

To use the built-in function list:

•	Click the down arrow to display the list box at the far right of the Expression Builder screen. (Note: the built-in functions are not available from the Collector Report Query Builder.)

•	Click once on the function you want to add to the expression. Builder adds the function to the Expression Builder area, with the first argument highlighted and ready for user input.

•	Type the desired value, or select an item from the Question List or Import List. If you select a value from one of these lists, the input highlight will automatically move to the next argument (if there is one).

•	When you have provided values for all function arguments, continue building the expression and verify the syntax as described below.

Like other expression statements, built-in functions may be combined with the AND, OR, NOT, and parentheses to create complex expressions.

The built-in functions and the values they support are as follows:

ADDYEAR, ADDMONTH, ADDDAY, SUBYEAR, SUBMONTH, SUBDAY: Perform calculations on dates. All share the same syntax:

ADDYEAR(...Q..., ...Number...)

where Q is a variable reference, and the second argument is a numeric string or an algebraic equation containing only numeric literals. For example, the expression

[Date completed] >= ADDMONTH([Date started], 2)

checks for a completion date two months or more later than the start date.

BETWEEN(...Q..., ...low..., ...high...): Tests whether the answer to question [Q], selected from the Question List, lies between the values set by [low] and [high]. [Low] and [high] values may be literals, variable references, or equations.

Examples:

BETWEEN([Subject's age],40,65)

BETWEEN([Test date 2], [Test date 1], [Test date 3])

DATE(...MM/DD/YYYY...): Inserts a literal date string in an expression. To have Collector evaluate the expression using the current date (i.e., the computer's system date at the time the expression is evaluated), enter the word "today."

Examples:

[Admit date]>= DATE(01/01/1993)

[Q] < DATE(today)

DATETIME(...MM/DD/YYYY HH:MM...): Inserts a literal date and time string in an expression. Formats are as for the DATE function; the "today" option is not available.

EMPTY(...Q...): Tests whether question [Q] has been answered.

Examples (as validation expressions):

"NOT EMPTY([Q])" = "This question cannot be left unanswered"

"EMPTY([Q]) OR [Q] > 20" = "If answered, the answer must be greater than 20."

LOOKUP(...): Checks to see that an answer matches a valid entry in an external reference database. For example, if a questionnaire item asks for a diagnosis code number from the International Classification of Diseases Ninth Revision Clinical Modification (ICD-9), this function will check the local ICD-9 database to ensure that the number the abstractor enters is a valid code.

Selecting this entry from the function list opens the External Data Lookup dialog box.

Select the source type and file name of the reference file, the table name (if the file contains multiple tables), and the field to check for the referenced value. When the abstractor enters an answer for question [Q], the program will check to see that the answer matches a valid entry in the lookup field. If it does not, Collector will display either:

•	A list of valid entries for the user to choose from (if you select the button labeled "Pop-up on error")

-or-

•	A Validation Error message only (if you select "No pop-up")

SUBYEAR, SUBMONTH, SUBDAY: see ADDYEAR.

SUBSTR(...Q..., ...start..., ...length...): Extracts a part of a string from a given field. The syntax is

SUBSTR(...Q..., ...start position..., ...number of characters...)

where [Q] must be a variable reference and the second and third arguments may be numeric strings or algebraic equations (which may themselves contain other variable references). For example:

[First initial] = SUBSTR([First name], 1, 1)

TIME(...HH:MM...): Inserts a literal time string into an expression. Times must be in 24-hour format.

Related topic:

Connectors and complex expressions


Connectors and Complex Expressions

A statement consisting of a variable, an operator, and a value forms a complete expression in itself. In many cases, however, you may want to construct an expression that contains more than one statement. This is done with the connectors AND and OR. For example, to create a question that will be answered only for men under 50, you could use a When expression:

[Sex] = "Male" AND [Age] < 50

An expression with the AND connector will yield a value of "True" only if both statements in the expression are true. AND may be used in conjunction with ">" and "<" to test for ranges of values. For example, the following stop expression would limit a study to subjects in their twenties:

[Age] >= 20 AND [Age] < 30

Expressions connected with OR yield "True" if either of the conditions is true.

NOT is placed in front of a statement to reverse its value. (The negated statement must be in parentheses.) Thus,

[Age] > 64

is equivalent to

NOT([Age] <= 64)

To insert one of these connectors into an expression, click the AND, OR, or NOT button on the Expression screen (or type the word in from the keyboard).

It is possible to create even more complex patterns by grouping expressions together with parentheses. For example, the following expression would return "True" for women between 40 and 60 and also for all single men:

([Sex] = "F" AND ([Age] >= 40 AND [Age] < 60)) OR ([Sex] = "M" AND NOT([Marital status] = "Married"))


Closing the pop-up windows

The pop-up windows that open when you click the Question List, Import List, or Expression Library buttons may be left on the screen and moved or resized as necessary until you have finished building your expressions. When you no longer need them, close each pop-up window by clicking on its button again or double-clicking the control bar at its upper left corner.


Verifying Expression Syntax

After you have finished building an expression, you can check to see that its syntax is valid. To verify the current expression, click on the Verify button (or choose Question : Verify Expression from the menu). Builder will mark the expression with a check mark if its syntax is correct, and generate a message if it finds an error.

To verify all expressions at once, choose Question : Verify All Expressions from the menu. Builder places check marks in the columns for all correct expressions, and marks with an X those which contain errors. To identify the errors in an individual expression, click on it and verify with the Verify button.

Note: Although it can check expression syntax, Builder cannot ensure that the values you enter will be meaningful. For instance, an expression like "[Q] <> [Q]" is syntactically valid, but makes no sense. It is up to the questionnaire designer to be sure that expression values are meaningful.

Related topics:

Changing Question or Import Item names


Changing Question or Import Item names

Occasionally you may want to change the names of some of your Questions or Import Items at a late stage in the project design, after you have built a number of expressions referring to these items. You may make such changes freely without having to rebuild the expressions. Builder handles these references by converting them into its own internal format, so that they will still be valid even if the names change.

If you delete a Question or Import Item that is used in expressions, Builder will automatically change those expressions' status to "unvalidated," and you will have to delete or rebuild them.


The Expression Library

If you build an expression that you want to save and use again, you can add it to the Expression Library. The Expression Library is common to all DataCol projects, so an expression created in one project can be reused in any other project simply by selecting it from a list.

The easiest way to save an expression to the library is from the Expression Builder screen:

•	Build and verify the expression normally.

•	Click Expressions to open the Expression Library window.

•	Click Add to Library. The Expression Name window pops up to prompt for a name for the expression. Type in the name you want to use and press OK. If the name you choose is already in use, you will be asked whether you want to replace the existing library entry with the current one.

An alternate method of adding an expression to the library is to enter it directly from the Expression Library Maintenance screen.

To retrieve a saved expression from the library for use in a project, click the Expressions button in the Expression Builder screen. The Expression Library window appears, containing a list of saved expressions. Double-click on the expression you want to retrieve, or drag it to the expression-building area using the right (secondary) mouse button.


Expression library maintenance

The Expression Library Maintenance function is accessible from the File menu in Builder's Project Header window. To edit an existing expression or add a new one, or to remove an expression from the library:

•	Switch to the Project Header screen by choosing Window : Project Header from the Builder menu.

•	Choose File : Expression Library Maintenance from the menu. The Expression Library window appears.

•	To create a new expression, click New and enter a descriptive name and the expression text.

Note: This method of adding an expression does not provide the Question List or Import List selection buttons or the Verify feature, so it is less reliable than entering from the Expression Builder screen.

•	To edit an existing expression, highlight the expression you want to modify and click Edit. When finished, click OK.

Note: Expressions marked with the sign @ were created using the Report Query Builder in Collector.

•	To remove an existing expression from the library, highlight the expression you want to remove and click Delete. Click OK to confirm.

•	Choose Window : Question List from the menu to return to the Question List window.


LOOKUP Dialog

The LOOKUP function checks to see that an answer matches a valid entry in an external reference database.

To fill in the External Data Lookup dialog box:

•	Select the source type of the reference file

•	In the Select Database dialog box, locate the reference database file. You may change this at any time by typing a new path and file name on the Database line, or clicking the button to display the dialog again.

•	If the database contains multiple tables, select the table that contains the reference value you want.

•	From the Fields list, select the field to check for the referenced value.

When the abstractor enters an answer for question [Q], the program will check to see that the answer matches a valid entry in the lookup field. If it does not, Collector will display either:

•	A list of valid entries for the user to choose from (if you select the button labeled "Pop-up on error")

-or-

•	A Validation Error message only (if you select "No pop-up")


Designing the Questionnaire

The questionnaire is where the list of questions defined in the Question List meets the real world of actual data collection. Working from individual case folders or other data sources, the abstractor or data entry operator enters the desired information directly into the project database through the on-screen questionnaire. Because this is the primary screen that guides the user through the abstraction process, Question Layout provides the project manager with tools to create logical, efficient, and visually appealing screen designs.


Question Layout

To begin the questionnaire layout, click on the Question Layout button (or choose Window : Question Layout from Builder's main menu). This opens the Question Layout window.

Along with the Question Layout window, a secondary Question List window also appears, containing the short-form names of all the questions defined for the current project. You create the questionnaire by dragging questions from this list onto the layout screen. If any questions have already been placed on the questionnaire layout, indicator numbers on the list will show what pages they are on.

To place a question on the on-screen layout:

•	On the Question List, locate the question you want to add. (If the list is too long to fit into the space available, resize the window or use the scroll bar to view the rest of the entries.)

•	Click on the item once to highlight it, then hold the right (secondary) mouse button and drag the question onto the layout screen. Builder places the full text of the question on the screen (using the font and size information you specified in the Question List), together with an answer block for that question.

Related topics:

Adjusting and Reformatting

Removing Questions from the Layout

Other Layout Tools


Adjusting and Reformatting

After you have placed the question and answer blocks on the questionnaire form, you can refine it by adjusting the positions and appearance of the individual items. In addition to moving and resizing, you can also edit question text, cut and paste text using the Windows clipboard, change font and size attributes, and split the questionnaire display into multiple pages.

Note: From the Question Layout window, you can only make changes in question display properties. To modify answer type, field lengths, skip patterns, validations, etc., you must switch to the Question List window by choosing Window : Question List from the menu.

Related topics:

Searching for Question text


Moving questions

After you have placed a question on the on-screen display, you may move it to any position on the screen.

•	Click once on the question or answer you want to move with either mouse button. The question and its associated answer change color.

•	Hold down the right (secondary) mouse button, and drag the question or answer to where you want it.


Resizing Questions and Answers

If a question's display area on the screen is too small or too large for the question text, you will need to resize it. To resize a question block on the screen:

•	Click on the question with the mouse to highlight it.

•	Press the <Control> key. A set of resize handles appears at the corners and sides of the question box.

•	Move the cursor over the box's border until it changes to a double arrow.

•	Hold down the left (primary) mouse button and drag the border to its new position.

You may resize any question field on the layout, as well as the answer blocks for the Text and Memo answer types. If a Text answer is too long to fit on the screen, it will scroll as the user enters the answer. Memo answers automatically appear with a scroll bar on the Collector screen. Answer blocks for Date, Time, Date/Time, Number, and List answers are based on the length of the answer field and cannot be changed from the Layout screen.

Related topics:

Changing Yes/No answer orientation


Changing Yes/No answer orientation

Questions whose answer type is Yes/No or Yes/No/NA normally provide an answer block with the choices placed horizontally on the same line.

To switch a block to a vertical alignment, click on it twice and press the <Control> key.


Editing question text

To edit the text of a question, first click on the question you want to modify. The field changes color, and the blinking cursor indicates that the editing functions are active. Use standard Windows mouse or keyboard editing commands to change the text.

You can cut, copy, and paste text from other question fields or from the Windows clipboard by clicking the Cut, Copy, and Paste icons at the top of the screen or choosing the corresponding commands from the Edit menu.

Any changes you make to question text will automatically be reflected in Builder's Question List.


Removing Questions from the Layout

To erase a question from the layout, highlight it with the mouse and click the Remove button (or choose Questions : Erase from the menu). The question is erased from the layout area and the page number indicator comes off the Question List.


Searching for question text

The Find and Find Again icons are available for searching for questions across multiple pages. To search for a question:

•	 Click Find.

•	Type in the name or part of a name of the question you are looking for. Search text is not case sensitive.

•	Select Forward or Backward search. Forward searches from the beginning of the questionnaire to the end; Backward starts from the end and works forward.

•	 To repeat the search, click Find Again.

 Hint: To locate a question quickly in a multiple-page layout, click once on the question's short name in the Question List. Builder will switch to the page where that question appears.


Changing font and size attributes

To make the on-screen questionnaire more legible or emphasize its logical structure, you can assign font and size attributes to each question. If this information was supplied when creating the question text, it will be added to the layout screen when you place the question. You may make changes using the formatting tools above the layout area, and Builder will automatically update the Question List display.

Note: Reformatting question text will probably also make it necessary to resize the question on the Layout screen.


Other Layout Tools

Besides the basic technique of placing and moving questions, Builder also provides the following functions for customizing the design of the onscreen questionnaire:

Inserting, splitting, and deleting pages

Setting snap to grid


Inserting, splitting, and deleting pages

If there are too many questions to fit on a single screen, or you want to break the questions down into functional or logical groups, you can extend the questionnaire to two or more pages. To work on a second and subsequent pages of the layout, click the up and down arrows next to the Page No. indicator at the upper right, or type the number of the desired page in the box.

To insert a new page in the layout, choose Questions : Insert Page from the menu. The new page will be inserted before the current page, and the current page and all subsequent pages will be renumbered.

You may split an existing page into two pages, for instance if it is too crowded. To split a page, select the item you want to appear at the top of the new page, then choose Questions : Split Page from the menu. The selected question and any items below it will be moved to a new page. If a next page already exists, the questions on it will remain intact but the page will be renumbered.

To delete a page, erase all questions from it, then choose Questions : Delete Page from the menu.

Note: You cannot move an item to another page of the layout by dragging and dropping. To move an item to another page, remove it and then re-place it on the new page.


Importing Study Data

Once you have defined the record structure for the DataCol project, you may import data into it from the source database. (The Import Items layout need not be done before you import the data, but the Import Items list must be completed.)

To begin the import process, first close Builder, if it is running, by clicking on the Close button once to close the open project file, and again to exit Builder (or choose File : Exit from the menu).

Then, in Windows' Program Manager, click on the icon for DataCol Import. The program will start and display the Import window. This window displays lists of the Import Items in both the source file and the DataCol project file, and allows you to match the source field names to the project field names either automatically (with the Match All button) or manually (by clicking and dragging). Once all the fields have been matched, clicking the Import button performs the import and populates the project file with data.

Related topics:

Opening Source and Project Files

Matching Field Names

Populating the Database


Opening Source and Project Files

To begin the import procedure, select the DataCol project into which you want to import data by choosing File : Open Project from the Import module menu. A Windows dialog box opens to let you locate the project file, which must have an extension of .CMR. When you click OK to select a project, the file is loaded and the list of Import Items you defined in Builder is displayed in the column Target Field Name.

Next, select the source file from which to import the data by choosing File : Open Data Source from the menu. The External Data Source Type window appears. Highlight the database format of the import file and click OK. In the Source File to Import dialog, locate the name of the import file. (DataCol will choose a standard file extension based on the database format you selected.) Click OK to load the file and display the list of source fields in the column Source Fields.

Related topics:

Matching Field Names

Populating the Database


Matching Field Names

After you have opened the import source file and the DataCol project file, the next step in the import procedure is to match the import source fields to the target fields in the DataCol project. If you created the project file structure by borrowing it from the same source file, the match should be essentially exact, and little adjustment will be necessary. If you created the project file structure manually, or borrowed it from another project, some or all of the fields may require manual matching.

To match fields automatically:

•	Click Match All. Import will scan the import file and match whatever fields it can to equivalent fields in the target project file. If there are fields that do not match, Import will issue an error notice, informing you of where the mismatches occurred.

To match fields manually:

•	Highlight a source field you want to match by clicking on it with the mouse.

•	Hold the right (secondary) mouse button and drag the item into the Source Field Name column opposite the matching Target Field Name. Note: Field names need not match exactly, as long as the data specified are the same.

•	Repeat this procedure until all fields are matched. To delete all the field pairings and start over, press Clear All.

Note that some target fields may not have matches in the source file, for example those that point to lookup fields in an external reference database.

Related topics:

Opening Source and Project Files

Populating the Database


Populating the Database

When the source-to-target field matching is complete, press Import to populate the project database with data from the source file. Import displays a status bar showing the progress of the import, and a running count of the number of records remaining. Press Cancel if you need to halt the import operation (records already imported will be retained in the project file).

If the project already has data in it when you attempt an import operation, you will have the option of replacing the existing records with the new set, or appending the new records to the existing ones.

After you have finished importing data to a project file, you may import to another project from the same source database by choosing File : Open Project from the menu again.

Related topics:

Opening Source and Project Files

Matching Field Names


Abstract

To inspect medical case records, documents, or other sources and extract information from them in response to a survey questionnaire.


Case

The data pertaining to one person in the population being studied.  Each case comprises a single record in the project database.


Import

To transfer data from the source database to a DataCol project file. A single database file can serve as the source for multiple projects.


Import file, Source file

An electronic database containing demographic data on the population to be studied. The project designer decides which fields from the source file to import into each DataCol project.


Project

A specific data collection task, such as a survey.  All the information for a single project is contained in a DataCol project file--imported source data, the project survey questions and their answers, and internal control and status fields.


Selecting items

To select items in Windows lists:

•	Select a single item by clicking on it once with the left (primary) mouse button.

•	Select multiple items by holding the <Control> key while clicking on the desired items.

•	Select multiple adjacent items by dragging the cursor over them, or by highlighting the first item in the selection, pressing and holding the <Shift> key, and clicking the last item.


DataCol Export

 The Export module allows you to select any combination of data from the DataCol project file, and output that data to a text file, which can be read by other programs, such as spreadsheets, databases, or word processors.

To begin the export process, click on the icon for DataCol Export in Windows' Program Manager. The program will start and display the DataCol Export window.

Opening a Project File

The first step in exporting data from a DataCol project is to open a project file. To open a project, you may either:

•	Type the path and file name on the line labeled DataCol project file. Press <Tab> when finished.

-or-

•	Choose File : Open Project File from the Export menu. Use the Open dialog box to locate the correct drive, directory, and file name.

If Export cannot open the file you specify, an error message will explain the reason for the failure.

If the project file you select is valid, Export will load all the exportable data fields in the project and display them in the table, in the following order:

•	Project Import Items, usually including Name, Birth Date, etc.

•	Question and answer fields from the survey questionnaire

•	User-accessible control fields (case status, chart received date, etc.)

To resize the columns in the table, place the cursor in the header row over the column border you want to move until the cursor changes to a double arrow. Hold the left (primary) mouse button and drag the border left or right.

The next step in the Export process is to select fields for exporting to the text file.

Related topics:

Setting Export options

Printing the Export Settings report


Error and Warning Messages
Export Error and Warning Messages

The following error messages may appear if Export cannot open a project file:

"Not a DataCol project file." The file does not have the correct internal structure. It was either not created with DataCol, or has been corrupted.

"No answers have been input in that DataCol project file." Export cannot find anything to export because no answer data exists yet in the project database. The entire questionnaire does not have to be completed, for Export to run, but editing must have started on at least one question.

Miscellaneous file error. The file you specified does not exist, is locked, or cannot be opened for some other reason.

You may also see the warning message "X cases are still open. Do you want to continue anyway?" This is a reminder that editing of this project is not complete. You may continue exporting data from the partially finished project by clicking Yes.


Selecting Fields to Export

When you load a DataCol project file, all exportable fields will automatically be selected for inclusion in the export text file. You may reduce the number of selected fields to only those you need.

To exclude a field from the export text file, double-click anywhere on its row in the table. To include a field that has been deselected, double-click on its row again. Deselected fields are marked with "X**" before the field name.

To change the order of fields in the export file, move the cursor over the first column (Order) in the row you want to move. Hold down the left (primary) mouse button and drag the row up or down.

Export saves your settings for selected/deselected fields and field order in the project file, and restores them the next time you open the project.

Before exporting, you must also set Export options.

Related topic:

Printing the Export Settings report


Export Options

Before exporting data from the project file, you must also set a number of options for how the data will be formatted in the export text file.

To set export options, click on the Setup button in the DataCol Export window. Export will display the Parameters dialog box, where you may set options for the following:

Output type	True/False values output as:
Records to include	Yes/No values output as:
 Date format

Related topics:

Exporting

Printing the Export Settings report


Output type

Select "delimited" or "SDF" (system data format). SDF is the default.


Records to include

Select from these case statuses:

• All (default)	• Completed/Excluded
• Completed	• Incomplete/Excluded
• Incomplete (any status other than "Completed" and not excluded)	• Completed/Incomplete

•	Excluded


Date format

Select one of the options from the list. The default is mmddyyyy: for example 05031996.


Export True/False values
True/False values

True/False values are stored in the project database as numeric values. In the export file, you may convert them to any of:

T/F (default)

True/False

Y/N

Yes/No

0/1

1/2


Yes/No values

Yes/No/NA values are stored in the project database as numeric values. In the export file, you may convert them to any of:

Y/N/A

Yes/No/NA

0/1/2

0/1/9

1/2/3

1/2/9 (default)


Exporting

After you have selected fields to export and chosen export options, you are ready to export.

First, if you have not done so already, type a name for the export file on the Export file line. If the file exists, Export warns that it will be overwritten.

Click the Export button to export data. Export searches the DataCol project file for records that match the option you set for "Records to include." If it finds any matching records, it writes them to the output text file using the Setup options you selected.

Related topic:

Printing the Export Settings report


Printing the Export settings report

At any time, you may click on the Print button in the Export window to print an Export settings report. This report shows all current Setup options and grid settings, including SDF positions if you chose the SDF output option.


Closing Export

To exit the Export module, click on the Cancel button, or choose File : Exit from the menu.