Show/Hide Toolbars

Filopto Help Manual

 

 

Filopto Form Manager is designed for users to be able to create their own custom forms.  This section will illustrate via an example how a user can create his/her own custom form.

 

The example used is the form called:  Patient Referral Notice which is located in the Patient Forms section.

 

Formexp1

 

This form combines information from the patient file with information entered by the user.  In this manner a user can custom create and print a standard form used in the office.

 

The form is a Referral Notice which list the patient information, reason for referral and pertinent medical information.

 

formexp2

 

The form is created by taking the patient information and combining user defined information which does not exit in the database to create a complete referral form.  Users can use this example as a starting point to creating additional forms which can be more or less complex.

 

We encourage users to view existing forms to see how we have created the existing forms and see how they can use the techniques to create their own.

 

The technique to create a from is similar to the creating a report.  You must define the data that will be used using a query.

 

formexp3

In this example we have created two queries:  Patient and companyinfo.  The patient query simply gets the information related to the patient while the company query is used for formatting the letterhead of the form using the company name, address and logo.

 

The Patient query contains the following lines:

 

  Select *

  From Patients

  Where Patientno =:PatientID

 

The where clause is prompting the system for the value of the patient file number.  This value is entered by the user and passed to the query which retrieves the required information.  The way we pass this value is by using the Dialogue page which prompts the user for the information.

 

The dialogue page is composed of several items:

 

formexp4

The Patient # field is the entry field into which the user will enter the patient file number.  We will use this patient file number to retrieve the patient information.  The rest of the fields are user input fields that we will print directly onto the form.  Some are simple text entry fields while the last two are memo type fields which permits users to enter an unlimited amount of information.  By simply dropping these components onto the dialogue box and naming them we have created the dialogue box we need to capture the data needed.

 

To link this data to the report we need to do two things :

 

                        1)  Link the OK button to an action to capture the data

                        2)  Create some code on the code page that will send the data to the report.

 

Linking the button to an action is done by first activating the button.  This is done by changing it's property called "ModalResult"        to  "mrOK"  The next step is to assign some action when clicked.  This is done by double clicking the event for the button called "OnClick"

 

 

Formexp5formexp6

 

The onclick event will open the code page and permit you to enter the code needed.  In this case we want to close the patient query and capture the Patient ID entered in the dialogue field called edit1 and then reopen the patient query using the patient id data entered and prompted for in the patient query.  To do this the following code needs to be entered in the procedure after the begin statement and before the end statement.

 

 

procedure Button1OnClick(Sender: TfrxComponent);

begin

Patient.Close;

Patient.ParamByName('PatientID').Value := edit1.text;

Patient.Open;

end;

 

To capture and enter into the form the other fields of data entered by the user we must select the event  from the MasterData1 band and enter the code below:

 

 

procedure MasterData1OnBeforePrint(Sender: TfrxComponent);

begin

Rich1.RichEdit.Lines.CommaText := Memo23.Lines.CommaText;

 Rich2.RichEdit.Lines.CommaText := Memo24.Lines.CommaText;

end;

 

This code assigns to the two memo fields on the form the data entered in the two memo fields in the dialogue screen.

 

We have also used another technique to show how standard fields can be used from the dialogue screen to enter data on the form.  The field for the referring doctor and the doctor which the form is being sent to are entered directly on the form using the text field component.  In the text field component we enter the name of the dialogue screen components text property which at print time is replaced with the value it contains.  In this example the value is the name of the field and its content property : [Edit2.text]  you must enter the value in between square brackets since this is how the report knows it is a value which must be retrieved.

 

formexp7

Once these steps are completed the form that was designed can be used.