Twig template variables: Patients
The patient variables show data of a patient record (for example, the name, the age and the species). Each variable starts with animal.
Variables that check a condition
Some of these variables show if a condition is true. For example, animal.IsDesexed is true if the patient is desexed.
To use a variable of this type:
- Put the variable in a Twig
ifstatement. - Between the
iftag and theelsetag, put the text to show when the condition is true. - Between the
elsetag and theendiftag, put the text to show when the condition is not true.
if statement, the variable shows 1 when the condition is true. When the condition is not true, the variable shows no value.Example:
{% if animal.IsDesexed %}
{{ animal.Name }} is desexed.
{% else %}
{{ animal.Name }} is not desexed. Ask us about desexing.
{% endif %}In this example:
animal.IsDesexedis true if the patient is desexed.- When the condition is true, the document tells the client that the patient is desexed.
- When the condition is not true, the document tells the client to speak to the veterinary practice about desexing.
| Record | The document shows |
|---|---|
| Newsflash, the patient of Mr Riker, Will (200019). Newsflash is neutered. The condition is true. | Newsflash is desexed. |
| Ruby, the patient of Miss Kochanski, Kristine (200021). Ruby is not desexed. The condition is not true. | Ruby is not desexed. Ask us about desexing. |
Variables that show a list
Some of these variables show a list. For example, animal.AnimalMasterProblems shows a list of the master problems of the patient.
To use a variable of this type:
- Put the variable in a Twig
forloop. - Between the
fortag and theendfortag, put the text to show for each item. - After
for, enter a name for each item in the list.
Example:
{% for problem in animal.AnimalMasterProblems %}
{{ problem.Name }}: {{ problem.Specifics }}
{% endfor %}In this example:
animal.AnimalMasterProblemsis the list of the master problems of the patient.problemis the name for each item in the list.problem.Nameandproblem.Specificsshow the name and the content of the Specifics box of each master problem.- The document shows the text between the tags one time for each item in the list.
Variables that show a date
Some of these variables show a date. To show the date in a format that is easy to read, use the dateformat Twig filter. The Function column of each variable of this type has a note about the dateformat filter.
After the variable name, enter a vertical bar and dateformat.
Example:
{{ animal.DateOfBirth|dateformat }}In this example:
animal.DateOfBirthshows the date of birth of the patient.- The
dateformatfilter shows the date in a format that is easy to read.
Variables that show formatted content
Some of these variables show content with formatting (for example, a table or an address with a line break after each line). Variables of this type show the content in HTML. To show the formatting in the document, use the raw Twig filter. The Function column of each variable of this type has a note about the raw filter.
After the variable name, enter a vertical bar and raw.
raw filter, the document shows the HTML tags as text.Example:
{{ animal.NextVaccinationsAndTreatmentsTable|raw }}In this example:
animal.NextVaccinationsAndTreatmentsTableshows a table of the next vaccinations and treatments of the patient.- The
rawfilter shows the table in the document.
Variables
| Name | Classic template system equivalent? | Function |
|---|---|---|
{{ animal.DeathReason }} | No | Shows the cause of death of the patient. |
{{ animal.AnimalNumber }} | {AnimalNumber} | Shows the value of the Code box of the patient record. |
{{ animal.AnimalColour }} | {AnimalColour} | Shows the color of the patient. |
{{ animal.Name }} | {AnimalName} | Shows the name of the patient. |
{{ animal.FullName }} | No | Shows the name of the patient and the last name of the owner of the patient. |
{{ animal.sex }} | {AnimalSex} | Shows the sex of the patient. The possible values are:
|
{{ animal.SexStringShort }} | {AnimalSexShort} | Shows the sex of the patient. The possible values are:
|
{{ animal.RabiesNumber }} | {AnimalRabiesNumber} | Shows the rabies tag number of the patient. Note: This variable is applicable to regions that have the rabies virus. |
{{ animal.LastVisit }} | {AnimalLastVisit} | Shows the date of the patient's most recent visit. Note: To show a date value that is easy to read, use this variable with the date Twig filter. |
{{ animal.RabiesDate }} | No | Shows the date of the most recent rabies injection of the patient. Note: To show a date value that is easy to read, use this variable with the date Twig filter. |
{{ animal.NextVaccinationName }} | {AnimalNextVaccinationName} | Shows the name of the next vaccination that is due for the patient, from the standard of care of the patient. |
{{ animal.NextVaccinationDate }} | {AnimalNextVaccinationDate} | Shows the date that the next vaccination is due for the patient. Note: If the patient has more than one vaccination due, this variable shows the date that is closest to today. This date can be in the past. |
{{ animal.LastVaccinationDate }} | {AnimalLastVaccinationDate} | Shows the date of the last vaccination that the patient got. |
{{ animal.LastVaccinationName }} | {AnimalLastVaccinationName} | Shows the name of the product of the last vaccination that the patient got. |
{{ animal.AgeString }} | No | Shows the age of the patient. |
{{ animal.AgeInYears }} | {AnimalAgeYears} | Shows the age of the patient in years. |
{{ animal.AgeInMonths }} | {AnimalAgeMonths} | Shows the months part of the age of the patient. Note: The range of possible values shown by this variable is 0 to 11. If the patient record does not have a date of birth, this variable shows no value. |
{{ animal.AgeStringFull }} | {AnimalAgeFull} | Shows the full age of the patient. |
{{ animal.DateOfBirth }} | {AnimalDOB} | Shows the full date of birth of the patient. |
{{ animal.DateOfDeath }} | {AnimalDOD} | Shows the date of death of the patient. |
{{ animal.Weight }} | No | Shows the weight of thepatient. Note: This variable shows the weight without the applicable unit of measurement. |
{{ animal.WeightUnits }} | No | Shows the weight of thepatient. Note: This variable shows the weight with the applicable unit of measurement. |
{{ animal.CautionStatus }} | No | Shows the caution status of the patient. The possible values are:
|
{{ animal.MicroChip }} | {AnimalMicrochip} | Shows the microchip number of the patient. |
{{ animal.Estimated }} | No | Shows the estimated date of birth of the patient. Note: To show a date value that is easy to read, use this variable with the date Twig filter. |
{{ animal.NextAppointmentStartTime }} | When you use this template variable with the date filter or dateformat filter, the variable is equivalent to:
| Shows the start time of the next appointment of the patient. |
{{ animal.ShortDescription }} | Shows the name, sex, and species of the patient. Note: This variable uses Name (sex - species) format to show the information. | |
{{ animal.DateDesexed }} | {AnimalDateDesexed} | Shows the desex date of the patient. |
{{ animal.ContactToBillName }} | No | Shows the name of the contact record that receives the invoices of the patient. |
{{ animal.AttendingVetsString }} | {AnimalAttendingVets} | Shows the names of the veterinarians who are related to the patient record. |
{{ animal.InsuranceNumber }} | {AnimalInsuranceNumber} | Shows the insurance number of the patient. |
{{ animal.Notes }} | {AnimalNotes} | Shows the notes of the patient. |
{{ animal.AnimalOwnerHtmlTable }} | {AnimalOwnerTable} | Shows a summary of patient information and owner information in a table. The information includes:
|
{{ animal.BSAValue }} | {AnimalBSA} | Shows the body surface area of the patient. Note: This variable uses the patient weight to calculate the body surface area. |
{{ animal.ReferrerName }} | {AnimalReferringVet} | Shows the name of the referring veterinarian. Note: This variable uses a format of Last name, first name (veterinary practice name) to show the information. |
{{ animal.ReferredVetName }} | No | Shows the name of the referring veterinarian. Note: This variable uses a format of Last name - first name - veterinary practice name to show the information. |
{{ animal.Species.Name }} | {AnimalSpecies} | Shows the species of the patient. |
{{ animal.ResidingContact.Name }} | No | If the patient record has Residence selected, shows the name of the applicable contact record. |
{{ animal.ResidingContact.PhysicalAddressText }} | {AnimalResidence} | If the patient record has Residence selected, shows the physical address of the applicable contact record. |
{{ animal.Resuscitate }} | {AnimalResuscitate} | Shows the resuscitation status of the patient. The possible values are:
|
{{ animal.Age }} | No | Shows the age of the patient in the format of your ezyVet site, for example 3 years 2 months. Note: If the patient is deceased, this variable shows the age of the patient on the date of death. If the patient record does not have a date of birth, this variable shows Not Set. |
{{ animal.AgeShortString }} | No | Shows the age of the patient in a short format, for example 6y2m18d. |
{{ animal.EquineAgeString }} | No | Shows the age of the patient in full years from the standard foaling date, followed by years. |
{{ animal.Demeanours }} | No | Shows a list of the names of the demeanors of the patient. Tip: To show the names with a comma between each value, enter {{ animal.Demeanours|join(", ") }}.Note: You can also enter {{ animal.Demeanors }}. |
{{ animal.AnimalDemeanours }} | No | Shows a list of the demeanor records of the patient. Note: Use this variable in a Twig for loop. For example:For more information, refer to Variables that show a list.Note: You can also enter {{ animal.AnimalDemeanors }}. |
{{ animal.AnimalExternalReference }} | No | Shows the external reference of the patient. Note: An external reference is an ID that a different system uses for the patient. |
{{ animal.AnimalMasterProblems }} | No | Shows a list of the master problems of the patient. Note: Use this variable in a Twig for loop. For example:For more information, refer to Variables that show a list. |
{{ animal.MasterProblemList }} | No | Shows the names of the master problems of the patient. Note: This variable shows each name on a new line. |
{{ animal.MasterProblemsHtml }} | No | Shows a table of the master problems of the patient. |
{{ animal.NextVaccinationsAndTreatmentsTable }} | No | Shows a table of the next vaccinations and treatments of the patient. |
{{ animal.attendingVets }} | No | Shows a list of the veterinarians who charged work to the patient. Note: Use this variable in a Twig for loop. For example:For more information, refer to Variables that show a list. |
{{ animal.Breed }} | No | Shows the breed record of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.Breed.Name }}. |
{{ animal.ClientContact }} | No | Shows the contact record of the owner of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.ClientContact.FirstName }}. |
{{ animal.ContactToBill }} | No | Shows the contact record that ezyVet invoices for the patient. Note: If the patient record does not have a billing contact, this variable shows the contact record of the owner. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.ContactToBill.Name }}. |
{{ animal.HasBillingContact }} | No | True if the billing information of the patient is different from the billing information of the related contact record. |
{{ animal.Consults }} | No | Shows a list of the clinical records of the patient. |
{{ animal.insuranceSupplier }} | No | Shows the contact record of the insurance supplier of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.InsuranceSupplier.Name }}. |
{{ animal.PreferredDoctor }} | No | Shows the record of the first preferred veterinarian of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.PreferredDoctor.Name }}. |
{{ animal.secondPreferredDoctor }} | No | Shows the record of the second preferred veterinarian of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.SecondPreferredDoctor.Name }}. |
{{ animal.ReferringVetContact }} | No | Shows the contact record of the referring veterinarian of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.ReferringVetContact.Name }}. |
{{ animal.vetClinic }} | No | Shows the contact record of the regular veterinary clinic of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.VetClinic.Name }}. |
{{ animal.vetContact }} | No | Shows the contact record of the regular veterinarian of the patient. Tip: To show more information about the record, add one more variable after this variable, for example {{ animal.VetContact.Name }}. |
{{ animal.IsReferred }} | No | True if a different veterinarian or a different veterinary organization referred the patient. |
{{ animal.HasDateOfBirth }} | No | True if the patient has a date of birth. |
{{ animal.IsDobEstimated }} | No | True if the date of birth of the patient is an estimate. |
{{ animal.IsDead }} | No | True if the patient is deceased. |
{{ animal.IsDesexed }} | No | True if the patient is desexed. |
{{ animal.IsDNR }} | No | True if the patient record has a Resuscitate setting of No (that is, it has a DNR condition). |
{{ animal.IsNotesImportant }} | No | True if Notes Important is selected for the patient record. |
{{ animal.HasWellnessPlan }} | No | True if the patient has a wellness plan membership. |