Abstract:
The invention provides a document generation system for generating a customised document using a document generation program, having means to generate and information capture document for obtaining input information. At least one content element comprises at least a first variable. The system comprises means to evaluate a set of further rules including at least one second variable to determine the number and type of occurrences of the first variable, and means to aggregate the further set of rules to determine the relevance of the first variable in terms of the at least one second variable.

Description:
RELATED U.S. APPLICATIONS  
       [0001]     This application claims the benefit of U.S. Provisional Application No. 60/499,383, filed 3 Sep. 2003. 
     
    
     FIELD OF THE INVENTION  
       [0002]     The present invention relates to the automated creation of documents, and in particular to the dynamic generation of questionnaires to capture information used in the generation of such automated documents.  
       BACKGROUND TO THE INVENTION  
       [0003]     It is well known to generate customised documents, either manually or using an automated system, from precedents or templates.  
         [0004]     If this is done manually, then a printed standard form or other precedent, containing blank spaces for particular relevant information, will be filled in and edited on each specific occasion it is used. Instructions may be included in the standard document to help the user insert the correct or appropriate information.  
         [0005]     If this is done using an automated system, then an electronically stored document or template will be used, in conjunction with various logical rules and other criteria, to prompt the user for the correct information and to assemble a customised document by associating various relevant rules with variables within the template. An example is the HotDocs® system which uses a library of Form Templates, which store both static and dynamic areas of text, that are initially customised by the user, in conjunction with a questionnaire to produce a completed customised document. Necessary information relevant to the dynamic text areas may either be input directly by a user, or gathered from an Answer File. The Answer File contains information which is repeatedly used in the same or similar customised document. Various logical rules and calculation criteria are used to associate information with the template to produce a final customised document. This document may then be edited, printed or stored.  
         [0006]     Other known automated systems include that described in WO01/04772. In this system, a server computer runs a document generation program and is capable of communicating with local or remote client computers over a local area network (LAN) or a wide area network (WAN), such as the Internet. A standard document, comprising various items of known information and associated logical rules, is first translated into a form suitable for processing by the document generation program. When instructed to generate a customised document, the server first generates one or more web pages which are sent to client computers for user input of the further information required to evaluate the logical rules. Users may then submit the further information to the server. Once all the required further information has been captured, the server generates a customised document on the basis of the standard document and received further information.  
         [0007]     When information is captured, the transaction values entered by the user will be substituted for the various variables in the template. One difficulty in capturing such transaction values using web pages or web forms, is ensuring that the page or form prompts the user for the correct information. This is a particular problem when, in a series of related questions, some of the information needed is dependent on an answer to a previous question.  
         [0008]     In particular, there will be occasions when some of the variables will be dependent on various transaction values, and the behaviour of these various transaction values will affect the behaviour of the dependent variables. In some circumstances, this dependency can cause questions to be enabled or disabled in the web page or form incorrectly.  
         [0009]     The prior art approach to solving these problems is to hand encode a series of complex conditional statements, or to edit and re-edit code by hand each time a transaction value changes. This is time consuming and prone to error.  
       SUMMARY OF INVENTION  
       [0010]     The invention provides a document generation system for generating a customised document using a document generation program, having means to generate an information capture document for obtaining information. At least one content element comprises at least a first variable. The system comprises means to evaluate a set of further rules that include at least one second variable to determine the types of occurrences of the first variable, and means to aggregate such rules to determine the relevance of the first variable in terms of the at least one second variable.  
         [0011]     The type of each occurrence of the first variable is determined by whether the first variable occurs within unconditional text, within conditional text or as part of a usage statement that controls the inclusion of some conditional text.  
         [0012]     The relevance of the first variable is determined by aggregating the types of occurrences together using a logical OR operation.  
         [0013]     A web form questionnaire is used to capture information from a user. The information comprises transaction values which correspond to particular variables, for example, a first transaction value corresponds to the first variable and at least one second transaction value corresponds to the at least one second variable. The questionnaire comprises at least a first question which is associated with the first variable and at least a second question which is associated with the at lest one second variable. When the user answers the at least one second question the answer (in the form of a transaction value) is used in conjunction with the relevance of the first variable to enable or disable the first question.  
         [0014]     On generation of the customised documents, the document generation system replaces the first variable with the corresponding first transaction value and replaces the at least one second variable with the at least one second transaction values, and so on. This process may be repeated with any number of other variables.  
         [0015]     The web form may comprise at least one page, and where it comprises two or more pages, the first and second questions may be on different pages.  
         [0016]     The invention also provides a computer-implemented method of determining the type of each occurrence of the first variable and the relevance of the first variable. A computer program product may be arranged to carry out the steps of the method, or it may be stored on a computer readable medium.  
         [0017]     The invention offers the advantage that the web form questionnaire can be made to behave properly in terms of enabling questions when they are relevant and disabling questions when they are not relevant without the need for complex hand encoding each time a variable is included or excluded from the template or customised document. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0018]     The invention will now be described by way of example only, and with reference to the accompanying drawings in which:  
         [0019]      FIG. 1  illustrates a first network system in which embodiments of the invention may be carried out;  
         [0020]      FIG. 2  illustrates a second network system in which embodiments of the invention may be carried out;  
         [0021]      FIG. 3  illustrates a third network system in which embodiments of the invention may be carried out; and  
         [0022]      FIG. 4  is a flow diagram showing the stages in producing a customised document. 
     
    
     DESCRIPTION OF PREFERRED EMBODIMENTS  
       [0023]     The system with which embodiments of the present invention are implemented will now be described. The system comprises one or more data processing means, which, where a plurality of processing means are used, are connected together using communication means. For example, client/server architecture may be used, with one of the data processing means functioning as a server, and others as clients. However, a single processing means may function as both server and client. Various configurations of client/server architecture are shown in  FIGS. 2, 3  and  4 . The invention is not limited to any particular hardware architecture. For example, the invention could be implemented on a stand alone computer such as, for example, a PC.  
         [0024]      FIG. 1  shows a server computer  10  connected to two local client computers  20  and  22 , connected by means of a local area network (LAN)  30 , forming an intranet. Each computer  10 ,  20 ,  22 , runs an operating system program, such as Microsoft Windows 2000 Professional™ and network programs such as Novell Netware™. The server computer  10  also runs a Web server application such as Microsoft Internet Information Server™, and each of the local client computers  20 ,  22  also run a browsing application such as Microsoft Internet Explorer™. The server  10  and local computers  20 ,  22  communicate using transmission control protocol/internet protocol (TCP/IP) and hypertext transfer protocol (HTTP) or similar.  
         [0025]      FIG. 2  shows a single server computer  11  connected to four client computers,  31 ,  33 ,  35  and  37 , using a LAN, each of which runs the operating systems and browser applications mentioned above, and which communicate with the server computer  10  using TCP/IP and HTTP or similar protocols. It is also possible to use XML or other similar known protocols.  
         [0026]      FIG. 3  shows a server computer  12  connected to two local client computers  40  and  42  using a LAN, and also connected to two remote client computers  44  and  46  through the Internet  48 . Each runs the operating and browser systems mentioned above, and proxy servers and firewalls may be used to protect the intranet from unauthorised access from the Internet. Again, communication within the intranet is via TCP/IP and HTTP protocols.  
         [0027]     As  FIG. 3  is the most general arrangement, embodiments of the invention will be described with respect to such a network.  
         [0028]     One or more of the computer systems  12 ,  40 ,  42 ,  44  and  46  runs a word processing application such as Microsoft Word™, which is used to create document templates and may be used to view fully or partially customised documents generated by a document generation system. The document template comprises one or more content elements for possible use when generating a customised document and one or more associated rules for determining, on the basis of further information provided by a user, how to use the content elements (which may be conditional clauses or statements) when generating a customised document.  
         [0029]     Server computer  12  also runs a document generation program, which, when provided with a template, generates one or more input capture documents to capture information from a user. These documents may be forms, such as web forms, web pages, or any other known computer generated form. The information capture document is generated on the basis of rules contained in the template. The purpose of the information capture document is to enable a user to enter input information. The document generation program then generates a fully or partially customised documents on the instructions of a user. The document generation program may be run as a server program and is instructed to perform tasks by users of client browser applications.  
         [0030]     To generate either a fully or partially customised document from a template, a user instructs the document generation program by sending URL GET or POST request from a client computer,  40 ,  42 ,  44  or  46 , to the server  12 . The document generation program then initiates a session with the client computer. The document generation program may generate one or more Web input forms based on the chosen template, which are passed via a Web server application to the client computer. This Web input form uses standard HTML (hypertext mark-up language) features such as buttons, free-form entry boxes, tick boxes, pull-down menu list boxes, radio buttons and other graphical user interface (GUI) means for inputting information. The document generation program may generate multiple information capture documents, for example, input forms, for distributing to and capturing further information from the users of one or more further client computers  40 ,  42 ,  44   46 . The document generation program may also produce multiple information capture documents as forms for capturing information from the user of a single client computer in several stages. In the remaining description, the information capture document used will be referred to as a form. However, in the following embodiments, it is assumed that only one user of a client computer is involved.  
         [0031]      FIG. 4  is a flow diagram showing the process followed by the document generation program. At step  50 , the document generation program waits for an instruction from the user to generate a new customised document from a template. On receiving such an instruction, the document generation program generates, at step  51 , a first input form on the basis of the rules contained in the template. The user then enters information, using the input form, which is received by the document generation program at step  52 . Then, at step  53 , the document generation program determines whether the received information is sufficient to evaluate all the rules. If yes, the process continues to step  56  where the document generation program generates a customised document. If no, then the process continues to step  54 , where the document generation program determines whether or not it should proceed to generate a partially customised document. If it should, then the process continues to step  55  where such a document is generated. If there is no request from the user to produce a partially customised document (for example, a tick box on the Web input form has been left blank), then the process returns to step  51 , and generates further Web input forms for capturing further information from the user. This process is completed until sufficient information is captured to produce either a fully customised document, or a satisfactory partially customised document.  
         [0032]     The customised document contains not only the content elements, the inclusion of which has been determined by the various rules within the template, but also the rules which have not been evaluated. The association between the content elements and rules which have not been evaluated may be represented by means of a mark-up.  
         [0033]     The content elements may also include conditional elements, which are only included if certain conditions are satisfied. These conditions are known as usage statements.  
         [0034]     The information used to generate a partially or fully customised document is captured by means of a web page or a web form, generated by the document generation program. The template from which the document is generated contains various variables, which will be replaced with transaction values provided by the user when the document is generated by the document generation program. This is the case whether the variables are conditional or not. As discussed above, ensuring that the user is prompted for the correct transaction values, and that these are matched correctly with the relevant variables, is problematic.  
         [0035]     Embodiments of the present invention solve these problems by considering the relevance of the variables in the template, and using these relevances to generate the web page or web form capturing information.  
         [0036]     A simple example of a conditional clause comprising several content elements and variables, in the form it would appear in the template, is shown below: (variables are shown in bold and between curly {} brackets, usage statements are shown in superscript, and conditional text is shown between square [] brackets) 
        {Name}[ RegisteredCompany OR RegisteredCharity  whose registered office is at {BusinessAddress}] [ NOT(RegisteredCompany OR RegisteredCharity)  of {PrivateAddress}]=(‘The Supplier’)        
 
         [0038]     The variable Name occurs only once within an unconditional part of the clause, and will always appear within a generated document. Therefore, the variable Name is always relevant.  
         [0039]     The variable BusinessAddress occurs only once within a conditional part of the clause, and will appear in a generated document only if the corresponding usage statement holds true. Therefore, the variable BusinessAddress is relevant only when the supplier is a registered company or a registered charity.  
         [0040]     The variable PrivateAddress occurs only once within a conditional part of the clause, and will appear in a generated document only if the corresponding usage statement holds true. Therefore, the variable PrivateAddress is relevant only when the supplier is not a registered company or a registered charity.  
         [0041]     The variable RegisteredCompany occurs twice, each occurrence being part of a usage statement that controls the inclusion of some conditional text. On the first occurrence, the variable RegisteredCompany is only required if the supplier is not a registered charity, since the conditional text will always be included if the supplier is a registered charity. In the second occurrence, the variable RegisteredCompany is again only required if the supplier is not a registered charity, since the conditional text will never be included if the supplier is a registered charity. Therefore, the variable RegisteredCompany is relevant only when the supplier is not a registered charity.  
         [0042]     The variable RegisteredCharity occurs twice, each occurrence being part of a usage statement that controls the inclusion of some conditional text. On the first occurrence, the variable RegisteredCharity is only required if the supplier is not a registered company, since the conditional text will always be included if the supplier is a registered company. In the second occurrence, the variable RegisteredCharity is again only required if the supplier is not a registered company, since the conditional text will never be included if the supplier is a registered company. Therefore, the variable RegisteredCharity is relevant only when the supplier is not a registered company.  
         [0043]     Consequently, the behaviour of the web page or web form questionnaire can be said to be proper if the questions relating to the variables are enabled or disabled in the following manner: 
        The Name question is always enabled;     The BusinessAddress question is only enabled when either the RegisteredCompany or the RegisteredCharity questions are enabled, and true;     The PrivateAddress question is only enabled when both the RegisteredCompany and the RegisteredCharity questions are enabled and false;     The RegisteredCompany question is disabled when the RegisteredCharity question is enabled and true; and     The RegisteredCharity question is disabled when the RegisteredCompany question is enabled and true.        
 
         [0049]     The relevance of a variable is determined by considering each of its occurrences, and aggregating the dependency statement (type of dependence) of each occurrence using a logical OR operator.  
         [0050]     If a variable occurs within unconditional text, then that particular occurrence will always appear in a generated document. The dependency statement of such an occurrence is true, and since true OR anything=true the variable will always be relevant irrespective of any other occurrences.  
         [0051]     If a variable occurs within conditional text, such as: [ Usage Statement  . . . {Variable} . . . ]then the dependency statement of such an occurrence is the usage statement associated with the conditional text.  
         [0052]     If the variables occurs nested within other conditionals, as in: 
        [ Usage Statement 1  . . . [ Usage Statement 2  . . . [ Usage Statement N  . . . {Variable} . . . ]]]
 
 then that specific occurrence is dependent upon the conjunction of the logic of each nested usage statement. 
       
 
         [0055]     If a variable occurs as part of a usage statement that determines the inclusion of conditional text, then the dependency statement includes any other variables also mentioned in that usage statement.  
         [0056]     For example, if the logic is: 
        Statement about Variable1 OR statement about other Variables 
 
 Variable1 is only required if the statement about the other variables is false, since the conditional text will definitely be included if the statement about the other variables is true, regardless of the value of Variable1. 
       
 
         [0059]     For example, if the logic is: 
        Statement about Variable1 AND statement about other Variables 
 
 Then Variable1 is only required if the statement about the other variables is true, since the conditional text will definitely be excluded if the statement about the other variables is false, irrespective of what the value for Variable1 is. 
       
 
         [0062]     In usage statements that do not involve the logical operators OR or AND, the dependency of the specific occurrences of the variable is said to be true, unless it is nested within other conditional text, as discussed above.  
         [0063]     The overall relevance of a variable is the aggregate of all the individual dependency statement for each occurrence of that variable. A variable V that occurs K times within an automated document, the dependency logic for the k th  occurrence of V, where 1≦k≦K is given by: 
        dependency (V k ) 
 
 The relevance of variable V is defined as: 
    relevant(V)≡dependency(V 1 ) OR dependency(V 2 ) OR . . . dependency(V k ) 
 
 Accordingly, variable V will be enabled on the web page or web form questionnaire if any dependency (V k ) is true, and disabled if they are all false. 
 
 From the example given above: 
    relevant(Name)=true     relevant(BusinessAddress)=RegisteredCompany OR RegisteredCharity     relevant(PrivateAddress)=NOT(RegisteredCompany OR RegisteredCharity)     relevant(RegisteredCompany)=NOT RegisteredCharity     relevant(RegisteredCharity)=NOT RegisteredCompany        
 
         [0074]     As discussed above, a questionnaire behaves properly if it enables relevant questions, and disables irrelevant questions. This is, however, a static definition of relevance which does not necessarily take into account transactional values that are already known, or which will be captured at the same time.  
         [0075]     In a single page questionnaire that contains all the questions for all of the distinct variables in an automated document. For each question on the page, a function can be constructed which controls the enablement and disablement of that question:  
                                             function able (V)                 {                if   relevant(V)                then   enable(V)                else   disable(V)                  }       Taking the example given above,       function ableName          {             document.form0.Name.disabled = false          }       function ableBusinessAddress( )          {          if  (                document.form0.RegisteredCompany.disabled ==                false             &amp;&amp;                document.form0.RegisteredCompany.checked ==                true             ||                document.form0.RegisteredCharity.disabled ==                false             &amp;&amp;                document.form0.RegisteredCharity.checked == true             )             {                document.form0.BusinessAddress.disabled = false             }          else {                document.form0.BusinessAddress.disabled = true             }          }       function ablePrivateAddress( )          {          if  (                document,form0.RegisteredCompany.disabled ==                false             &amp;&amp;                document.form0.RegisteredCompany,checked ==                false             ||                document.form0.RegisteredCharity.disabled ==                false             &amp;&amp;                document.form0.RegisteredCharity.checked == false             )             {                document.form0.PrivateAddress.disabled = false             }          else {                document.form0.PrivateAddress.disabled = true             }          }       function ableRegisteredCompany( )          {          if  (                document.form0.RegisteredCharity.disabled ==                false             &amp;&amp;                document.form0.RegisteredCharity.checked == false             )             {                document.form0.RegisteredCompany.disabled =                false             }          else {                document.form0.RegisteredCompany.checked = true             }       function ableRegistereCharity( )          {          if  (                document.form0.RegisteredCompany.disabled ==                false             &amp;&amp;                document.form0.RegisteredCompany.checked ==                false             )             {                document.form0.RegisteredCharity.disabled = false             }          else {                document.form0.RegisteredCharity.checked = true          }                  
 
         [0076]     However, in a multiple page web page or web form questionnaire, the questions for all of the distinct variables in an automated document may be spread across different pages. The enabling or disabling of questions must therefore also be related to the sequence of the pages, as well as the relevance of the variables.  
         [0077]     For example, in the clause above, the business address is only relevant when the supplier is a registered company or a registered charity. Table 1 illustrates how the questions are enabled and disabled for various page sequences:  
                                                     Question asked on page number                Registered   Registered   Business           Company   Charity   Address   Enable/Disable               1   1   2   The enabling/disabling of                   registered company and                   registered charity is as for a                   single page questionnaire.                   As both registered company and                   registered charity will be known                   from page 1, the business                   address question on page 2 will                   be permanently enabled or                   disabled.       2   2   1   As neither registered company                   nor registered charity will be                   known until page 2, the business                   address question on page 1 will                   be permanently enabled.       1   2   2   As registered charity will not                   be known until page 2, the                   registered company question on                   page 1 will be permanently                   enabled.                   As registered company will be                   known from page 1, the                   registered charity question on                   page 2 will be permanently                   disabled or permanently enabled,                   depending on the user&#39;s answer.                   If the supplier is a registered                   company (page 1), then the                   business address question on                   page 2 will be permanently                   enabled.                   If the supplier is not a                   registered company (page 1),                   then the business address on                   page 2 will be enabled or                   disabled according to the                   registered charity question on                   the same page.                  
 
         [0078]     For a web page or web form questionnaire with P pages, if a variable V occurs on page p, where 1≦p≦P, then the function which controls the enabling or disabling is given by:  
                                                       function able(V)                  {                 if   relevant(V) p                   then   enable(V)                 else   disable(V)              }                      
 
 where relevant(V) p  is relevant(V) with PAST VALUE and FUTURE VALUE rules. The PAST VALUE rule is where all variables whose questions which appear on pages 1 to p−1 and which were enabled are replaced with transaction values. The FUTURE VALUE rule is one where all statements about variables whose questions appear on pages p+1 to P are replaced with either true (for statements nested within an even number of negations) or false (for statements nested within an odd number of negations). 
 
         [0080]     For example, if the supplier is a registered company, which is determined on page 1, then the relevance of the business address on page 2, using the PAST VALUE rule is: 
        relevant(BusinessAddress)=true OR RegisteredCharity 
 
 which simplifies to: 
    relevant(BusinessAddress)=true        
 
         [0084]     If the supplier is neither a registered company nor a registered charity (again, from page 1), the relevance of the business address, using the PAST VALUE rule is: 
        relevant(BusinessAddress)=false OR false 
 
 which simplifies to: 
    relevant(BusinessAddress)=false        
 
         [0088]     If the supplier is not a registered company, then the relevances of registered charity and business address on page 2, using the PAST VALUE rule are: 
        relevant(RegisteredCharity)=NOT false     relevant(BusinessAddress)=false OR RegisteredCharity 
 
 which simplify to: 
    relevant(RegisteredCharity)=true     relevant(BusinessAddress)=RegisteredCharity        
 
         [0094]     However, if the registered company question and the registered charity question will be asked on page 2, the relevance of the business address on page 1 will be determined using the FUTURE VALUE rule: 
        relevant(BusinessAddress)=true OR true 
 
 which simplifies to: 
    relevant(BusinessAddress)=true        
 
         [0098]     Consequently, once the aggregate and consolidated relevances of the variables have been determined, the PAST VALUE and FUTURE VALUE rules may be associated with these relevances and evaluated by the document generation program to produce a web page or web form questionnaire which behaves properly.  
         [0099]     The advantage of using such an approach is that the method of determining relevances and the PAST VALUE and FUTURE VALUE rules may be encoded within the document generation program, and do not require any form of editing when the transaction values change. Embodiments of the invention remove the need to hand encode complex conditional statements or undertake complex editing, which leaves the program code open to error.  
         [0100]     Various modifications to the invention, which are within the scope of the appended claims, will be clear to those skilled in the art.