Templates

Complete

This screen allows you manage the Document Templates. Every form and report has a document template. The template specifies things like usage, paper format, associated printers, its content, and when it is printed.  See also Concepts|Printing for background information, and Template Create/View/Edit for the template details.

As shown below, the system comes with a number of standard templates. You can use these but you will probably want to modify some of them. For example, the system comes with the invoice, statement etc tempates set to use A5 paper.  If you want to use a A4, then you will need to modify the invoice and other templates to use the appropriate A4 content files (eg "invoice a4.jrxml" in place of "invoice a5.jrxml"). You may also want to use a report from the Community Contributions set.  See below for a quick summary of how to do this.

Template Usage: One can divide the templates into three groups:
Reports - you use the Reporting|Reports screen to select the report to run
Selectable forms - (eg Patient Forms) you will be presented with a list to select from
Automatic forms - (eg Invoices) where the system chooses the template.

For the first two you can obviously set up as many as you need - you just choose the one you want. In the last case (eg Invoices) you need to be careful because if you create three different invoice templates, the system will just use the first it finds. This is not normally a problem - after all you only need one type of invoice form. However, if you do want to use different templates for each Practice Location, then you can do this by defining the templates to be used by the location. See Administration|Organisation|Practice Location.

If you do need to create or modify reports and forms, see Reference|Reports and Forms. Note that if you want to modify an existing report or form, then if you View the template, you can then click on the Content field to download the report/form ready for editing.

 

Installing a new report
To install a new report from the Community set, do as follows:

  1. download the jrxml (or odt) file by right-clicking on the attachment link and using 'Save Link As' (or 'Save Target As' etc depending on your browser) - remember where you saved it
  2. click the New button
  3. on the resulting New Document Template screen set the Type to Report, then click the Upload button. If it's not a report, then you need to set the appropriate Type.
  4. on the resulting window, click Browse and navigate to where you downloaded the file and select it. Click the Send button.
  5. back at the Edit Document Template screen, click the OK button

Changing a report from A5 to A4
The system comes with some things (eg invoices, credit notes etc) set to use A5 paper. To switch to the A4 versions do as follows:

  1. select the required report (see table below) and then click the Edit button
  2. on the resulting  Edit Document Template screen, click the Upload button
  3. on the resulting window, click Browse and navigate to the <OPENVPMS HOME>\reports folder, eg C:\OpenVPMS\openvpms-release-1.7\reports and select the appropriate file (see table below). Click the Send button.
  4. back at the Edit Document Template screen, click the OK button

Note that many reports consist of a main and sub-report. For these repeat the above for the sub-report.

The following table showns the files used for each report that has A4 and A5 versions. The name of the Document template for the sub-reports is always that in first column with " Items" appended, eg Invoice Items.

Document Size Report Sub-report
Counter Sale A4 countersale a4.jrxml countersaleItems.jrxml
  A5 countersale a5.jrxml countersaleItemsA5.jrxml
Credit A4 credit a4.jrxml creditItems.jrxml
  A5 credit a5.jrxml creditItemsA5.jrxml
Desexing Certificate A4 desexing certificate a4.odt  
  A5 desexing certificate a5.odt  
Estimation A4 estimation a4.jrxml estimationitems.jrxml
  A5 estimation a5.jrxml estimationitemsa5.jrxml
Grouped Reminders Report A4 grouped reminders a4.jrxml  
  A5 grouped reminders postcard.jrxml  
Invoice A4 invoice a4.jrxml invoiceitems.jrxml
  A5 invoice a5.jrxml invoiceitemsa5.jrxml
Invoice Reminders A4   invoiceRemindersA4.jrxml
  A5   invoiceRemindersA5.jrxml
Patient Clinical Event A4 patientClinicalEvent a4.jrxml  
  A5 patientClinicalEvent a5.jrxml  
Receipt A4 receipt a4.jrxml receiptItems.jrxml
  A5 receipt a5.jrxml receiptItemsA5.jrxml
Statement A4 statement A4.jrxml statementItems.jrxml
  A5 statement A5.jrxml statementItems A5.jrxml
Vaccination Certificate A4 vaccination certificate a4.odt  
  A5 vaccination certificate a5.odt  

Create/Edit/View

Complete

This is the create/edit/view screen for document templates. See also Concepts|Printing and Administration|Templates for background information.

The fields are as follows:
Name - the name of the template. The name can be anything (ie in the example above, we could change the name to 'ABCDE' and the system would still work) but it is sensible to use meaningful names. You can have multiple templates with the same name, but again, it is sensible not to.

Description - a description of the template. This should be used if necessary to clarify the purpose of the template.

Active - uncheck this to deactivate the template.

Type - this is used to define the usage of the template - for example when printing an invoice for a customer, the system looks for templates of type 'Customer Invoice'. The Type also defines what information fields are made available to the Content generator (see below). Most of the Types are self explanatory. Use 'Report' for a report (eg a list of customers or sales, etc), and 'Sub Report' for the report's repeated components (ie the line items). See also this  summary.

User Level - this allows you to define who can run which reports. Each user has a level (0-9). A user with level N can only run reports of level N and below.

Report Type - this field is not currently used

Preferred Print Mode - this determines when documents are printed or offered for printing. The option is used when the document is generated as a result of invoicing an item which has an attached document. It can be set to:
  None - the print mode is not specified
  Immediate - print immediately using the printer/interactive option
  Check Out - (the default) delay print until at Check Out time
  Manual - documents must be manually selected for printing

At Check Out time, the system checks if any documents have been accumulated. If there are any that have not been printed, then a window is displayed showing the accumulated documents each with a print checkbox - those that have already been printed, and those with Mode=Manual will have the box unchecked - those whose mode is 'Check Out' will have their box checked.

Paper Size - used to indicate to the printer what size paper is required. It can be set to None, A4, A5, Custom, and Letter. Normally can be left at 'None' unless the printer(s) that you are using allow the selection of different sized paper.

Content - the 'content' is the name of the file containing the JRXML report or Open Office or Microsoft Word template used to generate the document.  See also Introduction|Reporting and JXPath Extension Functions.
If you are editing the template, click the Upload button to upload the required file. If you are viewing the template, then you can click the content file name to download the template content.

Orientation - set to Portrait or Landscape as required

Copies - set to the required number of copies

Paper Height, Width and Units - these can normally be left at their defaults unless you have specified 'Paper Size' as Custom.

Note that for OpenOffice and Microsoft Word templates, the Paper Size, Orientation, Paper Height, Paper Width, and Paper Units settings of the Document Template are ignored. These settings must be specified within the OpenOffice or Word template. That is, they are only used for templates that use Jasper Reports (jrxml) content.

Email Subject, Body - these are used only when the system is generating emails to send out reminders and statements. Hence they can be left empty for all templates other than those used for reminders and statements. For these templates, it is mandatory to provide email body text. The email subject can be left blank, and if so will be set to the Name of the template. Note also that although you can use macros to generate the body text as you create/edit the template, you cannot use macros to generate the email text at run time. That is, although the reminder attached to the email can say 'Fido's next vaccination is due', you cannot get the email text to say 'Attached see reminder for Fido'.

Note also that the reminder and statement emails will have a From address that reflects the Practice (and not the Practice Location), and the email address used will be that with the purpose 'Reminder' or 'Billing' respectively, or if there is not one with this purpose, then the first email address found.

Printers tab
The Printers Tab is used to display and maintain the printers that can be used with this template.  You don't have to use this facility, but if you don't then your users will have to choose the required printer each time they print something.
Before using this you need to set up the printers available to the Practice Locations(s) - see Administration|Organisation|Practice Location.
The fields are as follows:
Practice Location - the Practice Location. Note that you can also insert the Practice here. This useful for the case where you want to set a global default printer, and override it for one (or more) locations.  For example if the standard label printer is LABEL-R, but for the upstairs office you wish to use LABEL-U, then it may be more convenient to set LABEL-R for the practice, and LABEL-U for the Main-Upstairs location, than to set the label printer for each practice location. Of course, if you only have two practice locations, then it makes no difference which way you do it, but if you have a more complex setup then it may be better to use the 'set for practice, and override for one location' approach.
Printer Name - choose one from the pull-down list
Paper Tray - if applicable, select the required tray - you will want to use this if you are running plain paper in one tray and letterhead in the other
Interactive - check this box if you want the print dialog box to be displayed (so you can use preview or email rather than print, or change the printer if necessary or load the required paper or ...) before the printing occurs. If the box is not checked, then printing proceeds immediately.

Delete Template

Complete

When you press the Delete button on the Administration|Templates screen, a confirmation window will appear.

If the selected Template is not in use and can be deleted, the window will simply ask you to confirm the delete. Press OK to confirm or Cancel to abort.

If it cannot be deleted because it is in use, the text will be "xxxx has relationships and cannot be deleted. Do you want to deactivate it instead?"(where xxx is the name of the item you are trying to delete). Pressing OK will unset its Active flag, Cancel will abort.

Select

Complete

This is the screen used to select a Document Template. It works like a standard select screen.

It will be presented whenever you need to choose a template, for example when assigning templates to a Practice or Practice Location, or (more commonly) when selecting a document at check-in time. In the latter case only the relevant templates will be displayed.

Summary

Complete

The following table summarises the standard Document Templates and their Types and usage.




Document Template Name Template Type Used by/for
Bank Deposit Bank Deposit Reporting|Deposits|Print
Customer Account Balance Report Customer Account Balance Reporting|Debtors|Report
Counter Sale Customer Counter Sale Customers|Charges|Counter Sale|Print
Credit Customer Credit Customers|Charges|Credit
Estimation Customer Estimate Customers|Estimates|Preview|Print
Invoice Customer Invoice Customers|Charges|Invoice|Print
Receipt Customer Payment Customers|Payments|Payment|Print
Statement Customer Statement Reporting|Debtors|Print & Send All
Grouped Reminders Report Grouped Reminders Reporting|Reminders|Send All
Message Message Workflow|Messaging|Print
Desexing Certificate Patient Form check-in processing
Vaccination Certificate Patient Form check-in processing
Patient Image Patient Image Patients|Medical Records|Documents|Print where the item is an Image
Referral Letter Patient Letter report macro
Reminder Cartrophen First Patient Letter Reporting|Reminders|Print & Send All
Reminder Desexing First Patient Letter Reporting|Reminders|Print & Send All
Reminder Vaccination First Patient Letter Reporting|Reminders|Print & Send All
Reminder Vaccination Puppy and Kitten First Patient Letter Reporting|Reminders|Print & Send All
Reminder Vaccination Second Patient Letter Reporting|Reminders|Print & Send All
Drug Label Patient Medication Label Customers|Charges|Invoice &
Patients|Medical Records|New|Medication
where item has a dispensing label
Patient Clinical Event Patient Visit Patients|Medical Records|Print
Patient Reminders Report Reminder Report Reporting|Reminders|Report
Clinician Sales Report Report Reporting|Reports
Customer Acquisition Report Report Reporting|Reports
Customer Balance Report Report Reporting|Reports
Customer List Report Report Reporting|Reports
Customer Payments Report Report Reporting|Reports
Customer Product Sales Report Report Reporting|Reports
Customer Reconciliation Report Report Reporting|Reports
Customer Referral Report Report Reporting|Reports
Customer Sales Report Report Reporting|Reports
Patient Acquisition Report Report Reporting|Reports
Patient Deceased Report Report Reporting|Reports
Patient List Report Report Reporting|Reports
Patient Sterilisation Report Report Reporting|Reports
Practice Clinician Sales Report Report Reporting|Reports
Product List Report Report Reporting|Reports
Product Price List Report Report Reporting|Reports
Stock Reorder Report Report Reporting|Reports
Stock Take List Report Report Reporting|Reports
Stock Valuation Report Report Reporting|Reports
StockTake Sheet Report Report Reporting|Reports
Counter Sale Items Sub Report line items component of Report
Credit Items Sub Report line items component of Report
Estimation Items Sub Report line items component of Report
Invoice Items Sub Report line items component of Report
Invoice Reminders Sub Report line items component of Report
Order Items Sub Report line items component of Report
Receipt Items Sub Report line items component of Report
Statement Items Sub Report line items component of Report
Order Supplier Order Suppliers|Orders|Preview & Generate
Till Balance Till Balance Reporting|Till Balances|Print
Work In Progress Report Work in Progress Charges Reporting|Work In Progress|Report