sheltermanager

Open full view…

shelteranimalscount.org matrix Report

kitten_division
Fri, 15 Dec 2017 06:54:03 GMT

I just signed up to send data to ShelterAnimalCount, ran the report and found that the ASM report does not calculate the numbers correctly.

kitten_division
Fri, 15 Dec 2017 07:08:43 GMT

[Screenshot (1588)](//muut.com/u/sheltermanager/s2/:sheltermanager:IpfX:screenshot1588.png.jpg) Ending animal count, assuming the numbers in the individual boxes in the report are correct, should be 39 and 54 for a total of 93, that is 13 animals off.

kitten_division
Fri, 15 Dec 2017 08:42:21 GMT

Alright, ran the in/out report for the same time period and cannot determine where the numbers are coming from that are on the shelteranimalscount report. January 2017 total intake from all types was only 32 per in/out, yet shelteranimalscount shows 45. I ran the same two reports for February 2017, the in/out report shows 34 intake from all types while shelteranimalscount report shows 39. I could attempt to calculate the numbers myself using the in/out report, however that will prove to be very frustrating as well since the in/out report shows the age at the time of adoption, not the time of intake, making it necessary to view each animals record to determine their age at intake to know which age bracket to place them in on the shelteranimalscount report.

candidhominid
Sun, 17 Dec 2017 15:48:18 GMT

1) Animals age over the period of a month, so you can't expect the columns to sum the way you might initially expect. Some cats who start in the under 5 months category in the beginning counts, will end up in the adult category by the end counts. To check the accuracy of the report, just worry about the overall counts (all ages combined). In our version of the report, I added a third column for the counts including all ages. 2) Counting the cats in the way described above, I'm only seeing a discrepancy of 3 cats in your report. There are many things that could be causing this. One trick is to run the report for shorter time frames until you find one where it is accurate, then start expanding the time frame. For example: If the report is accurate for 1-1-17 to 1-20-17 but not accurate for 1-1-17-17 to 1-21-17, there's probably something that happened on 1-21-17 that is throwing the counts off. 3) It's been a little while since I customized this report to get accurate counts for our shelter, but I think there is an issue with the logic of the default report. By defaul t, the beginning counts are including/counting all of that days movements. To get the columns to sum in the way you would expect, I think the beginning counts should NOT include/count all of that days movements. In other words, they should represent the counts at the start of the selected day (or end of the previous day). Problem in a nutshell: If the beginning counts include/count all of that days movements, when you sum the columns you end up adding or subtracting movements that have already been added or subtracted (to the beginning counts). So, if five cats were adopted 1-1-17, and you subtract them from the beginning counts, you are subtracting cats that were already subtracted, thus throwing off your numbers. To fix this, the code needs to be edited. In the beginning counts --- '$@from$' --- Should change to --- ('$@from$ 23:59:59'::date - INTERVAL '1 day') --- Using AdultCatBeginning as an example: --- NOT EXISTS (SELECT MovementDate FROM adoption WHERE MovementDate < '$@from$' AND (ReturnDate Is Null OR ReturnDate >= '$@from$') AND MovementType NOT IN (2,8) AND AnimalID = animal.ID) AND DateBroughtIn < '$@from$' AND NonShelterAnimal = 0 AND SpeciesID = 2 AND DateOfBirth < DateBroughtIn - INTERVAL '5 months' AND (DeceasedDate Is Null OR DeceasedDate >= '$@from$')) AS AdultCatBeginning, --- Should change to --- NOT EXISTS (SELECT MovementDate FROM adoption WHERE MovementDate < ('$@from$ 23:59:59'::date - INTERVAL '1 day')AND (ReturnDate Is Null OR ReturnDate >= ('$@from$ 23:59:59'::date - INTERVAL '1 day')) AND MovementType NOT IN (2,8) AND AnimalID = animal.ID) AND DateBroughtIn < ('$@from$ 23:59:59'::date - INTERVAL '1 day') AND NonShelterAnimal = 0 AND SpeciesID = 2 AND DateOfBirth < DateBroughtIn - INTERVAL '5 months' AND (DeceasedDate Is Null OR DeceasedDate >= ('$@from$ 23:59:59'::date - INTERVAL '1 day'))) AS AdultCatBeginning, ---

robinrt
Sun, 17 Dec 2017 17:32:42 GMT

Thanks, that's a very good answer on how to find discrepancies. For beginning counts, movements on the first day should not count and as far as I can tell don't in the default report - however this is a report that has been fixed quite a few times, so it may be the version you started with had this bug. I've updated kitten division's version of the report, so hopefully that should have cleared the discrepancy.

robinrt
Mon, 18 Dec 2017 18:40:58 GMT

For reference, I've just found and fixed a bug in this report. Surrender intakes were being multiple counted. The report is fixed in the repository now.

vsauder
Thu, 14 Jun 2018 14:43:37 GMT

With this report I am experiencing discrepancies with shelter euthanasia and owner requested euthanasia. This is likely due to how we may be entering these animals. Can you tell me where the numbers for owner intended euthanasia's are being pulled from?

candidhominid
Fri, 15 Jun 2018 18:14:02 GMT

Looking at the code, it seems that a euthanasia is "Owner Intended" when an particular Asilomar field under the deceased slider is checked. (Our shelter does not use Asilomar. We have checked the option to "remove the Asilomar fields from the entry/deceased sections".) It seems that a euthanasia is "Shelter Euthanasia" when this particular Asilomar field is not checked (or not used at all like my shelter).

vsauder
Fri, 15 Jun 2018 18:16:08 GMT

That makes sense. We are not using the Asilomar fields either. Thanks!