Cats Not FIV/L Tested
###
Medical
###
3215/Any rev02
###
Shelter cats who have not been FIV/L tested.
###
en
###
SELECT a.AnimalName, a.ShelterCode, a.AnimalAge, a.DisplayLocation, i.LocationName
FROM animal a
INNER JOIN internallocation i ON i.ID = a.ShelterLocation
INNER JOIN species s ON s.ID = a.SpeciesID
WHERE a.Archived = 0 AND a.CombiTested = 0 AND SpeciesID = 2
ORDER BY a.DateOfBirth
###
$$HEADER
<table border="1">
<thead>
<tr>
<th>Name</th>
<th>Code</th>
<th>Age</th>
<th>Location</th>
</tr>
</thead>
<tbody>
HEADER$$

$$BODY
<tr>
<td>$ANIMALNAME</td>
<td>$SHELTERCODE</td>
<td>$ANIMALAGE</td>
<td>$DISPLAYLOCATION</td>
</tr>
BODY$$

$$FOOTER
</tbody>
</table>
FOOTER$$
&&&
Cats Not FIV/L Tested (over 6 months)
###
Medical
###
3215/Any rev02
###
Shelter cats aged over 6 months who have not been FIV/L tested.
###
en
###
SELECT a.AnimalName, a.ID AS AID, a.ShelterCode, a.AnimalAge, a.DisplayLocation, i.LocationName
FROM animal a
INNER JOIN internallocation i ON i.ID = a.ShelterLocation
INNER JOIN species s ON s.ID = a.SpeciesID
WHERE a.Archived = 0 AND a.CombiTested = 0 AND SpeciesID = 2
AND a.DateOfBirth <= '$CURRENT_DATE-182$'
ORDER BY a.DateOfBirth
###
$$HEADER
<table border="1">
<thead>
<tr>
<th>Name</th>
<th>Code</th>
<th>Age</th>
<th>Location</th>
</tr>
</thead>
<tbody>
HEADER$$

$$BODY
<tr>
<td><a target="_blank" href="animal?id=$AID">$ANIMALNAME</a></td>
<td>$SHELTERCODE</td>
<td>$ANIMALAGE</td>
<td>$DISPLAYLOCATION</td>
</tr>
BODY$$

$$FOOTER
</tbody>
</table>
FOOTER$$

