Smart form

Some embodiments of a system and a method to dynamically create a smart form have been presented. In one embodiment, a graphical user interface (GUI) module, running on a server, creates a GUI to present a questionnaire having at least one question to an end-user. A rule engine, running on the server, receives an answer to the at least one question via the GUI from the end-user. Using truth maintenance, the rule engine may determine what follow-up questions to ask the end-user based on the answer received. The GUI module may dynamically modify the GUI to present the follow-up questions to the end-user.

TECHNICAL FIELD

Embodiments of the present invention relate to rule management, and more specifically to dynamically creating a smart form using a rule engine and truth maintenance.

BACKGROUND

Questionnaires, which broadly refer to collections of questions, have many useful applications. For example, questionnaires may be used in surveys to collect data for analysis, in various application processes (e.g., employment application, health insurance applications, housing rental application, etc.). Conventionally, questionnaires are presented in a static form. For example, a questionnaire may be printed on paper to be distributed to survey takers, applicants, etc. In another example, a questionnaire may be formatted as a webpage and displayed.

However, because of the static form, all possible questions in the questionnaire have to be included, even though some of these questions may later become irrelevant in certain cases. For example, an exemplary conventional questionnaire may include different questions for male and female survey takers. For the questionnaire given to a male survey taker, all questions directed to female survey takers become irrelevant. But since the static form has to be generated prior to a survey taker answering any of the questions, including the question on his/her gender, all possible questions have to be included in the questionnaire, thus making the questionnaire unnecessarily long and potentially confusing to the survey taker. The chance of the survey taker inadvertently making a mistake is also greatly increased if the survey taker changes his/her answer to one of the earlier questions because the survey taker may likely forget to answer the relevant set of follow-up questions after changing the answer. As a result, the data of interest may not be collected.

DETAILED DESCRIPTION

Described herein are some embodiments of a system and a method to dynamically create a smart form. In one embodiment, a graphical user interface (GUI) module, running on a server, creates a GUI to present a questionnaire having at least one question to an end-user. A rule engine, running on the server, receives an answer to the at least one question via the GUI from the end-user. Using truth maintenance, the rule engine may determine what follow-up questions to ask the end-user based on the answer received. The GUI module may dynamically modify the GUI to present the follow-up questions to the end-user. Because the GUI of the questionnaire is dynamically created based on the end-user's answers to questions in the questionnaire, the questionnaire may be referred to as a smart form. More details of some embodiments of the rule analysis tool are described below.

FIG. 1Aillustrates a flow diagram of one embodiment of a method to dynamically create a smart form. The method may be performed by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as instructions run on a processing device), firmware, or a combination thereof. For instance, at least part of the method may be performed by the rule engine210and the GUI execution server220illustrated inFIG. 2in some embodiments.

Initially, processing logic creates a GUI to present a questionnaire to an end-user (processing block110). The questionnaire typically includes many questions and the GUI may include a form, which displays questions and provides various user interface control, such as checkboxes, text fields, drop-down lists, etc., to allow the end-user to answer the questions. In some embodiments, the questionnaire may be associated with certain business applications, such as life insurance applications, medical insurance applications, employment applications, housing rental applications, etc. Then processing logic receives an answer to a question in the questionnaire from the end-user (processing block112).

In some embodiments, processing logic uses truth maintenance to determine what follow-up questions to ask the end-user next based on the answer received (processing block114). To apply truth maintenance, processing logic may construct a logic tree (also known as a logic chain) having a set of nodes and a set of branches to connect the nodes. A node in the logic tree may represent a question in the questionnaire, and the branches going out of the node to other nodes may represent possible answers to the question. More details of one embodiment of a logic tree are discussed below with reference toFIG. 1B.

Then processing logic dynamically modifies the GUI to present the follow-up questions to the end-user (processing block116). Because the questionnaire is dynamically created based on the answers from the end-user received so far, the questionnaire may be referred to as a “smart form.” Some exemplary embodiments of the GUI are shown inFIGS. 1C and 1Dto illustrate the above approach.

FIG. 1Billustrates one exemplary embodiment of a logic tree120. The logic tree120may be associated with a life or medical insurance application form. The logic tree120includes a number of nodes representing various questions in the application form. For example, node designated as Question 1 may represent the question: Does/did any of your immediate family members have breast cancer? There are two branches going out of this node to connect this node to the nodes (namely, Question 2A and Question 2B) on the next level of the logic tree120, one representing “Yes” and the other one representing “No.” Each of the possible answer to this question may trigger a different set of follow-up questions. Each set of follow-up questions is logically related to the respective answer to the previous question. For the purpose of illustration, suppose the end-user's answer to this question is “Yes.” Then processing logic may follow the branch123representing “Yes” to the node representing Question 2A. In one example, Question 2A may be: Are you above age forty (40) or not? This is because women with a family history of breast cancer may have an increased risk of having breast cancer if they are also at or above age 40. Thus, the follow-up question (i.e., Question 2A) about the age of the end-user is logically related to the end-user's answer to the previous question (i.e., Question 1). The branches going out of the node Question 2A represent the possible answers to this question, i.e., one representing at or above age 40, and the other one representing below age 40. Depending on the end-user's answer to Question 2A, processing logic may take either branch to continue to the next question (i.e., Question 3A or Question 3B). Although for simplicity, Question 1 and Question 2A illustrated inFIG. 1Beach has only two possible answers, one should appreciate that some questions in some embodiments may have more than two possible answers (e.g., 3, 4, 5, etc.).

Note that because the end-user's answer to Question 1A is not “No,” the portion of the logic tree120representing “No” and the subsequent follow-up questions has become irrelevant in this example. Thus, processing logic may discard this portion of the logic tree120. Therefore, the branch representing “No” and the node connected to the branch, namely, Question 2B, are shown in dotted line inFIG. 1B.

As the end-user answers more and more questions in the questionnaire, processing logic may continue building the logic tree120, which keeps track of the answers from the end-user as the logic tree120grows. Thus, the logic tree120may accumulate evidence of the end-user's response to the questions in the questionnaire, and provide a convenient way for processing logic to backtrack the sequence of answers and questions, if needed. For instance, if the end-user changes his answer to one of the earlier questions, then processing logic may backtrack the sequence of answers and questions to this earlier question, and repeat the above process to create a different questionnaire. This feature may ensure that the end-user would not forget to answer the updated relevant follow-up questions.

FIG. 1Cillustrates one embodiment of a GUI130of a smart form. The smart form is associated with an immigration or border control survey used in New Zealand (NZ). Question 3 in the smart form130asks an end-user: Do you live in NZ or did you until today? The end-user's answer to Question 3 is “Yes.” Because the end-user has answered yes, the smart form130further displays the following questions:I have lived in NZ for:How long will you be away from NZ?What is the main purpose of your trip?Which country will you spend most time in while overseas?

Note that the above follow-up questions are logically related to the fact that the end-user lives in NZ, or the end user lived in NZ until today. If the end-user has answered “No” to Question 3, then another set of follow-up questions is displayed, which is logically related to the fact that the end-user does not live in NZ, as illustrated inFIG. 1D.

FIG. 1Dillustrates an alternate embodiment of the GUI140of the smart form. The end-user has answered “No” to Question 3 in the GUI140, that is, the end-user does not live in NZ. Based on the end-user's answer, the GUI140displays a follow-up question141logically related to the fact that the end-user does not live in NZ: “On this visit, I have been in NZ for a period of:” and a numerical entry field142with a list of units144to allow the user to select the appropriate unit (e.g., days, weeks, months, etc.) for answering the follow-up question141.

FIG. 2illustrates one embodiment of a system to dynamically create a smart form. The system200includes a rule engine210and a GUI execution server220. In some embodiments, the rule engine210includes software modules running on the GUI execution server220. Alternatively, the rule engine210includes software modules running on a different server communicably coupled to the GUI execution server220. Generally speaking, the rule engine210receives facts asserted by users and rules, evaluate the facts against the rules, and may perform certain actions (or cause certain actions to be performed) based on the result of the evaluation. Facts as used herein broadly refer to data. Generally speaking, a rule is a logical construct for describing the operations, definitions, conditions, and/or constraints that apply to some predetermined data to achieve a goal. For example, a business rule might state that no credit check is to be performed on return customers.

In some embodiments, the rule engine210receives two sets of rules, namely, smart form rules230and questionnaire rules240. The smart form rules230may govern how a smart form should be created, such as what follow-up questions to ask if a certain answer to a question is received. The questionnaire rules240are rules provided by the creator of the smart form. For example, the questionnaire rules240may include the follow-up questions associated with each possible answer of a question in the smart form.

In some embodiments, the GUI execution server220pulls questions from the rule engine210and creates a GUI of the smart form using the questions pulled. The GUI execution server220may include a web execution server and the GUI may include one or more webpages displayable on a client machine coupled to the web execution server. The GUI may be created in various formats, such as Hypertext Markup Language (HTML), Extended Markup Language (XML), etc. For example, the GUI execution server220may create a front-end GUI250to display a question according to one of the rules and to receive answers to the question from an end-user. When the front-end GUI250receives an answer to the question from the end-user, the front-end GUI250forwards the answer to the GUI execution server220, which then forwards the answer to the rule engine210.

Asserting the answer as a fact into a working memory of the rule engine210, the rule engine210evaluates the answer against the rules (e.g., the smart form rules230and the questionnaire rules240) in the rule engine210. Applying the smart form rules230and truth maintenance, the rule engine210selects one or more appropriate questionnaire rules240as follow-up questions. The follow-up questions are logically related to the answer received. Details of some embodiments of the use of truth maintenance by the rule engine210have been discussed above.

The rule engine210then sends the follow-up questions to the GUI execution server220. Then the GUI execution server220dynamically modifies the front-end GUI250to display the follow-up questions in the front-end GUI250. In some embodiments, the GUI execution server220may further create and display user interface control (e.g., checkboxes, drop-down menus, etc.) designed for the end-user to use for answering the follow-up questions. When the front-end GUI250receives answers to the follow-up questions from the end-user, the front-end GUI250, the GUI execution server220, and the rule engine210repeat the above process to continue generating follow-up questions logically related to the answers for the smart form. Some exemplary embodiments of the front-end GUI250have been discussed above with reference toFIGS. 1C and 1D.

FIG. 3illustrates one embodiment of a system to dynamically create a smart form. The system300includes a rule engine server310, a GUI execution server320, and a client machine330, coupled to each other via a network340. The network340may include various networks, such as a local area network (LAN), Ethernet, wide area network (WAN), Internet, etc. Note that there may be more devices coupled to the network340in different embodiments, such as additional servers, client machines, etc. In an alternate embodiment, there is only one server coupled to the network340to perform the tasks of the rule engine server310and the GUI execution server320. The client machine330may be implemented using various computing devices, such as personal computers, laptop computers, personal digital assistants, cellular telephone, special-purpose computers installed in kiosks, etc.

In some embodiments, the rule engine server310executes a rule engine, such as the rule engine210inFIG. 2, and the GUI execution server320dynamically creates a GUI of a smart form, such as the GUI execution server220inFIG. 2. The GUI may include various questions of the smart form, such as the exemplary embodiments shown inFIGS. 1C and 1D. The GUI execution server320sends the GUI created to the client machine330, which includes a display device335(e.g., a monitor, a built-in screen, etc.) for displaying or rendering the GUI created. The GUI may also receive answers to the questions. Then the client machine330may send the answer via the network340to the GUI execution server320, which forwards the answer to the rule engine server310via the network340. Using truth maintenance as discussed above, the rule engine running on the rule engine server310selects the appropriate follow-up questions and sends the follow-up questions to the GUI execution server320, which dynamically modifies the GUI to display these follow-up questions, and optionally, user interface control associated with these follow-up questions. Then the GUI execution server320sends the modified GUI to the client machine330. The client machine330displays the modified GUI using the display device335.

The computer system400may further include a network interface device408. The computer system400also may include a video display unit410(e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)), an alphanumeric input device412(e.g., a keyboard), a cursor control device414(e.g., a mouse), and a signal generation device416(e.g., a speaker).

The data storage device418may include a computer-accessible storage medium430(also known as a computer-readable storage medium) on which is stored one or more sets of instructions (e.g., software422) embodying any one or more of the methodologies or functions described herein. The software422may also reside, completely or at least partially, within the main memory404and/or within the processing device402during execution thereof by the computer system400, the main memory404and the processing device402also constituting computer-accessible storage media. The software422may further be transmitted or received over a network420via the network interface device408.