Code generation

Interactive application generation and text processing

6289513

Abstract

A method and system for generating an application, using a plurality of components, each component defining an application block, storing based on a non-programmatic user input, a plurality of user-defined application-specific properties, each property being associated with one of the plurality of components, receiving structured data input via a questionnaire, based at least in part on the plurality of components, generating text based, at least in part, on the structured data, including dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, based at least in part on the components and providing an application based on at least some of the plurality of user-defined application-specific properties and on the components associated therewith.


Claims

What is claimed is:

1. A method for generating an application, the method comprising:

providing a plurality of components, each component defining an application building block;

storing, based on non-programmatic user input, a plurality of user-defined application-specific properties, each said property being associated with one of said plurality of components;

receiving structured data input via a questionnaire, based at least in part on said plurality of components;

generating text based, at least in part, on the structured data, said generating text comprising dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, based at least in part of said components; and

providing an application based on at least some of said plurality of user-defined application-specific properties and on said components associated therewith.

2. A method according to claim 1 and wherein said generating text also comprises automatically joining at least two of said plurality of simple sentences to form a compound sentence.

3. A method according to claim 1 and wherein each said simple sentence is based on a user-supplied response to a question, said response being provided in said receiving step.

4. A method according to claim 1 and wherein said storing comprises:

receiving user input, wherein said user input is substantially non-textual.

5. A method according to claim 1 and wherein said generating text also comprises:

automatically generating text in more than one language.

6. A method according to claim 5 and wherein said more than one language comprises at least one left-to-right language and at least one right-to-left language.

7. A method according to claim 5 and wherein said more than one language comprises a first language having a first syntactical structure and a second language having a second syntactical structure, and

said first syntactical structure and said second syntactical structure are distinct.

8. A method according to claim 7 and wherein said first syntactical structure has a first sentence structural order and said second syntactical structure has a second sentence structural order, and

said first sentence structural order and said second sentence structural order are different.

9. A method according to claim 1 and wherein at least a portion of said method is implemented in software adapted for execution on a computer.

10. A method according to claim 9 and wherein the computer comprises one of the following: a handheld computer; and a palmtop computer.

11. A method according to claim 10 and wherein the computer comprises a keyboard-less pen-based handheld computer.

12. A method according to claim 10 and wherein the computer comprises a handheld wireless-communication device.

13. A method according to claim 9 and wherein said execution includes execution on a computer over the Internet.

14. A method according to claim 1 and wherein said generating text include automatic generation of compound sentences based on user input to questions and their continuation questions in said data-input questionnaires, and unlimited levels of hierarchy of said questions.

15. A method according to claim 1 and wherein modifying the structure of said application is achieved by setting of said properties;

said setting requiring no programming and no compilation; and

said modifying including all of the following: application questions; continuation questions; answers; question and answer sequence; and resulting text-generation of sentences from sub-sentence segments.

16. A method according to claim 1 and wherein said receiving includes selecting answers to questions in said questionnaire, based on voice-recognition processing of user voice-input.

17. A text generation method for generating text based, at least in part, on structured data, said method comprising:

generating a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, dynamically at runtime, said generating comprising automatically generating said plurality of simple sentences in more than one language.

18. A method according to claim 17 and wherein said more than one language comprises at least one left-to-right language and at least one right-to-left language.

19. A method according to claim 17 and wherein said more than one language comprises a first language having a first syntactical structure and a second language having a second syntactical structure, and

said first syntactical structure and said second syntactical structure are distinct.

20. A method according to claim 19 and wherein said first syntactical structure has a first sentence structural order and said second syntactical structure has a second sentence structural order, and

said first sentence structural order and said second sentence structural order are different.

21. A method according to claim 17 and wherein at least a portion of said method is implemented in software adapted for execution on a computer.

22. A method according to claim 21 and wherein the computer comprises at least one of the following: a handheld computer; and a palmtop computer.

23. A method according to claim 22 and wherein the handheld computer comprises a handheld wireless-communication device.

24. A method according to claim 21 and wherein said execution includes execution on a computer over the Internet.

25. A method according to claim 17 and wherein said user input includes selecting answers to questions in a structured data-entry questionnaire, based on voice-recognition processing of user voice-input.

26. A method according to claim 17 and wherein said text generation method also comprises a method for generating a compound sentence from a plurality of simple sentences, the method comprising:

providing general logic defining compound sentence structure based on structure of simple sentences from which a compound sentence is to be generated;

providing a plurality of simple sentences; and

generating a compound sentence based on said general logic and said plurality of simple sentences.

27. A method according to claim 26 and wherein each of said plurality of simple sentences reflects a continuation questions in a data-input questionnaire, and the generating step comprises:

generating a compound sentence from at least two sentences comprising a first sentence and a second sentence, wherein the first sentence reflects data entered via one question in the data-input questionnaire, and the second sentence reflects data entered via a second question in the questionnaire, and

wherein said second question is a continuation to one of a plurality of answers of said first question.

28. A method according to claim 27 and wherein at least one of the following is not limited:

a number of simple sentences related to continuation questions in the data-input questionnaire; and

the levels of hierarchy of said continuation questions, said continuation questions being joinable to generate a compound sentence.

29. A method according to claim 26 and wherein said generating a compound sentence comprises:

automatically generating the compound sentence in more than one language.

30. A method according to claim 29 and wherein said more than one language comprises at least one left-to-right language and at least one right-to-left language.

31. A method according to claim 29 and wherein said more than one language comprises a first language having a first syntactical structure and a second language having a second syntactical structure, and

said first syntactical structure and said second syntactical structure are distinct.

32. A method according to claim 31 and wherein said first syntactical structure has a first sentence structural order and said second syntactical structure has a second sentence structural order, and

said first sentence structural order and said second sentence structural order are distinct.

33. A method according to claim 26 and wherein said generating is based only on said general logic and said simple plurality of sentences.

34. A data collection and access method for allowing data collection from multiple users, the method comprising:

providing a knowledge base defining at least one data-structured input questionnaire to at least two users, comprising a first user and a second user;

allowing said first user to modify the knowledge base associated with said first user, without synchronizing said modification with said second user;

receiving structured-data input from said first user, said input being based on said modified, unsynchronized input questionnaire;

storing said input from said first user and providing access to said stored input to said second user; and

allowing said second user to determine the identity of questions and answers that were selected by said first user, despite said unsynchronized modification of said knowledge-base and input questionnaire.

35. A method for analyzing a text, said text comprising plain text generated by a text generator using a text generating method, said method for analyzing comprising:

reversing said text generating method, thereby determining a plurality of inputs which were provided to said text generating method in order to generate said text;

wherein said text does not include any of the following indicators: an embedded ID, and a hidden character;

said indicators indicating the questions and answers which caused generation of said text.

36. A method according to claim 35 and wherein said analyzing a text is utilized as part of a data access method comprising:

receiving data from user input to a questionnaire comprising multiple-choice questions and continuation questions;

generating natural language sentences from sub-sentence elements based, at least in part, on said user input;

storing said natural language sentences in textual form;

accessing said stored natural language sentences in textual form; and

analyzing said stored text thereby determining said user input which caused generation of said stored text.

37. A method according to claim 1 and wherein said storing comprises storing using a record data structure comprising:

a database comprising a plurality of documents, each document comprising a plurality of sections stored in at least one of the following:

at least one word processing file;

at least one word processing file object;

at least one HTML file;

at least one XML file; and

at least one text file,

said plurality of sections being arranged in a hierarchy.

38. An application generating system comprising:

a plurality of components, each component defining an application building block;

storage apparatus operative to store, based on non-programmatic user input, a plurality of user-defined application-specific properties, each said property being associated with one of said plurality of components;

input apparatus operative to receive structured data input via a questionnaire, based at least in part on said plurality of components;

a text generator operative to generate text based, at least in part, on the structured data, comprising dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input; and

an application provider for providing an application based on at least some of said plurality of user-defined application-specific properties and on said components associated therewith.

39. A computer-readable medium comprising a computer program, the computer program being operative, when in operative association with a computer, to perform the following steps:

providing a plurality of components, each component defining an application building block;

storing, based on non-programmatic user input, a plurality of user-defined application-specific properties, each said property being associated with one of said plurality of components;

receiving structured data input via a questionnaire, based at least in part on said plurality of components;

generating text based, at least in part, on the structured data, said generating text comprising dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part on user input; and

providing an application based on at least some of said plurality of user-defined application-specific properties and on said components associated therewith.


Description

FIELD OF THE INVENTION

The present invention relates to application generation systems in general.

BACKGROUND OF THE INVENTION

Many application generation and related systems are known in the art.

The Smart Medical Record.RTM. (SMR.RTM.) is a computerized patient record software program owned by HBOC. SMR.RTM. provides an interface which displays input templates, with which a user enters data. Text based on user input may be generated automatically, with sentence content being generated at runtime. SMR.RTM. is capable of generating both simple and compound sentences.

Applicant's provisional U.S. patent application Ser. No. 60/136,932, filed Jun. 1, 1999 and entitled "Application Generation System", of which the present application claims benefit, is hereby incorporated herein by reference.

The disclosures of all references mentioned throughout the present specification are hereby incorporated herein by reference.

SUMMARY OF THE INVENTION

The present invention seeks to provide an improved application generation system, along with related systems. In various preferred embodiments, the present invention seeks to provide multi-lingual capability, multi-platform capability. These capabilities and, preferably, other capabilities, are preferably provided using separate, typically relational database records and multiple cooperating text generation modules.

There is thus provided in accordance with a preferred embodiment of the present invention a method for generating an application, the method including providing a plurality of components, each component defining an application building block, storing, based on non-programmatic user input, a plurality of user-defined application-specific properties, each property being associated with one of the plurality of components, receiving structured data input via a questionnaire, based at least in part on the plurality of components, generating text based, at least in part, on the structured data, the generating text including dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, based at least in part of the components, and providing an application based on at least some of the plurality of user-defined application-specific properties and on the components associated therewith.

Further in accordance with a preferred embodiment of the present invention the generating text also includes automatically joining at least two of the plurality of simple sentences to form a compound sentence.

Still further in accordance with a preferred embodiment of the present invention each simple sentence is based on a user-supplied response to a question, the response being provided in the receiving step.

Additionally in accordance with a preferred embodiment of the present invention the storing includes receiving user input, wherein the user input is substantially non-textual.

Moreover in accordance with a preferred embodiment of the present invention the generating text also includes automatically generating text in more than one language.

Further in accordance with a preferred embodiment of the present invention the more than one language includes at least one left-to-right language and at least one right-to-left language.

Still further in accordance with a preferred embodiment of the present invention the more than one language includes a first language having a first syntactical structure and a second language having a second syntactical structure, and the first syntactical structure and the second syntactical structure are distinct.

Additionally in accordance with a preferred embodiment of the present invention the first syntactical structure has a first sentence structural order and the second syntactical structure has a second sentence structural order, and the first sentence structural order and the second sentence structural order are different.

Moreover in accordance with a preferred embodiment of the present invention at least a portion of the method is implemented in software adapted for execution on a computer.

Further in accordance with a preferred embodiment of the present invention the computer includes one of the following: a handheld computer, and a palmtop computer.

Still further in accordance with a preferred embodiment of the present invention the computer includes a keyboard-less pen-based handheld computer.

Additionally in accordance with a preferred embodiment of the present invention the computer includes at least one of the following: a computer running WINDOWS CE.RTM., a computer operating on a WINDOWS CE.RTM. platform, a PSION.RTM. handheld computer, a computer operating with an EPOCH.RTM. operating system, a PALMPILOT.RTM. computer, a handheld wireless communication computer, and a PALM VII.RTM. computer.

There is also provided in accordance with another preferred embodiment of the present invention a text generation method for generating text based, at least in part, on structured data, the method including generating a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, dynamically at runtime.

Further in accordance with a preferred embodiment of the present invention the generating includes automatically generating the plurality of simple sentences in more than one language.

Still further in accordance with a preferred embodiment of the present invention the more than one language includes at least one left-to-right language and at least one right-to-left language.

Additionally in accordance with a preferred embodiment of the present invention the more than one language includes a first language having a first syntactical structure and a second language having a second syntactical structure, and the first syntactical structure and the second syntactical structure are distinct.

Moreover in accordance with a preferred embodiment of the present invention the first syntactical structure has a first sentence structural order and the second syntactical structure has a second sentence structural order, and the first sentence structural order and the second sentence structural order are different.

Further in accordance with a preferred embodiment of the present invention at least a portion of the method is implemented in software adapted for execution on a computer.

Still further in accordance with a preferred embodiment of the present invention the computer includes at least one of the following: a handheld computer, and a palmtop computer.

Additionally in accordance with a preferred embodiment of the present invention the handheld computer includes at least one of the following: a computer running WINDOWS CE.RTM., a computer operating on a WINDOWS CE.RTM. platform, a PSION.RTM. handheld computer, a computer operating with an EPOCH.RTM. operating system, a PALMPILOT.RTM. computer, a handheld wireless communication computer, and a PALM VII.RTM. computer.

There is also provided in accordance with another preferred embodiment of the present invention a text generation method for generating a compound sentence from a plurality of simple sentences, the method including providing general logic defining compound sentence structure based on structure of simple sentences from which a compound sentence is to be generated, providing a plurality of simple sentences, and generating a compound sentence based on the general logic and the plurality of simple sentences.

Further in accordance with a preferred embodiment of the present invention each of the plurality of simple sentences reflects a continuation questions in a data-input questionnaire, and the generating step includes generating a compound sentence from at least two sentences including a first sentence and a second sentence, wherein the first sentence reflects data entered via one question in the data-input questionnaire, and the second sentence reflects data entered via a second question in the questionnaire, and wherein the second question is a continuation to one of a plurality of answers of the first question.

Still further in accordance with a preferred embodiment of the present invention wherein at least one of the following is not limited: a number of simple sentences related to continuation questions in the data-input questionnaire, and the levels of hierarchy of the continuation questions, the continuation questions being joinable to generate a compound sentence.

Further in accordance with a preferred embodiment of the present invention the generating a compound sentence includes automatically generating the compound sentence in more than one language.

Still further in accordance with a preferred embodiment of the present invention the more than one language includes at least one left-to-right language and at least one right-to-left language.

Additionally in accordance with a preferred embodiment of the present invention the more than one language includes a first language having a first syntactical structure and a second language having a second syntactical structure, and the first syntactical structure and the second syntactical structure are distinct.

Moreover in accordance with a preferred embodiment of the present invention the first syntactical structure has a first sentence structural order and the second syntactical structure has a second sentence structural order, and the first sentence structural order and the second sentence structural order are distinct.

Further in accordance with a preferred embodiment of the present invention the generating is based only on the general logic and the simple plurality of sentences.

There is also provided in accordance with another preferred embodiment of the present invention a data collection method for allowing data collection from multiple users, the method including providing a knowledge base defining at least one data-structured input questionnaire to each of a plurality of users, allowing each user to modify the knowledge base associated with the user, receiving structured input from each of the plurality of users, the input being based on the input questionnaire, storing the input from the receiving step in a textual form, and providing direct access to the stored input of a first one of the plurality of users by at least a second of the plurality of users, after the second one of the plurality of users has modified the knowledge base associated with the second one of the plurality of users, thereby altering the structured input associated with the second one of the plurality of users.

There is also provided in accordance with another preferred embodiment of the present invention a method for analyzing a text, the text including plain text generated by a text generator using a text generating method, the method for analyzing including reversing the text generating method, thereby determining a plurality of inputs which were provided to the text generating method in order to generate the text.

Further in accordance with a preferred embodiment of the present invention the generated text does not include any of the following indicators: an embedded ID, and a hidden character, the indicators indicating the questions and answers which caused generation of the text.

There is also provided in accordance with another preferred embodiment of the present invention a data access method including receiving data in hierarchical form, generating natural language sentences from sub-sentence elements based, at least in part, on the data in hierarchical form, storing the natural language sentences in textual form, and accessing the stored natural language sentences in textual form.

There is also provided in accordance with another preferred embodiment of the present invention a data access method including providing a data management system having questionnaire-structured data entry with multiple levels of hierarchy for allowing a plurality of users to manage data records including data records of a plurality of customers, storing data using the data management system, and allowing access to the stored data by at least one non-user of the data management system without use of the data management system.

Further in accordance with a preferred embodiment of the present invention the data management system provides text generation from sub-sentence elements.

Still further in accordance with a preferred embodiment of the present invention the data management system provides automatic generation of complex sentences from simple sentences.

Additionally in accordance with a preferred embodiment of the present invention the simple sentences include an unlimited number of sentences corresponding to continuation questions in the data-input questionnaires, and unlimited levels of hierarchy of the questions.

Moreover in accordance with a preferred embodiment of the present invention the data management system provides multi-lingual capability.

Further in accordance with a preferred embodiment of the present invention the access includes viewing at least one of the data records.

Still further in accordance with a preferred embodiment of the present invention the access includes updating at least one of the data records.

Additionally in accordance with a preferred embodiment of the present invention the updating includes updating by sending an electronic message to the data management system.

Moreover in accordance with a preferred embodiment of the present invention the electronic message includes an e-mail message.

There is also provided in accordance with another preferred embodiment of the present invention a record data structure including a database including a plurality of documents, each document including a plurality of sections stored in at least one of the following one word processing file, one word processing file object, at least one HTML file, at least one XML file, and a text file, the plurality of sections being arranged in a hierarchy.

There is also provided in accordance with another preferred embodiment of the present invention an application generating system including a plurality of components, each component defining an application building block, storage apparatus operative to store, based on non-programmatic user input, a plurality of user-defined application-specific properties, each property being associated with one of the plurality of components, input apparatus operative to receive structured data input via a questionnaire, based at least in part on the plurality of components, a text generator operative to generate text based, at least in part, on the structured data, including dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, and an application provider for providing an application based on at least some of the plurality of user-defined application-specific properties and on the components associated therewith.

There is also provided in accordance with another preferred embodiment of the present invention a computer-readable medium including a computer program, the computer program being operative, when in operative association with a computer, to perform the following steps: providing a plurality of components, each component defining an application building block, storing, based on non-programmatic user input, a plurality of user-defined application-specific properties, each property being associated with one of the plurality of components, receiving structured data input via a questionnaire, based at least in part on the plurality of components, generating text based, at least in part, on the structured data, the generating text including dynamic runtime generation of a plurality of simple sentences from a plurality of sub-sentence segments based, at least in part, on user input, and providing an application based on at least some of the plurality of user-defined application-specific properties and on the components associated therewith.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be understood and appreciated more fully from the following detailed description, taken in conjunction with the drawings in which:

FIG. 1A is a simplified functional diagram of a computer application constructed and operative in accordance with a preferred embodiment of the present invention;

FIG. 1B is a simplified block diagram illustration of a computer application constructed and operative in accordance with a preferred embodiment of the present invention, the apparatus of FIG. 1B generally corresponding to the primary data management mechanism 5 of FIG. 1A;

FIG. 2 is a simplified block diagram illustration of a preferred embodiment of a portion of the apparatus of FIG. 1A;

FIG. 3 is a simplified block diagram illustration of a preferred implementation of a portion of the apparatus of FIG. 2, comprising the question display component 225;

FIG. 4 is a simplified block diagram illustration of a preferred implementation of the template display component 220 of FIG. 2;

FIG. 5 is a simplified block diagram illustration of a preferred implementation of the navigation display component 215 of FIG. 2;

FIG. 6 is a simplified block diagram illustration of a preferred implementation of the question logic component 240 of FIG. 2

FIG. 7 is a simplified block diagram illustration of a preferred implementation of the template logic component 235 of FIG. 2;

FIG. 8 is a simplified block diagram illustration of the navigation logic component 230 of FIG. 2;

FIG. 9 is a simplified block diagram illustration of a preferred implementation of the knowledge-base database 140 of FIG. 1B;

FIG. 10 is a simplified block diagram illustration of a preferred implementation of the customer database 135 of FIG. 1B;

FIG. 11 is a simplified flowchart illustration of a preferred method of operation of the output text-generation mechanism 25 of FIG. 1A;

FIG. 12 a simplified flowchart illustration of a preferred implementation of the warm-up procedure 1100 of FIG. 11;

FIG. 13 which is a simplified flowchart illustration of a preferred implementation of the process answers 1110 procedure of FIG. 11;

FIG. 14 is a simplified flowchart illustration of a preferred implementation of step 1305 of FIG. 13;

FIGS. 15A and ISB, taken together, comprise a simplified flowchart illustration of a preferred embodiment of step 1115 of FIG. 11;

FIG. 16 is a simplified flowchart illustration of a preferred implementation of step 1120 of FIG. 11;

FIGS. 17A and 17B, taken together, comprise a simplified flowchart illustration of a preferred implementation of step 1125 of FIG. 11;

FIGS. 18A and 18B, taken together, comprise a simplified flowchart illustration of a preferred implementation of step 1130 of FIG. 11;

FIG. 19 is a simplified flowchart illustration of a preferred implementation of the text analysis mechanism 35 of FIG. 1A;

FIG. 20A is a simplified block diagram illustration of a preferred implementation of the decision support mechanism 50 of FIG. 1A;

FIG. 20B is a simplified flowchart illustration of a preferred method of operation of the apparatus of FIG. 20A;

FIG. 21 is a simplified flowchart illustration of a preferred implementation of the multi-lingual mechanism 60 of FIG. 1A;

FIGS. 22A and 22B, taken together, comprise a simplified block diagram illustration of a preferred implementation of the knowledge-base database 140 of FIG. 1B, which supports the multi-lingual capability described in FIG. 21;

FIGS. 23-25 are simplified illustrations of a typical customer record structure and particular examples of the use thereof, useful in understanding the present invention;

FIG. 26 is a simplified block diagram illustration of a preferred implementation of the knowledge base editor 45 of FIG. 1A;

FIG. 27 is a simplified block diagram illustration of a preferred implementation of the multi-user unsynchronized access mechanism 65 of FIG. 1A;

FIG. 28 is a simplified block diagram illustration of a preferred implementation of the decision support mechanism 50 of FIG. 1A; and

FIGS. 29 and 29B, taken together, comprise a simplified flowchart illustration of a preferred method of operation of the research and statistics mechanism 55 of FIG. 1A.

DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT

Reference is now made to FIG. 1A, which is a simplified functional diagram of a computer application constructed and operative in accordance with a preferred embodiment of the present invention. It is appreciated that the computer application may be implemented in any appropriated programmed computer system such as, for example, an appropriate personal computer including an operating system having a graphical user interface.

The embodiment of FIG. 1A comprises a mechanism for creation of data collection and management applications, using a small number of enabling components which serve as building blocks of said applications. This mechanism of FIG. 1A preferably comprises the following elements:

A primary data management mechanism 5 comprises the main mechanism of the embodiment of FIG. 1A. The primary data management mechanism 5 preferably comprises a mechanism which allows the user to enter data via structured, hierarchic questionnaires, stores the entered data temporarily in a hierarchical `language-less` representation, uses a text-generation mechanism in order to generate and preferably permanently store the data non-hierarchically, as complex textual output, preferably including generation of complex sentences from their sub-sentence segments and automatic joining of sentences to form compound sentences, and uses a text analysis mechanism to analyze and transform the textual output back into the language-less representation format, in which format the textual output is preferably stored permanently.

A preferred embodiment of the primary data management mechanism 5 is described further below with reference to FIG. 1B, which provides a Structural Overview of this mechanism, and with reference to FIG. 2, which describes the application enabling components used to achieve this function, the application enabling components are further described below with reference to FIGS. 3-19 and 23-25.

Auxiliary mechanisms 10 comprise a collection of additional mechanisms which are used in conjunction with the primary data management mechanism 5, or which comprise features and capabilities which result from the architecture thereof. These mechanisms are further described below with reference to FIGS. 20-22 and 26-29.

The primary data management mechanism 5 preferable comprises the following elements, whose function is also described as follows: data is preferably entered via a hierarchical questionnaire data input mechanism 15, which is a mechanism for displaying structured questionnaires. The function of the data input mechanism 15 is preferably achieved by a navigation mechanism 105 (FIG. 1B) and a display mechanism 110 (FIG. 1B), described below with reference to FIG. 1B.

Data entered as described above is preferably stored in memory, preferably in RAM, in a hierarchical language-less representation 20. Preferably, in the hierarchical language-less representation 20, only the ID of the questions, answers and continuation questions and answers, and other elements need be stored; the language-dependent text which the IDs represent need not be stored.

An output text generation mechanism 25 comprises a mechanism which allows for a two-way transformation: from the hierarchical language-less representation 20 into textual output, and back from said textual output into the hierarchical language-less representation 20. The structural relationship of the output text generation mechanism 25 with other elements of the system of FIG. 1A is described further with reference to FIG. 1B. The enabling components involved are further described below with reference to FIG. 2, and still further with reference to FIGS. 3-10.

This output text generation mechanism 25 preferably comprises the following: a text generation mechanism 30, which is described further below with reference to FIG. 1 and further with reference to FIGS. 12-18; and a text analysis mechanism 35, which is described further below with reference to FIG. 19.

Non-hierarchical storage as text 40 preferably comprises the output text which was generated by the text generation mechanism 30, and which is analyzed by the text analysis mechanism 35. It is in the format of the non-hierarchical storage as text 40 that the data is preferably stored permanently such as, for example, on an appropriate storage device such as a disk. The textual output storage preferably corresponds to a customer record document 115 (FIG. 1B), which is further elaborated in FIGS. 23-25.

The auxiliary mechanisms 10 preferable comprise the following mechanisms:

A no-programming knowledge base (KB) editor 45 preferably comprises a mechanism allowing the user of the system to create and modify, without any programming, the knowledge base which underlies and `drives` the hierarchical questionnaire data input mechanism 15 as well as the related corresponding text to be generated by the output text-generation mechanism 25. The no programming KB editor 45 is described further below with reference to FIG. 26.

A decision support mechanism 50, a research & statistics mechanism 55, and a multi-lingual mechanism 60 preferably comprise mechanisms which are made possible due to the fact that the data collected may be represented in the hierarchical language-less representation 20.

The decision support mechanism 50 preferably comprises a mechanism which automatically creates a programmable object-model which reflects the exact structure of the knowledge-base, which the user preferably created without any programming using the knowledge base editor 45, and is preferably operative to populate the user's data-entry selections onto this object model. It is thus possible to programmatically create complex conditions based on the data-entry, and to assign values to questions in the knowledge-base programmatically rather than manually. The decision support mechanism 50 is further described below with reference to FIGS. 20A and 20B.

The research & statistics mechanism 55 preferably comprises a mechanism which allows the user, without any programming, to perform complex queries on the customer database, comparing groups of customers, presenting the results in table or chart format, and deriving statistical conclusions from such comparisons. This mechanism is further described below with reference to FIGS. 29A and 29B.

The multi-lingual mechanism 60 preferably comprises a mechanism which allowing the system to display questionnaires in multiple languages, including right-to-left languages, and to generate and analyze text in these languages, including generation of sentences from their sub-sentence parts, and joining of sentences to form compound sentences. A knowledge base is created once in one language, and may then be semi-automatically be translated, such as, for example, by utilizing appropriate commercially available translation software into multiple languages. The multi-lingual mechanism 60 is described further below with reference to FIGS. 21, 22A, and 22B.

A multi-user unsynchronized access mechanism 65 preferably comprises a mechanism which allows multiple users to each modify the knowledge-base of the application to their likings and needs, and still be able to read and write into shared customer records, without synchronizing their knowledge bases. The multi-user unsynchronized access mechanism 65 is further described below with reference to FIG. 27.

A non-user access mechanism 70 preferably comprises a mechanism which allows non-users of the system to view and write into customer records of the application, without need for the application and its knowledge-base. The non-user access mechanism 70 is further described below with reference to FIG. 28.

The multi-user unsynchronized access mechanism 65 and the non-user access mechanism 70 are provided as a result of the systems capability of storing the hierarchical data in the form of the non-hierarchical storage as text 40, and the ability to analyze the text back into its hierarchical structure via the text analysis mechanism 35.

Reference is now made to FIG. 1B which is a simplified block diagram illustration of a computer application constructed and operative in accordance with a preferred embodiment of the present invention, the apparatus of FIG. 1B generally corresponding to the primary data-management mechanism 5 of FIG. 1A. The elements of FIG. 1B are typically implemented in an appropriate combination of hardware and software, as is well known in the art.

The application of FIG. 1B preferably comprises the following main functional elements: two databases (a knowledge-base (KB) database 140 and a customer-database 135), and a data access component 125 to access them; two user interface mechanisms, typically including a navigation mechanism 105 and an Input/display mechanism 110; an output text-generation mechanism 25; and a customer record document 115.

The customer database 135 typically comprises a plurality of customer record documents 115, such that all the data about each customer is preferably stored in one customer record document 115 object, which is retrieved at the beginning of the session, worked on locally, and saved back to the customer database 135 at the end of the session. Additional tables and fields in the customer database 135 duplicate some fields and tables found in the customer record document 115, for enhancing retrieval and statistics functions. The customer database 135 is shown connected to the remainder of the application of FIG. 1B by dashed lines, to indicate that it may optionally reside on a remote server, and may optionally be accessed over a network such as the Internet. The customer database 135 is further described below with reference to FIG. 10.

The knowledge-base (KB) database 140 preferably stores application and customer-record-structure data, and knowledge-base data required to display input templates, and to generate textual output according to user's selection and input, and to analyze text previously generated in this manner. A preferred implementation of the knowledge-base database 140 is described in more detail below with reference to FIG. 9.

The navigation mechanism 105 preferably receives user input, and allows the user to perform File Operations on the customer database 135, such file operations typically including: create-new, open-existing, and save customer record. These commands issued via the navigation mechanism 105 preferably cause the customer database 135 to create/retrieve a customer record document 115, and to present a copy of it as the customer record document 115, so that it can be worked on locally during the session, and to save it back to the database at the end of the session.

A second preferred function of the navigation mechanism 105 is to navigate to various parts of the customer record document 115 during the session, and to various knowledge-base input-display templates which are further described below with reference to FIG. 23. This action is actually preferably three-fold: (a) jumping to the right place in the customer record document 115, (b) instructing the display mechanism 110 to display the corresponding template, and (c) instructing the output text-generation mechanism 25 to work with the corresponding set of questions to generate the text.

A preferred implementation of the elements described immediately above is described below with reference to FIGS. 2, 5, and 8.

The display mechanism 110 preferably displays knowledge-base templates, each preferably comprising a plurality of questions of various types (multiple-choice, numeric, etc.), used typically for data entry. The display mechanism 110 preferably receives the instruction of which template to display from the navigation mechanism 105, retrieves the appropriate data, in the appropriate language, displays the retrieved data as a questionnaire, accepts the user's responses and data entry, and passes the responses to the output text-generation mechanism 25.

The display mechanism 110 also preferably displays a section of the customer record document 115, which is currently being edited, so that the user may view the text which is being generated in response to his selections, and allows the user (typically with some restrictions) to add free-text to it.

A preferred implementation of the display mechanism 110 is described in more detail below with reference to FIGS. 2, 3 and 4.

The output text-generation mechanism 25 preferably generates sophisticated natural language output, based on the user's selections and input to the templates displayed by the display mechanism 110, and on additional text-generation logic and parameters associated with each question and preferably stored in the knowledge-base database 140. This text generated during the session, is stored to the customer record document 115.

A preferred implementation of the output text-generation mechanism 25 is described in more detail below with reference to FIGS. 2, 6 and 7.

The customer record document 115 is preferably a document file or object, such as an MICROSOFT.RTM. Word document, or an HTML page or a collection of HTML pages, the structure of which is application-dependent, which contains all of the customer data. As mentioned above, preferably the customer record document 115 is retrieved from the customer database 135 at the beginning of the session, and saved back to the customer database 135 at the end of the session, allowing the application to be server-independent during the session. A simple hierarchy of the document (e.g. headings in a MICROSOFT.RTM. Word document), is preferably used to organize the data into sections of the record (which are application dependent), chronological log-entries etc., and the navigation mechanism 105 is preferably used to navigate to these various sections of the document. The data are preferably entered in a structured manner, using data-entry questionnaires and text-generation, but are preferably stored as simple text, such that they may be viewed by non-users of the system, without requiring any special software. A preferred implementation of the customer record 115 is described below with reference to FIG. 23, and examples of possible implementations which demonstrate the wide scope of data-collection and management applications which are supported by such an architecture are described below with reference to FIGS. 24 and 25.

Reference is now made to FIG. 2, which is a simplified block diagram illustration of a preferred embodiment of the navigation mechanism 105, the display mechanism 110 and the output text-generation mechanism 25 of FIG. 1B.

Preferably elements 105, 110, and 25, are implemented by six dedicated components (some of them in multiple instances), organized in a three-tiered architecture, as shown in FIG. 2 and briefly described below.

The navigation mechanism 105 preferably includes a navigation display component 215 and a navigation logic component 230. The navigation display component 215 preferably comprises a toolbar component 500 (shown in FIG. 5, described below), as is well known in the art, with buttons and combo-boxes, corresponding to the various sections of the customer record document 115, allowing the user to navigate to these sections, as well as to perform various workflow actions, and other actions related to the customer record documents 115. A preferred embodiment of the navigation display component 215 is described further below, and with reference to FIG. 5.

The navigation logic component 230 preferably jumps to locations in the customer record document 115, and identifies the template associated with that section in the customer record document 115, and activates various macros, and dialogue-screens, based on user input in the template display component 220. A preferred implementation of the navigation logic component 230 is described in more detail below, and with reference to FIG. 8.

The display mechanism 110 preferably includes a template display component 220 and a plurality of question display components 225. The template display component 220 preferably comprises a screen upon which the question display components 225 are displayed (for example, VBA.RTM. Form in an MICROSOFT.RTM. Office implementation, HTML page or ACTIVEX.RTM. Document, or Java application in an Internet implementation). The template display component 220 preferably calculates the number of question display components (QDCs) 225 required, their dimensions, and location, and creates said QDCs 225, and sets their dimensions and location properties accordingly. A preferred implementation of the template display component 220 is described in more detail below with reference to FIG. 4.

Each question display component 225 typically displays a question on the screen, allowing the user to make selections or enter data onto that question, creates, positions and displays, the various required screen elements 310 (for example, check-boxes, labels, text-fields, and so forth); and determines the behavior 315 of these screen elements 310, according to the `Type` property of the question, and various other KB parameters. A preferred implementation of the question display component 225 is described in more detail below with reference to FIG. 3.

The output text-generation mechanism 25 preferably includes template logic component 235 and a plurality of question logic component 240. The template logic component 235 preferably constructs in memory Virtual Template Record for multiple templates which are in use (collating this data which is found in multiple records in multiple tables), in the required language, creates sufficient instances of question logic components 240, and passes to each of the templates their question data. A preferred implementation of the template logic component 235 is described in more detail below with reference to FIG. 7.

Although for the sake of clarity of description the template logic component 235 is described herein as part of the output text-generation mechanism 25 of FIG. 1B, it may alternatively be considered that text-generation is one of the functions of the template logic component 235, not the only one, since the business-logic part thereof preferably supports the Display function as well. The most important example to that is that one of the functions of the template logic component 235 is to create the Virtual Template Record, which serves not only the text-generation but also the display.

The question logic component 240 preferably generates text based on user input made to the corresponding question display component 225. A plurality of question logic components 240 preferably collaborate and `communicate` (via their properties) to create, when appropriate, compound sentences, made of input of several question, and to analyze text previously entered by the user into the questions and answers which caused generation of such text. A preferred implementation of the question logic component 240 is described in more detail below with reference to FIG. 6.

Reference is now made to FIG. 3, which is a simplified block diagram illustration of a preferred implementation of the question display component 225 of FIG. 2. The apparatus of FIG. 3 comprises properties 300, which preferably hold various parameters, including the Type of the question, its data (question, answers, and so forth), and other parameters which define how it is presented on the screen, and behave. The properties 300 also preferably store the user's responses to the question (answers selected etc.).

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Question Display Component

I. Introduction

The Question Display Component (QDC) is the unit which presents the questions on the screen. It is built such that it can appear and behave as different question types which the system supports, and does so according to parameters which it receives (e.g. Type, Language, etc.). It displays questions in multiple languages, including languages with a right-to-left as well as left-to-right direction. In Edit mode, its appearance and behavior are different, as described below, allowing certain `dra` actions, which are used for editing the question. The following sections describe the structure and function of this control.

    II. Properties
    1. Question ID     Short Optional
    2. QuestionType    Byte  Currently about 10 types, in the future,
                             not more than 99.
    3. Question        20    Test of the question
    4. QuestionGroup   Short The Group to which this question belongs.
                             Used for the Check_Redundancy method.
    5. Answer (1-18)   25    12 fields with the text of the answers
    6. Response (1-18)       Stores the response of the user for each
                             answer. Used with the paging mechanism
                             (since there are more answers than are
                             displayed at once).
    7. ContinuationID  Short ID of the question or the template which
    (1-12)                   is the continutation. Affects the display
                             and behavior of the answers (if not null,
                             then "..." are displayed next to the
                             answer, and popup activated by click).
    8. XYCoordinates         Used only for Graphic type question.
    (1-12)                   Stores X and Y coordinates indicating
                             for each answer, to which region in the
                             RegionsBitmap it is associated with.
    9. Type (1-6)            Used only in `Mixed` type of question, to
                             indicate for each `answer`, which type of
                             question (e.g. text-field, combo-box) it
                             displays.
    10. AnswerTipText        Text that appears when pointing to an
    (1-12)                   answer
    11. QuestionTipText       Text that appears when pointing to the
                             question
    12. PagingStatus   Byte  Reflects which set of answer is currently
                             being displayed. Relates to the PgUp
                             PgDn mechanism.
    13. LanguageDirection Bool  Options: RightToLeft, LeftToRight
    14. Font                 Language dependent
    15. BackgroundBitmap       Used only in Graphic type questions.
    16. RegionsBitmap        Used only in Graphic type questions.
    17. SketchBitmap         Used only in Graphic type questions.
                             Stores the sketch drawn by the user. It
                             is displayed `overlaid` over the
                             background bitmap, but stored separately.
    18. Mode                 Normal (default), or Edit. When in Edit
                             mode, functions as the Question
                             knowledge-base editor


III. Display_Question method

The Display_Question method is activated by the TDC after finishing its Feed_Questions method.

The following steps are taken prior to activating the Display_Question method. First, the Organize_Screen method of the TC creates a sufficient number of QC units, and sets their properties so as set their size, location, and sequence on the screen. When a Template is opened, the TC reads it into the multi-dimensional array in the memory, using the ReadDB method. Finally, using the Feed_Questions the TC feeds the question data into the properties of each one of the QC. Specifically, at this phase, the Question and Answers(1-18) properties which contain the text of the question and text of the answers for this question, as well as various properties which determine the display mode are also fed to the QC.

After performing the Feed_Questions method, the TC calls the Display_Question of each one of the QCs, as described:

Method Steps:

1. Check the question Type and NumAnswers properties, and create the elements required for this question Type. If NumAnswers>6, then create screen elements sufficient to display 6 answers, and the PgDn and PgUp buttons (PgUp Visible=False). If NumAnswers<6, then create screen elements sufficient to display NumAnswers answers (no PgUp, PgDn buttons).

2. Check the question Type and LanguageDirection properties. Assign proper values to the dimension and location properties of the screen elements of the QC, so as to position them and set their dimensions according to the Type and LanguageDirection of the QC.

3. Check the LanguageDirection property. If=L-R (default), then set Alignment property of all Labels and text-fields of the QC to `Left`. Else, set it to `Right`. This, with the exception of Numeric Single Option, and Multiple Numeric Question Types, in which the text-fields are aligned `Left` regardless of the LanguageDirection properties.

4. Check NumAnswers, and load (up to) first 6 Answer properties to the 6 available Answer-Labels, and set Visible property of the appropriate number of these labels to True (so that no `blank` answer labels would be displayed). PagingStatus is set to =1.

5. If NumAnswers<7, then PgDn button Visible=False, else=True. PgUp button Visible=False in any case.

A detailed description of the Paging mechanism and its logic is described below with reference to the PgUp & PgDn Buttons.

Referring back to FIG. 3, the apparatus of FIG. 3 also preferably comprises screen elements 310 (for example, check-boxes, text-fields, labels) which preferably are created and positioned according to the type and LanguageDirection properties 300, and text strings from certain properties 300 are assigned to the corresponding screen elements 310 (e.g. AnswerLabel, QuestionLabel). User selection or input onto the screen elements 310, are stored back to the properties 300.

The following detailed examples relating to preferred embodiments of the present invention are not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Screen-elements & Their Dimensions & Location

Following is a description of the screen elements to be created for each question type, and their location, and dimensions. As is clear from the bitmaps below, each question type has two modes of presentation for left-to-right languages (e.g. English, this is the default), and for right-to-left languages (relevant only for Hebrew and Arabic). Screen elements for both are obviously the same, and their alignment is a mirror-image of each other. The text alignment within the elements is opposite, except for numerical fields, which remain left aligned in both language directions.

Multiple-Option, Yes/No, Negation, Negation Yes/No

6 Combo-boxes, 6 Answer-labels, Question label, PgUp & PgDn buttons.

Single-Option

6 Radio-buttons, 6 Answer-labels, Question label, PgUp & PgDn buttons.

Numeric Single-Option

6 Radio-buttons, 6 text-fields, 6 Answer-labels, Question label, PgUp & PgDn buttons.

Numeric Single-Option w/1.sup.st Textual Answer

6 Radio-buttons, 5 text-fields, 6 Answer-labels, Question label, PgUp & PgDn buttons.

Multiple Textual Questions

6 Answer labels, 6 Text-fields (no check-boxes or radio buttons, no PgUp & PgDn buttons).

Multiple Numeric Questions

6 Answer labels, 6 Text-fields, Question label (no check-boxes or radio buttons, no PgUp & PgDn buttons).

Multiple Single-Option-Questions

6 Combo-boxes, Question label (no check-boxes or radio buttons, no PgUp & PgDn buttons).

Multiple Mixed Questions

Up to 6 questions in any combination of types 4-6 above.

System-Check Style

6 check-boxes, 6 Answer-labels, Question label, Question (large) Check-box, PgUp & PgDn buttons.

Referring back to FIG. 3, behavior 315 of the screen elements 310 is also preferably defined by the type property of the question. The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Screen Elements Behavior

A. Answer Screen-Elements

Each click event on one of the answers causes seven actions:

1. Changing the screen status of the component (e.g. changing a check-box from unselected to selected appearance).

2. Changing the Response property which corresponds to the clicked answer. There are 18 Response properties in the QC, which corresponds to the 18 answers which is the maximum number of answers the QC may present. This property stores the user's response to the answer: text or number in a Textual or Numeric answer, Selected or Unselected in Multiple or Single option, and Selected, Unselected, or Selected-Negative in Yes/No question.

3. Registering the Response to the TC's Virtual Template Record. In addition to step 2 above, the QC also registers the response in the TC's Virtual Template Record in memory, so that when flipping between two templates, during the same session, the system retains the user selection and responses to the different templates, and can refresh the QCs correctly (part of the Feed_Questions method).

4. Changing the Selected (and/or SelectedNegative) property of the QC. This property stores the number of answers which are currently selected, and is updated with each click (e.g. if the answer was unselected, a click causes it to be selected, and in addition sets the Selected property: Selected=Selected+1). In a Yes/No question, the Selected property stores the total number of answers that were selected, including answers which were SelectedNegative. In a Yes/No question, when an answer is SelectedNegative, it updates the Selected property, as well as the SelectedNegative property of the QC, which stores the number of answers which were selected negative.

5. In some cases--modifying the display of other screen elements (e.g. selecting a Single-Option answer, un-selects all other selected answers in the QC).

6. Causes a Click_Generate_Text method of the respective QLC which generates (or regenerates) text reflecting the selected answers.

7. Causes a Show_PopUp Method of the TDC, if the answer has a continuation (if the Continuation property corresponding to the selected answer is Null). The QC assigns the PopUpQuestion, and PopUpAnswer properties of the TC, and activates the TC Show_PopUp method.

Following is a description of the specific actions and screen behavior in the different question types. The Click_Generate_Text, and Show_PopUp methods are activated in all question types, and are therefore not mentioned repeatedly below.

1. Multiple-choice Question Type

Behavior is standard. If the check-box was selected, a click event causes it to be unselected, the corresponding Response property is set to Unselected, and the QC's Selected property becomes (Selected-1). If the check-box was unselected, a click event causes it to become selected, the corresponding Response property is set to Selected, and assigns (Selected+1) to the QC's Selected property.

2. Multiple-choice w/Negation

The behavior is the same as above, but when the Negation answer (the first answer in the QC) is selected, it un-selects all other check-boxes in the question, and accordingly sets their corresponding Response properties to Unselected. Selecting any other answer in the question, un-selects the Negation answer radio-button, and sets its Response property to Unselected.

3. Single-option Question Type

If the answer was unselected, a click causes it to become selected, causes all other answers to become unselected, sets their corresponding Response properties to Unselected, and sets the Selected property to 1. If the answer was selected, a click causes it to become unselected (note: this is a non-standard component behavior), sets its Response property to Unselected, and sets Selected=0.

4. Multiple Yes/No

In addition to the 2 standard statuses of the check-boxes (Selected and Unselected), answers in this type of question have a third status which is `SelectedNegative`. In this status, the check-box appears empty (unselected), and the text (the label next to the check-box) appears in Strikethrough font, and red in color.

The Selected property stores the total number of answers selected, and the SelectedNegative property stores the number of answers which were selected negative (so the number of answers which were selected positive is=Selected minus SelectedNegative).

Behavior in response to a click is as follows:

If the answer was unselected, a click causes the check-box it to become selected, sets its Response property to Selected, and sets the QC's Selected property=Selected+1.

If the answer was selected, a click causes the check-box to become SelectedNegative: the check-box appears empty, the label font appears in Strikethrough and Red. The answer's Response property is set to SelectedNegative, the QC's Selected property remains unchanged, and the QC's SelectedNegative property=SelectedNegative+1.

This status of SelectedNegative is similarly achieved if the answer was unselected and was double-clicked.

If the answer was Selected Negative, a click causes its check-box to become unselected--the check-box appears empty, and the label font appears normal (black, and not in strikethrough). The answer's Response property is set to unselected, the QC's Selected property=(Selected-1), and the QC's SelectedNegative property=(SelectedNegative-1).

5. Yes/No Negation

When the negation option is selected, all other answers are set to unselected, and the Selected property is set to 1. Selecting any other answer, either as a Yes (Selected) or No (SelectedNegative), un-selects the Negation option.

6. Numeric Single-Option, & Numeric Single-Option w/1.sup.st Textual Option

Behaves same as Single-Option, with 5 additions:

Click on a Numeric field causes selection of the Radio-button of this answer, and triggers all corresponding actions (e.g. unselecting other selected answers).

Click on a Radio-button, moves focus to the Numeric field of this answer, and selects the content of this field (so that entering a number would automatically replace the existing contents of this field).

Click on a radio-button, or the numeric field of this answer, causes erasing all other numeric fields in the QC.

Clicking a radio-button or a numeric field, causes display of a very small Numeric Keypad underneath it (as shown in the bitmaps above).

If a number has been entered into one of the numeric fields, clicking on a radio-button of a different answer, causes copying the contents of this field into the numeric field of the newly selected answer, and erasing the contents of the previous numeric field (e.g. if the user entered `3 days`, and then clicks `weeks`, then the 3 is copied to the field next to `weeks` so as to say `3 weeks`, and erased from the field next to `days`).

7. Multiple Numeric Questions

Clicking into one of the short text fields, causes display of a very small Numeric Keypad underneath it (as shown in the bitmaps above).

8. Graphic Regions Type

Note the X and Y coordinates of the click. Compare these coordinates to the RegionsBitmap (stored in the property by this name). This bitmap has various regions, each in a different color. Check color at the clicked coordinates--this is the region which was clicked. Loop over the XY coordinates(1-12) properties, to check which of the answers resides in this selected region (i.e. has the same color). The answer which matches is the selected answer, mark the respective Selected(n) property as selected.

9. Graphic Points Type

Note the X and Y coordinates of the click. Compare these coordinates to the 12 XY coordinates(1-12) properties, if the click occurred within the proximity of one of these points. The radius distance to check is user defined in the configurations options of the system. If an answer resides within this radius from the coordinates of the click, then it is selected. Mark the respective Selected(n) property as selected, and display a visible graphical marker (e.g. dot) at these coordinates.

10. Graphic Sketch Type

A click and drag action causes drawing a free-hand style line on the screen. If this line creates a closed shape, then it is treated as a region. If it is only a click, or a very short line (i.e. the used intended a click but his hand moved slightly), it is treated as a dot. Else, it is treated as a line. For each such event, draw the shape and insert it into the session document. Note the X and Y coordinates of the click. Compare these coordinates to the 12 XY coordinates(1-12) properties, if the click occurred within the proximity of one of these points. The radius distance to check is user defined in the configurations options of the system. If an answer resides within this radius from the coordinates of the click, then it is selected. Mark the respective Selected(n) property as selected, and display a visible graphical marker (e.g. dot) at these coordinates. In addition, select the regions in which the markings occur, as in a simple Graphic Regions type.

Referring back to FIG. 3, the apparatus of FIG. 3 also preferably comprises a paging mechanism 305 which preferably allows the user to flip to the next/previous set of answers which can be displayed at once, assigning the strings of the set of answers to be viewed from the properties 300 to the screen elements 310, and storing the user's selection of the of the current set of answers, and paging-status to properties 300.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Paging Mechanism

The QC supports display of up to 18 answers (except for certain types which are limited to 6, as specified above). The question record in the database supports 12 answers per question, but the QC supports display of an additional 6 answers, so that the user may temporarily add answers to the question during the session. Of these 18 questions, a maximum of 6 may be displayed on the screen at once. A paging mechanism is therefore needed, which manages the Page-Up and Page-Down actions, which is triggered by click event of the PgDn and PgUp buttons. This mechanism is designed to provide efficient and database-autonomous activity of the QC, and functions as follows:

The QC has only 6 sets of screen components for displaying maximum 6 answers at a time (e.g. 6 check-box and 6 answer-labels).

The QC has 18 Answer and 18 Response properties, corresponding to the potential 18 answers which the QC can support.

The Answer properties hold the text to be displayed in the Answer-labels, which are displayed next to the check-boxes or radio-buttons (in a similar manner to the caption property of standard check-boxes or radio-buttons).

The Response properties store the status of the user's response to that answer. This is different for different question types--for example: Selected and Unselected for single-option and multiple-option; Selected, Unselected, and SelectedNegative for Yes/No question type; and store the Value entered for a Numeric or Textual question.

Since only 6 out of the potential 18 answers are displayed at a time, the QC's PagingStatus property stores the six-answer-set number: when the first set of up to six answers is displayed, PagingStatus=1, when answers 7-12 are displayed PagingStatus=2, and when answers 13-18 are displayed PagingStatus=3.

During the Feed_Questions method of the TC, the TC feeds the 12 Answer property of each QC with the answers which that question has (which may be 12 or less answers). From this point onwards, the QC is autonomous from the TC and from the database, and doesn't need to access the TC or the database when paging up or down to display answers other than those currently displayed.

During the initial QC's Display_Question method, the QC checks the number of answers in the question, and feeds (up to) first 6 Answer properties to the 6 available Answer-Labels, and sets Visible property of the appropriate number of these labels to True (so that no `blank` answer labels would be displayed). PagingStatus is set to =1.

When the user clicks to select or deselect answers, or enters numbers or text to a text-field on the QC, this response is stored in the Response property which corresponds to this answer.

When the PgDn button is clicked, the system performs the following actions:

Checks PagingStatus property

Displays the next set of up to 6 answers according to the PagingStatus property (i.e. if =1 display answers 7-12, if =2 display answers 13-18)

Displays the corresponding user responses, based on the corresponding Response properties (e.g. checks the response properties for the set of answers which is being displayed, and sets check-boxes, and radio-buttons as Selected, Unselected, or SelectedNegative, and/or displays text or numbers in corresponding text-fields in the QC).

Sets PagingStatus=PagingStatus+1

Checks NumAnswers property, to find out if there is another set of answer to be displayed beyond the current set (e.g. If PagingStatus now equals 2, and NumAnswers=15, this means that the current set of answers displayed is 7-12, and the question has a total of 15 answers, so there is another set of 3 answers to be displayed). If so, PgDn button remains Visible=True. If not (this is the last set of answers), then set PgDn.Visible=False.

When the PgUp button is clicked, the system performs the following actions:

Checks PagingStatus property

Displays the previous set of 6 answers according to the PagingStatus property (i.e. if =2 display answers 1-6, if =3 display answers 7-12).

Displays the user responses to these answers, based on the corresponding Response properties, as explained above.

Sets PagingStatus=PagingStatus-1

If PagingStatus property>1 (this is not the first set of answers 1-6), then PgUp button remains Visible=True. If PagingStatus=1 (this is the first set of answers), then set PgUp.Visible=False.

Reference is now made to FIG. 4, which is a simplified block diagram illustration of a preferred implementation of the template display component 220 of FIG. 2.

The apparatus of FIG. 4 comprises properties 400 which preferably store all parameters needed for the display of the template (e.g. template name, type, format parameters, etc.), and ID's of the questions belonging to the template.

The apparatus of FIG. 4 also preferably comprises a template form 405 which preferably comprises a form (VBA.RTM. form in the MICROSOFT.RTM. Office implementation) upon which the questions are displayed. The template form 405 preferably contains a paging mechanism to flip through sets of questions, when there are more questions than can be viewed at once.

The apparatus of FIG. 4 also preferably comprises organize screen 410, which is a method which assesses the number of questions in the template, creates accordingly sufficient instances of QDC 225 of FIG. 2, calculates the dimensions and location of the questions according to various parameters, and assigns appropriate values to these QDCs 225. Some of these calculated values are stored back to properties 400.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Organize Screen Method

The Organize Screen method calculates (in a manner described below), the number of questions which can be displayed on the screen at once, their dimensions (height & width), location on screen, and logical sequence (which is vital for correct display of questions and text generation). It also includes a `Stretch` function which changes the size of the elements on the screen according to resolution and window size. Preferably, a commercial OCX is bought and used for this purpose. The function takes into account the fixed minimal size of the QCs, calculates how many fit on the screen, and then resizes them accordingly.

Method Steps:

1. Check window-size and screen resolution. Check properties: TopMargin, BottomMargin, SideMargin, MinQuestionHeight and MinQuestionWidth.

2. Calculate appropriate Question dimensions, based on the above properties, and determine the number of questions that fit on the screen.

3. Check Language property, and according to the language direction (all languages except Hebrew and Arabic are left-to-right), calculate the correct sequence of questions on the screen. (i.e. fit as many questions as you can across, in the direction of the language, then next row, etc.).

4. Create sufficient number of QC components, as a control-array, according to the above.

5. `Position` the QC's correctly on the screen, by assigning appropriate values to their dimensions and position properties. Assign their Identity properties, according to their correct screen sequence (so that they `know` where they are).

The exact size of the question (minimum dimensions), and length of the question and answer fields both in the database, as well as in the editing mode of the question, is dependent on how many questions naturally fit on the screen. A baseline standard may be 600.times.800 resolution, with 4 questions in a row, and 3 rows on the screen, and where each question has 6 answers and a Heading. The database and edit KB fields should be limited accordingly.

Referring back to FIG. 4, the apparatus of FIG. 4 also preferably comprises show pop-up 415, which preferably comprises a method which is used to display a pop-up of one or more questions. It calculates the desired screen location of the pop-up, and then creates positions and sets dimensions of QDCs 225 accordingly.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Show PopUp Method

When an answer is clicked, which has a continuation (i.e. its respective ContinuationID(n) < > null), its QC assigns its Identity property to the PopUpQuestion property of the TC, and the number of the answer which triggered the pop-up (1-12) to the TC's PopUpAnswer property, and its ContinuationID(n) property to the TC's PopUpID property, and then activates the TC's Show-PopUp method.

Method Steps:

1. Look-up the template in the Multi-Dimensional-Array in memory, according to the PopUpID property.

2. Calculate the screen location of the popup, according to the PopUpQuestion and PopUpAnswer properties, and the calculations done in the Organize_Screen method (screen resolution, language, window size, etc.), and number of questions in the pop-up template to be displayed. This is done according to the following considerations (3-6):

3. A single popup is to be located to the right of the Question triggering the popup if possible, to its left if not possible (the reverse in right-to-left languages). The Question label of the popup is at the level of the triggering answer if possible (if the triggering question is at the bottom of the screen, this may not be possible).

4. A single popup is always at the width of a standard question, but its height is dependent on the number of answers in it.

5. A multiple popup is displayed as a screen which contains the appropriate number of questions. The header of the screen (appears as the blue stripe at the head of standard WINDOWS.RTM. screens), contains in white, the answer which triggered the pop up. TC needs to create this window, at the right dimensions, according to the number of questions to be displayed in it.

6. Multiple popup is displayed to the left of the triggering answer if possible. Else, positioned such that if possible it at least does not cover the triggering question.

7. Create the required number of QCs needed to display the pop-up questions. These QCs are created as a component array, which continues the array of the QCs in the basic template, and their Identity property reflects their number in the array. For example, if there are 12 questions in the basic template, and the popup has 2 questions, then these would be created as QC(13), and QC(14), and their Identity property would be set to 13 and 14 respectively. This sequence is important for the text generation process.

8. Position questions on the screen according to the considerations mentioned above.

Feed the QC's their data properties, and activate their Display_Question method.

Reference is now made to FIG. 5, which is a simplified block diagram illustration of a preferred implementation of the navigation display component 215 of FIG. 2. The apparatus of FIG. 5 preferably comprises the elements described below.

A toolbar control 500, the structure of which is typically application dependent, preferably allows the user to navigate to various parts of the customer record document 115, and activate various dialogue screens, and utilities described below.

File-action dialogues 505 are preferably invoked by corresponding buttons on the toolbar, which allow the user to create a new customer record 535, open an existing one 540, save & sign a session 545, or print parts of the customer record 550.

Workflow dialogues 510 are preferably invoked by corresponding buttons on the toolbar, which allow the user to perform various workflow actions such as, for example: send E-mail 555, log a call 560, schedule an appointment 565, add task 570, request task 575, set reminder 580, and send pager 585.

Section navigation 520 preferably comprises a set of buttons, which jump to various sections of the customer record documents 115. Their number, sequence, identity and icons are application dependent.

Session navigation 525 preferably comprises a mechanism made of a combo-box and 4 buttons which allow the user to jump to previous-sessions, images, scanned documents, or letters.

Utilities 530 preferably comprises a group of buttons which invoke various utilities.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Navigation Display Component

The Navigation Display Component (NDC) is a Toolbar control, which allows the user to activate most of the functions needed operate the application. As its name suggests, its main function is to provide an easy method to create-new, open, close the customer record document 115, and to `jump` to its various parts. Technically, in the PC version, it is a simple MICROSOFT.RTM. Word toolbar.

In order to maintain a solid three-tiered architecture, this component is purely a display control. All the functions called by it, are performed by a different control, the Navigation Logic Control, which is described below. Retrieval and manipulation of data access needed for its display (e.g. populating combo-boxes on it), is handled by the Data Access Component described below. This section will therefore briefly describe appearance of the buttons in the control.

The exact format of the toolbar is application dependent, data-driven, and may be modified by the user. The Application record in the knowledge-base holds various parameters which effect which buttons and options appear on the toolbar etc.

When a record is opened, or is switched to, in MICROSOFT.RTM. Word, it triggers the NDC, which checks if this is a regular MICROSOFT.RTM. Word document, or if it is based on one of the templates which belong to the application (there may be several applications, e.g. User's record, Ayurvedic record, etc.), each with their own MICROSOFT.RTM. Word template. So the NDC appears only when a Customer record (or other similar application) is viewed, but not when other regular MICROSOFT.RTM. Word files are viewed.

Preferably, the MICROSOFT.RTM. Word Template, or each document, contains a field `ApplicationID` which indicates the application to which it belongs. The NDC checks this field when opening or switching to a MICROSOFT.RTM. Word document, and acts accordingly. The NDC appears only if it is an application file, and not if it is a regular MICROSOFT.RTM. Word document (i.e. the field ApplicationID exists). The buttons on the NDC, their sequence, icons, etc., are configured automatically according to the ApplicationID in the document, which points to the Application record in the knowledge-base that stores this configuration information.

The buttons on the toolbar are organized in functional groups (i.e. group of buttons which share a similar type of function), according to the MICROSOFT.RTM. convention. Following is a description of the buttons in each of these groups.

1. File Action Dialogues:

File Action Dialogues include `New Customer`, `Open Customer`, `Sign & Save`, and `Print` buttons. These use the standard MICROSOFT.RTM. Office icons. Note: although these buttons are similar to the standard MICROSOFT.RTM. Word ones, they bring up non-standard dialogues (described below in the `File Action and Workflow Dialogues` section). However, this is dependent on the MICROSOFT.RTM. Word document which is currently being viewed. When a non-application MICROSOFT.RTM. Word file is viewed, NDC does not appear, and these buttons bring up the standard dialogues.

2. Section Navigation:

Section Navigation includes group of buttons for jumping to various Sections of the record. A clicked button remains depressed until another button is pressed. Clicking it while it is pressed does not un-press it. The first button in this group is pressed by default, when opening a record. The number of buttons in this group, and their icon and action (i.e. to which section in the document they are associated), is defined by the Application record in the KB.

When displaying itself, this component checks the Application record in the knowledge-base database, for the section structure of the record, and displays the appropriate number buttons, one for each section, in the proper sequence, and with the bitmap specified. The TipText property for each button is set to the name of the section.

The first icon in this group is `New Session`. Its icon is a `page` with the star on its left upper corner (using the MICROSOFT.RTM. Access metaphor for a new object--form, table, etc.).

The last icon in this group is `Browse Previous Sessions`. It jumps to the `Previous Sessions` section of the record. The actual navigation between the different sessions, is performed by the Session Navigation group discussed below. Its icon shows three overlapping pages representing multiple sessions.

Five sections which frequently exist in customer record documents 115 (and other applications), and for which icons need to be found/prepared are:

1) Status Sheet (includes summary information of the record, problem-list, medication list, etc.). Creative Icon should be designed/selected accordingly.

2) Demographics. Icon of face in profile.

3) Habits. Icon of a burning cigarette.

4) Lab Tests. Icon of a table/matrix.

5) Vital-Signs (graph of blood-pressure, temperature, etc.). Icon of ECG.

3. Session Navigation

This group includes three buttons, and to their right, one combo-box. The buttons allow the user to select navigation of:

1) Scanned documents (icon showing `one page`)

2) Images (icon showing `lungs in x-ray`)

3) Previous Sessions (icon showing three overlapping pages, symbolizing multiple session).

The combo box shows a list of hyperlinks to the sessions, or scanned documents, or images, depending on which button is pushed. This list is calculated by the TLC, when a customer record document 115 is opened.

When one button is pressed the other two buttons are not pressed. The default is the `Sessions` button. Pressing one of the buttons causes the `Previous Sessions` button of the previous group to be pressed.

If the record is configured such that it does not include images or scanned documents, but only the MICROSOFT.RTM. Word document (which is frequently the case), then the three buttons do not appear, only the combo-box. In this case, the `Previous Session` button works directly with the combo-box.

The behavior of this combo-box is not standard. When typing letters into its search-field (i.e. its text-field), it narrows down the list in the following manner:

Items in which any word begins with this string, not necessarily the first word, are included in the filtered list (e.g. typing Pain would cause item `Chest Pain` to be included).

Items which contain several words, and in which the entered string holds the first letter of several consecutive words in the item (not necessarily all words) are included (e.g. typing MI would cause the item `Myocardial Infarction` to be included).

The letters in the search string appear, e.g. in bold and dark green in all the items in the list, so that the user may easily see why they were included.

The response of this mechanism must be instantaneous, and checked against very large lists (100,000 items). It will be used in various places in the system, and therefore must be technically sound.

4. WriteSession Navigation

The Write-Session Navigation group deals with actions required when writing a new session. It includes up to 5 buttons, and a combo-box. The combo-box displays a list of all available templates, for the user to select which template to work with. The buttons allow the user to select a sub template if this template has sub templates.

The combo displays at the top of the list, above a separating line, the templates previously used by this customer, or templates which appear in his current Problem List (which of these options this is defined in the Options configuration). Below the separating line the rest of the templates are listed alphabetically (this is similar to the way recently used fonts appear in the font combo-box in MICROSOFT.RTM. Word). Selecting from the list is done using the mechanism described above for the Session combo.

Templates may exist with or without sub-templates. If the selected template is without sub-templates, then the buttons are grayed-out. The number, sequence, identity and icons of the sub-templates is application dependent, and template independent (i.e. all templates in an application which have sub-templates will have the same sub-templates; different applications may support different sub-templates). This information about the sub-templates is stored in the Application record in the KB. The template record indicates if it has sub-templates, but not their name, icon, etc. Thus the NDC checks the application record in order to configure the buttons correctly, and the template record in order to decide if the buttons should be grayed-out or not.

When there are sub-templates, one button is always pressed. Pressing one button releases a second button. Clicking a pressed button, does not release it.

When a template with sub-templates, is opened for the first time in a session, the button for the first sub-template is pressed. When returning to a template visited before in the same session (i.e. flipping back and forth between templates), the template opens on its last-viewed sub-template.

When switching to a template not previously visited, the template opens on the same sub-template as the sub-template viewed in the previous template (e.g. when viewing the Objective sub-template of the Fever template, and switching to Cough template for the first time, it opens on its Objective sub-template).

The link between this mechanism and both the templates being used, as well as the location in the Session document being viewed, is handled by the Navigation Logic Component (NLC), described later.

5. Insert Object

The Insert Object group includes only one control, a combo-button (i.e. a button, with a small pull-down arrow next to it, same at the standard Font Color button in MICROSOFT.RTM. Word). When the pull-down arrow is pressed, a pull down menu appears with the Icons of the different objects which may be inserted into the current session document, which include Picture, Bitmap, Audio, Video. Once a selection is clicked, it performs the action of inserting the object at the location of the cursor, and becomes the default button image, so that future insertions of the same type of object will require only one click.

6. Workflow Actions

The Workflow Actions group supports actions, represented by respective buttons, which support workflow issues relating to the customer whose record is currently being viewed. These buttons include: Call, Send E-Mail, Schedule Appointment, Add Task, Request Task, Set Reminder, Send Pager.

The icons for the first five buttons (Call, E-mail, Appointment, Task, and Request Task), are the standard Outlook icons. The icons for Reminder and Pager needs to be found/designed (for Pager--an icon showing a pager `beeping` from its right upper corner, for Alert--e.g., a knot on a finger). Clicking each of these buttons activates respective workflow dialogue screens, which are described below.

7. Utilities

The Utilities group of buttons on the toolbar relates to general actions in the record, i.e. actions which do not relate to the currently open record (the actions are described in the TLC section). These buttons include:

1) Reference (icon shows books)

2) Help (standard Help icon)

3) Options (icon: maybe showing tabs)

4) Knowledge-base Editor (VB's toolbox icon)

File Action and Workflow Dialogues

Activated from buttons on the TDC are 4 File Action, and 7 Workflow dialogue-screens, which are described in this section. These dialogues are similar to to the office standard ones, but with some modifications which are specified here.

The File-Actions dialogues are similar to the standard MICROSOFT.RTM. Word dialogues, but with the differences mentioned below. The Workflow dialogues are created using MICROSOFT.RTM. Outlook Forms, using Outlook's Object Model, and VB-Script, and should require very little programming. The following `screens` are preferably created using the MICROSOFT.RTM. Outlook forms, so that they can be easily modified by users without any programming.

This section describes the display of the dialogues and not their actions. The functions carried out by the Workflow and File Action dialogues, are handled by the Workflow Module, and the Navigation Logic Component respectively.

I. Create New Record Dialogue

Clicking the `New` icon on the NDC, brings up a Yes/No/Cancel Message-Box "Create a new Customer Record?" Click `No` to create a regular MICROSOFT.RTM. Word document". Otherwise, there wouldn't be a simple way to create a regular MICROSOFT.RTM. Word document while working on Customer one.

II. Open-Record Dialogue

Shows a list of customers, organized in `folders`, using MS metaphor for directory folders, but in truth reflecting the category the customers belong to in the database (DB).

The `Advanced` button leads to a simple search screen, similar to the one on MICROSOFT.RTM. Word, but in the `Property` field, there is in additional to the MICROSOFT.RTM. Word fields, also a list of all the user defined fields.

The mail list of files displayed includes the following fields: Name, ID, Age, Sex, Provider, Modified (date last modified).

The list-display mechanism is exactly as in the standard dialogue, allowing sorting by clicking the head of a column (e.g. sort by date last modified by clicking on the head of that column).

The filtering mechanism is slightly different. Instead of the `File` and `Text or Property` search fields, and the `File type` combo-box, are two fields: a `Filter by` combo-box, and a `Contains` Combo-box. The `Filter By` combo, includes all the fields displayed in the list, plus a `Full text search` option (the first option and default is `Name`). The `Contains` combo is empty, and the user types the search string into it. The combo list shows several previous entries (similar to the standard `Text` combo). When no one folder is open, all folders are searched and displayed. The `Last Modified` combo remains as is.

III. Sign Session Dialogue

A simple dialogue which shows 4 radio-button options, listed below, and OK/Cancel buttons. The first option is the default.

1) Save and sign session, close record.

2) Save session without signing, close record.

3) Save and sign session, don't close record.

4) Save session without signing, don't close record.

IV. Print Dialogue

Displays a simple OK/Cancel dialogue which presents the following single-option selections, indicating what should be printed. One of the options is selected by default, depending on where in the record the Print button was pressed:

1) Current session--the default when clicked from current session view.

2) Session, prescriptions, letters, orders

3) Prescription--the default when

4) Scanned document--default when viewing attached ACROBAT.RTM. PDF file

5) Selection--when part of the record has been selected

6) Entire record without images--the default when not any of the above

7) Entire record including images

8) Pages_ to .sub.--

V. Send E-Mail

The basic dialogue is like the standard one. However, the `Select Names` dialogue which pops-up when clicking the `To . . . ` or the `Cc . . . ` buttons, is slightly different. The combo-box at its upper right hand comer (`show names from`) should have several options which effect the list of names displayed: (a) Medical Team--shows a list of all caregivers in the local clinic, (b) Consultants--shows remote caregivers, and (c) Contacts/Outlook Phonebook--the `regular` options. The default is `Medical Team`. At the head of all three lists (or at least the first two) is the customer, preferably in bold.

A combo box `Attach:` has the following options: Attach entire record, Attach last encounter, Attach selection, Attach letter, or Hyperlink to record.

Underneath, there are two `Attach Options` check-boxes: `Include scanned documents`, and `Include embedded objects`.

VI. Call

Places a call to the customer using the standard Outlook dialogue, exactly as it appears and functions when placing a call from the Contacts screen in outlook (including the built-in combo which allows quick glance at the different numbers the contact has, the Redial option which shows last numbers called, and the dialogue which pops-up if you click the button itself).

The only difference is that on the `New Call` dialogue, if the `Create new Journal entry when starting call` option is selected (this is the default), then rather than starting an Outlook Journal entry, it starts a new Session in the Customer Record, and opens on a Template called `Phone Session` (the knowledge-base will have a specific template designed for phone sessions).

VII. Schedule Appointment

The functionality is based on Outlook's Appointment Scheduling screen, but with the following differences:

1. The meeting to be scheduled is with the customer, and with the User, so there is no need to select these participants.

2. With the standard dialogue, it is necessary to send an e-mail invitation, which is very cumbersome. There should be no error message if there are no e-mails for participants, just a check-box which is empty on default, and which gives an option to send an invitation.

3. Assigning resources: the list of resources should be separate (when you are looking for a resource) it should not be with all the other contacts. There should be an easy way to add a resource. And, as above, a resource may not have an e-mail (e.g., a table and a meeting-room usually do not).

VIII. Add Task

Unlike the other Workflow actions, this one works not only with outlook, but also with a List in the customer MICROSOFT.RTM. Word document record. This list is handled using the List type QC mechanisms, and has in addition to the Subject column, additional columns: Start date (automatically records the date the task is initiated), due date, priority, and `In charge` which is described in the next section.

1. Task Subject should include the Customer Name followed by a colon,

2. A combo-box, next to the subject field, allows the user to select from a list of frequently used customer tasks. Selecting an item adds it to end of the Task Subject (e.g. "John Doe: Pending lab results"). The user may obviously also modify the Subject field directly (and if he does so, it doesn't effect the combo).

3. This combo-box appears minimized next to the Subject line: its width is such that only the arrow-down is visible. The width of the pull down is much wider so that it can contain 5-6 words. On `Change` event in the combo, the subject line changes accordingly.

4. Due Date

5. Priority

6. Check-box: `Update my general Task List`. If it is clicked then the task is created and stored to my Outlook Task list, as well as to the Customer's Record Task List. If not, it is recorded only in the Customer record.

7. When right clicking on the combo, an option in the popup-menu is `Edit List`, which brings up a simple dialogue which allows the user to add items or remove items from the list.

8. In outlook, in tasks, create `Customer Tasks`, which is used to see the Tasks without the reminders (i.e. filters for Categories=CPR, but < > Reminder).

IX. Request Task

The goal of this form is to allow the user to request a task from the customer or other team members. It is generally very similar to the Add Task form described above, with the following differences:

1. There is an additional `To . . . ` button and field before the other fields mentioned in the previous section. When pressed the `To . . . ` button displays the same screen displayed by the E-Mail dialogue described above (with a list of other care-givers and the customer at the top of the list).

2. The person to whom the task was assigned, appears in the `In Charge` column, in the copy of the task which appears in the customer record (described in the previous section).

X. Set Reminder

The reminder mechanism, is technically a Task with its Reminder property set on, and to the date the reminder is required. Its Category is set to `Reminder`, so that a different view can be designed for viewing regular tasks, as opposed to Reminders (which usually do not need to be viewed).

It is similar to the Add Task form, with the following differences:

1. Below the subject field and frequently selected tasks combo-box, there are date and time fields.

2. No check-box option (`Update my general Task List`), since the reminder is not noted in the customer record, but only to outlook. Also, no `Due Date`

3. Category is set automatically to `Reminder`.

XI. Send Pager

Similar dialogue to the Send E-mail dialogue. All this does is send a pager to `E-Mail Enabled` Pagers (i.e. pagers which have an e-mail address, such as Skytel in the US). The `To . . . ` lists (Local Staff, Consultants, and All) display only people which have e-mail pagers (create a user defined field in Outlook called `Pager` Y/N, and filter according to it).

Reference is now made to FIG. 6, which is a simplified block diagram illustration of a preferred implementation of the question logic component 240 of FIG. 2. It will be appreciated by persons skilled in the art that the apparatus of FIG. 6 is in some respects central to a preferred embodiment of the present invention. As indicated in FIG. 2, the output text generation mechanism 25 of FIG. 2 preferably comprises multiple instances of the question logic component 240, which is the apparatus described in the present drawing in a preferred implementation.

The apparatus of FIG. 6 preferably comprises warm-up 605, which preferably comprises a method performed by a question logic component 240 of FIG. 2 once, prior to the actual text-generation, and in preparation for it, so that calculations as to which sentences can be connected, will not slow down the text generation process. A preferred implementation of the warm-up 605 is described in reference to FIG. 12.

The apparatus of FIG. 6 also preferably comprises generate text 610, which preferably comprises a complex mechanism, by which the question logic components 240 of FIG. 2 generate sentences 630, generate branches 635 and join sentences 640; a preferred implementation of this process is further described in FIGS. 11-17B.

The apparatus of FIG. 6 also preferably comprises analyze text 615, which preferably implements a process by which text which was generated by the text-generation mechanisms (e.g. text of previous sessions), is analyzed into the questions and answers which caused its generation. A preferred embodiment of analyze text 615 is described below with reference to FIG. 19.

The apparatus of FIG. 6 also preferably comprises object-model management 620, which enables the decision support mechanism 50 of FIG. 1A. This apparatus preferably comprises procedures and structure which allow the application to create 645 and populate 650 an object-model which reflects the structure of the knowledge-base, so that queries alerts and conditions may be written that manipulate the customer record document 115 content programmatically. A preferred embodiment of object model management 620 is described below with reference to FIGS. 20A and 20B.

The apparatus of FIG. 6 also preferably comprises KB editor 625, which is preferably comprised in the no-programming KB-editor mechanism 45 of FIG. 1A. The KB editor 620 preferably comprises procedures and structure which allow the application to create and edit questions, as part of the general knowledge-base editing process. A preferred embodiment of the knowledge-base (KB) editor 625 of the question logic component is described below with reference to FIG. 26, with special reference to question editor 2605 of FIG. 26, and its dependent elements 2620, 2625, 2630, 2635, and 2640 of FIG. 26.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Question Logic Control

Introduction

Preferably, behind each Question Display Component (QDC), and corresponding to it, is a Question Logic Component (QLC) unit which performs the `magic` of generating the text according to the user's selections (which the user made on the corresponding QDC). The text it generates is dependent on parameters which it receives (e.g. Type, Language, etc.).

In addition to generating its own sentence, it also works in cooperation with neighboring QLCs, to determine if and how the sentences can be combined into compound sentences. In addition, it is capable of analyzing text previously generated by the system, to determine which answers to which questions caused the generation of this text.

It generates text in multiple languages, including languages which are right-to-left as well as left-to-right in their direction. In Edit mode, it modifies the question, its answers and other properties (in the knowledge base), according to the user's selection. The following sections describe the structure and function of this control.

    Properties
    Basic Properties
    1. Question ID     Short Optional
    2. QuestionType    Byte  Currently about 10 types, in the future,
                             nore more than 99.
    3. Question        20    Text of the question
    4. QuestionGroup   Short The Group to which this question belongs.
                             Used for the Check_Redundancy method.
    5. Answers(1-18)   25    12 fields with the text of the answers
    6. Subject         25    Used for comparing sentences to check if
                             they may be joined, and to generate the
                             SubjectlessPrefix and
                             SubjectlessSentence.
    7. Prefix          50    Prefix string to used to generate the
                             sentence
    8. Suffix          20    Suffix string to used to generate the
                             sentence
    Continuation Related
    9. ContinuationType Byte  Options: InsertBefore, InsertAfter,
                             Replace, Independent, ForceJoin,
                             StringJoin, StringTruncate
    10. Continuation   Bool  Indicates if the answer's continuation
    (1-12)                   is a single question, or several
                             qustions (a `template`).
    11. ContinuationID Short ID of the question or the template
    (1-12)                   which is the continuation
    Connection Related
    12. ConnectType    Byte  Options: Unconnected, ConnectString,
                             TruncateString, or ForceConnect
    13. ConnectString        A string used to force connection
                             between two sentences, either adding
                             it between them, or subtracting it
                             from the second sentence.
    Language Related
    Language           Byte
    LanguageDirection  Bool  Options: RightToLeft, LeftToRight
    TrunkLocation      Bool  Options: TrunkBeforeAnswers,
                             TrunkAfterAnswers
    SubjectLocation    Bool  Options: SubjectAtBeginning,
                             SubjectAtEnd
    ConnectingWord     7     Includes spaces before and after
                             word
    Output Format
    14. GeneralLayout        Options: ParagraphStyle, FormStyle
    15. InsertFields   Bool
    16. AnswerLayout         Options: NextToQuestion,
                             TabFromQuestion, HangingIndent,
                             OnNewLine, Table
    17. QuestionsLayout       Options: OnSameLine, OnSeparateLines
    18. CommaSeperated       T/F
    19. GroupHeadBold        T/F
    20. QuestionBold         T/F
    21. AnswersBold          T/F
    22. HeaderNewLine        T/F
    Question-Type Related
    Numeric
    23. OneUnit
    24. TwoUnits
    25. PleuralUnits
    26. SeveralWord
    Yes/No
    27. NegPrefix
    28. NegConnector
    29. NegConnectWord
    Mixed
    30. Type(1-16)
    Graphic
    31. BackgroundBitmap
    32. RegionsBitmap
    33. Xcoordinate(1-12)
    34. Ycoordinate(1-12)
    Gender Dependant
    35. FemPrefix
    36. FemSubject
    37. FemNegPrefix
    38. FemNegConnector
    Internal TG
    Parameters
    39. NumQuestions         Number of questions on screen. Calculated
                             and fed by TC.
    40. NumAnswers           Number of answers on screen. Calculated
                             and fed by TC.
    41. Selected             Number of answers selected by the user
                             (including SelectedNegative in Y/N
                             questions). Updated with each click
                             event
    42. SelectedNegative       Number of answers SelectedNegative
                             in Yes/No questions. Updated with each.
                             click event.
    43. ConnectingWord       Language (& sometimes Question)
                             dependant. Calculated during WarmUp
                             by the QC.
    44. Identity             The sequence-number of the QC on the
                             screen, which also identical to the
                             number of the QC's array number (e.g.
                             the first QC is QC(0), and his Identity
                             property = 0). Calculated by TC
                             during Organize_Screen.
    45. BeforeMe             Number of QCs before this QC
                             (me), which belong to the same
                             potential sentence (i.e.
                             have an identical Subject). Calculated
                             by the QC during WarmUp.
    46. AfterMe              Number of QCs after this QC
                             (me), which belong to the same
                             potential sentence (i.e.
                             have an identical Subject). Calculated
                             by the QC during WarmUp.
    47. SentenceLeader       Identity number of the QC which `leads`
                             the sentence to which this QC belongs
                             (i.e. the first QC in `my` sentence
                             in which one or more answers is
                             selected). This indicates to the QC if
                             it is the leader and therefore re-
                             sponsible for creating the compound
                             sentence, or if not, to which QC it
                             needs to `report` changes in its
                             status. Default = 0. Updated
                             with each click.
    48. ActiveSegments       Number of QCs which belong to same
                             sentence, and in which there is
                             currently one or more answers
                             selected. Updated with each click.
                             Identity number of the QC, which
                             this QC is a continuation of.
                             Assigned by TC during
                             Show_PopUp.
    49. ReferredBy           Identity number of the QC, which
                             this QC is a continuation of.
                             Assigned by TC during Show.sub.13 PopUp.
    50. SentenceNumber       Number of the sentence in text
                             created by the template. Used for
                             text analysis.
    TG Receptacles
    51. SubjectlessPrefix       Calculated during WarmUp, used for
                             connecting sentences.
    52. Subjectless-         Contains the text of the sentence,
    Sentence                 without its subject, so its
                             prepared to be connected to a
                             previous sentence with a similar
                             subject.
    53. SimpleSentence       The sentence generated directly
                             from the question.
    54. FinalSentence        Contains the compound sentence,
                             made of several simple sentences
                             joined.


Reference is now made to FIG. 7, which is a simplified block diagram illustration of a preferred implementation of the template logic component 235 of FIG. 2. The apparatus of FIG. 7 preferably comprises the elements described below.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Template Logic Control

Introduction

The Template Logic Component (TLC) works together with one or more Question Components (QCs), to display a template on the screen, store the user responses and generate the corresponding text. Its main functions are:

1. Retrieve the knowledge-base data of the template, which are stored in several different database tables, and unites them in memory into a `virtual template record` multi-dimensional array (Read_DB method).

2. Creates sufficient number instances of QC units required to display the questions in the template.

3. Organizes the QCs on the screen, by means of calculating and feeding them their appropriate dimensions, location, and sequence properties, depending primarily on the screen resolution, window size, and language (Organize_Screen method).

4. Organizes and feeds the data from the knowledge-base to the QCs, by assigning values to their various properties (Feed_Questions method).

5. While retrieving data from the knowledge-base, it retrieves data in the appropriate language (from the appropriate language-table), thereby enabling the multi-lingual capability of the system.

6. Presents to the user a list of templates which exist in the knowledge-base, with several filtering mechanisms, which allow the user to select the desired template.

7. When switching between templates, it stores in memory the data of the various templates currently in use, as well as the user responses in these templates, facilitating rapid switching between templates.

The following sections describe in detail these methods and functions.

    Properties
    Basic Properties
    1. TemplateID      Short
    2. TemplateType    Byte
    3. QuestionID(1-12) Short
    4. EditMode        Bool  Default = False. When = True,
                             the template functions in Edit mode,
                             allowing editing of the template.
    5. Language        Byte  Options: English, French, German,
                             Italian, Spanish, Hebrew, Arabic,
                             Hindu, Japanese, Portugese, Russian.
                             Default = English.
    6. VirtualTemplate- Array A large multi-dimensional-array, which
    Record                   stores the data drom all of the
                             templates currently active in the
                             current customer-session.
    7. GeneratedText   Me-   QCs deliver the generated text to
                       mo    this field, when not functioning
                             in DeliverToWord mode.
    8. ReferenceHyperlink Short Hyperlink to a Reference document
                             relevant to this template (or
                             location within a larger reference
                             document)
    Pop-Up
    9. PopUpID         Short Stores the ID of the popup Question/s
    10. PopUpQuestion  Byte  Stores the number of Question which
                             has invoked a pop-up (used by the
                             QC to communicate with the TC)
    11. PopUpAnswer    Byte  Stores the number of Answer which
                             has invoked a pop-up (used by the
                             QC to communicate with the TC)
    Display
    12. NumQuestions   Byte  Calculated (or manually entered)
                             number of questions on the screen
    13. ManualNum-     Bool  Default = F. When T, disables
    Questions                the automatic calculation of number
                             questions that fit on screen
    14. NumQuestions-  Byte  For manual assignment of number of
    Horiz                    questions to be displayed on the
                             screen (when ManualNumQuestions=T)
    15. NumQuestions-  Byte
    Vert
    16. TopMargin            For setting the margins of the area
                             in which the TC should fit the
                             questions.
    17. BottomMargin
    18. SideMargin
    19. MinQuestionWidth       Defines the minimal question width
    20. MinQuestion-         Defines the minimal quesiton height
    Height
    21. ScreenResolution       Maybe optional, if they can be
                             automatically detected by the control.
    22. WindowSize           Maybe optional, if they can be
                             automatically detected by the control.
    Database
    23. KnowledgeDB    50    Name (including path) of the
                             knowledge-base database.
    24. CustomerDB     50    Name (including path) of the
                             customer database.
    25. TypeDB(KB)     Byte  Database type for KB. Options:
                             MICROSOFT .RTM. Access,
                             MICROSOFT .RTM. SQL,
                             ORACLE .RTM.
    Performance Tuning
    27. SpeedVsMemory  Bool  Options: FasterResponse,
                             MemoryEfficient
    List Of Templates
    28. FilterByCategories
    29. Category


Referring back to FIG. 7, the template virtual record 700 preferably comprises a multi-dimensional array, which the template logic component 235 of FIG. 2 preferably creates by collecting all data related to the template, although in the knowledge-base database 140 of FIG. 1B it is stored in multiple tables. All the actions performed by the template logic component 235 are based on this structure

Read knowledge-base 705 preferably implements a method which populates the template virtual record 700 from the knowledge-base database 140 of FIG. 1B.

The following detailed example relating to a preferred embodiment of the present invention is not meant to be limiting, and statements therein are intended to refer to preferred alternatives only:

Read KB Method

The data for each template, includes template-data, as well as data of the questions contained in the template, and their answers, and is stored in the database in four different tables: Templates, QuestionAnswers, Questions, Answers. The structure of these tables is specified in the Database section in this document. Depending on the language, the correct set of tables is opened, for that language.

Upon opening a template, as well as upon other events, the TC retrieves the appropriate records from these various tables, and constructs in the memory a `Virtual Template Record` in a multi-dimensional array. This array may hold data of several templates at once (this is just another dimension in the array). The TDC `feeds` the data from this virtual record to the different QDCs on the screen during the FeedQuestions method described in the next section.

This method should probably function as a separate WINDOWS.RTM. task, so as to allow reading the data in the background, and allow fine-tuning for maximizing performance.

Method Steps:

1. Open the database according to the database name and path stored in KnowledgeDB property, and the database type (MICROSOFT.RTM. Access, MICROSOFT.RTM. SQL Server, or ORACLE.RTM.) stored in TypeDB(KB) property.

2. Check the Language property, and accordingly open the correct tables in the database. (The database should contain a duplicate set of tables for each language supported, e.g. Questions_English, Questions_French, etc.) These tables are identical in structure and in the ID of their records.

3. Open the Template table (in the appropriate language), and find the desired Template according to your TemplateID property.

4. Read the template data, and feed into the properties in the Template properties.

5. Store the template data into the a multi-dimensional-array (into the 2.sup.nd dimension. The first dimension is for storing multiple templates simultaneously).

6. Read the 12 QuestionID fields in the Template record, and retrieve from the QuestionAnswers table (it is language independent since it only contains IDs), the corresponding records.

7. For each QuestionAnswers record read, retrieve the corresponding Question record from the Questions table (in the appropriate language). Load related to the question into the multi-dimensional-array (3.sup.rd dimension).

8. Also for each QuestionAnswers record read, read the (up to) 12