Interactive application generation and text processing6289513Abstract 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: Description FIELD OF THE INVENTION
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 | ||||||
