Document merging with Open Office Writer

 

OpenVPMS utilises OpenOffice Writer to produce client and patient forms and letters. 
 
Within these open office documents we can utilise field names that get automatically replaced by OpenVPMS with the information associated with the form or letter being produced. 
 
As OpenVPMS is based on a archetyping principle which allows the data being stored to be readily modified, we had to define a field naming approach that catered for this as well. 
 
The following tables outlines  the currently defined fields that can be included in different document types:
 
Field Document Type(s)  Description 
startTime All The date associated with the document in the current locale format.  i.e dd/MM/yyyy 
description  All  The document description 
customer.entity.name All Customer Documents  The customer name in format <Lastname>,<FirstName> or <name> for organisations. 
customer.entity.firstName  All Customer Documents  The customer First Name. 
customer.entity.lastname  All Customer Documents  The customer Last Name 
customer.entity.title All Customer Documents  The customer Title 
customer.entity.initials All Customer Documents  The customer initials 
[party:getPatientWeight(.)] All Patient Documents The patient's weight
patient.entity.name All Patient Documents  The patient's name 
patient.entity.id All Patient Documents  The patient's ID 
patient.entity.sex  All Patient Documents  The patient's sex 
[party:getPatientDesexStatus(.)]  All Patient Documents  Returns status as "Entire" or "Desexed" 
patient.entity.species  All Patient Documents  The patient's species 
patient.entity.breed  All Patient Documents  The patient's breed 
patient.entity.colour  All Patient Documents  The patient's colour 
patient.entity.dateOfBirth All Patient Documents  The patient's date of birth 
patient.entity.age  All Patient Documents  The patient's age including words years, months and weeks as appropriate. 
patient.entity.description All Patient Documents  Returns string of "sex + colour + breed + (Microchip: microchip)", eg "Male Blue Australian Cattle Dog (Microchip: 956000001111234)".
clinician.entity.name  All Patient Documents  The name of the clinician associated with the document. 
product.entity.name  All Patient Forms  The name of the product associated with the form. 
product.entity.printedName  All Patient Forms  the printed name of the product associated with the form. 
[party:getPatientMicrochip(.)]  All Patient Documents  The last microchip id for the patient. 
[party:getPartyFullName(openvpms:get(.,'customer.entity'))]  All Customer Documents  The customer Full Name in format <Title> <FirstName> <Lastname> or just name if an organisation. 
[party:getPartyFullName(party:getPatientOwner(.))] All Patient Documents  The customer's Full Name in format <Title> <FirstName> <Lastname> or just name if an organisation for the owner of the Patient associated with the document as at the date of the document. 
[openvpms:get(party:getPatientOwner(.),'firstName')] All Patient Documents The customer's First Name
[openvpms:get(party:getPatientOwner(.),'lastName')] All Patient Documents The customer's Last Name
[party:getBillingAddress(.)]  All Customer Documents  Gets the first location contact for the customer which has a Billing Purpose.  If no location with this purpose then gets first preferred location contact.  If no preferred location gets first location contact found. 
[party:getBillingAddress(party:getPatientOwner(.))]  All Patient Documents  Gets the first location contact for the customer which has a Billing Purpose.  If no location with this purpose then gets first preferred location contact.  If no preferred location gets first location contact found.
[party:getCorrespondenceAddress(.)] All Customer Documents Gets the first location contact for the customer which has a Correspondence Purpose.  If no location with this purpose then gets first preferred location contact.  If no preferred location gets first location contact found.
[party:getCorrespondenceAddress(party:getPatientOwner(.))] All Patient Documents Gets the first location contact for the customer which has a Correspondence Purpose.  If no location with this purpose then gets first preferred location contact.  If no preferred location gets first location contact found.
[party:getHomeTelephone(.)] All Customer Documents  Gets the first telephone contact with a  purpose of Home.  If no telephone contact with Home gets first preferred telephone contact.  If no preferred get first telephone number found. 
[party:getEmailAddress(.)] All Customer Documents Get's the customer's email address
[party:getHomeTelephone(party:getPatientOwner(.))]  All Patient Documents  Gets the first telephone contact with a  purpose of Home.  If no telephone contact with Home gets first preferred telephone contact.  If no preferred get first telephone number found. 
[party:getWorkTelephone(.)] All Customer Documents  Gets the first telephone contact with a  purpose of Work.  If no telephone contact with Work gets first preferred telephone contact.  If no preferred get first telephone number found.
[party:getWorkTelephone(party:getPatientOwner(.))] All Patient Documents  Gets the first telephone contact with a  purpose of Work.  If no telephone contact with Work gets first preferred telephone contact.  If no preferred get first telephone number found.
[party:getFaxNumber(openvpms:get(.,'customer.entity'))] All Customer Documents  Gets the first fax number found for the customer. 
[party:getFaxNumber(party:getPatientOwner(.))]  All Patient Documents  Gets the first fax number found for the customer.
id  All Patient Documents  Investigation Request id number.
[openvpms:get(party:getPatientReferralVet(.),'firstName')]  All Patient Documents  Returns the first Name of the  Referring Vet associated with the Patient.  The referring vet is selected based on the referral information for the patient and the date of the document. 
[openvpms:get(party:getPatientReferralVet(.),'lastName')]  All Patient Documents  Returns the first Name of the  Referring Vet associated with the Patient.  The referring vet is selected based on the referral information for the patient and the date of the document.
[openvpms:get(party:getPatientReferralVetPractice(.),'name')] All Patient Documents  Returns the name of the Referring Practice associated with the current Referring Vet for the patient.  The referring practice is selected based on the dated associations with the referring vet and the document date. 
[party:getFaxNumber(party:getPatientReferralVetPractice(.))]  All Patient Documents  Returns the fax number of the referring practice. 
[party:getFaxNumber(party:getPatientReferralVetPractice(.))]  All Patient Documents  Returns the work telephone number for the referring practice 
[party:getBilling Address(party:getPatientReferralVetPractice(.))]  All Patient Documents  Returns the formatted Billing Address for the Referring Practice. 
[party:getCorrespondence Address(party:getPatientReferralVetPractice(.))] All Patient Documents  Returns the formatted Correspondence address for the Referring Practice 
[party:getAccountBalance(.)] All Customer Documents  Returns the current account balance for the customer 
[party:getAccountBalance(party:getPatientOwner(.))] All Patient Documents  Returns the current account balance for the customer who is the current owner of the current patient  
[party:getPartyFullName(party:getPractice())] All Documents  Returns the Full Name of the Practice 
[party:getPracticeAddress()]  All Documents  Returns a single line version of the Practice address 
[party:getBillingAddress(party:getPractice())]  All Documents  Returns the formatted Billing address of the Practice 
[party:getCorrespondenceAddress(party:getPractice())] All Documents  Returns the formatted Correspondence address of the Practice
[party:getWorkTelephone(party:getPractice())]  All Documents  Returns the Practice work telephone. 
[party:getFaxNumber(party:getPractice())]  All Documents  Returns the Practice fax number 
AttachmentSize
Document merging with OpenOffice Writer .pdf135.9 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Copy and paste

If you copy and paste from this page make sure you remove the trailing space when you paste in the openoffice field or you get errors

Re: Copy and paste

Click Insert | Fields | Other:

 

Click Variables | User Field | Text

Give your field a name, copy/paste the value from the table above (leave out the trailing space), and click Insert:

Your field should look like this:

Syndicate content