Diary Tasks

In addition to the normal facilities offered by the general diary, Animal Shelter Manager allows you a special type of diary note, called a ``Diary Task''. A diary task is a group of diary notes that can be added to the system at relative dates with variable information applicable to animals.

This sounds far more complicated than it is, so let us use an example:

Suppose your shelter runs its own clinic and they need to know when young animals need to be neutered.

The problem with a regular diary note in this scenario is that there are two reminders that need to go together - the first is that the animal must be starved before the operation, as well as a reminder for the operation itself.

The solution is to create a diary task with two task items - one for the starving and one for the neutering the following day. Diary task items do not have a concept of a date - they are expressed as a day value relative to today, called a day pivot. This is because diary tasks are templates for creating diary notes.

In the example above, we would create a new diary task called ``Starve and Neuter''. The task would have two items on its list (diary tasks can have an unlimited number of items); one for the starving and one for the neutering. The day pivot on the starving will be a 0 - zero means that the system should ask the user for the actual date to go on that task when they apply it to the animal (after all, you can book a neuter operation for any time). The day pivot on the operation will be a 1 - because it occurs one day after the starving. This is because diary tasks are cumulative - each one is performed in order and the day pivot is taken relative to the date on the task that ran before it.

If we created another task for after the operation, say ``Check on the animal in a week'', then we would set the day pivot to 7, because the task comes after the operation and it should generate a reminder 7 days from the operation.

The next thing to look at is the content of the data itself - it's alright having a task that says ``Starve Animal'' and ``Neuter Animal'', but how do you know which animal? Simple, the wordkeys mentioned in [*] can also be embedded in the subject and note text of a diary task, to be replaced by the real thing when the task is executed.

This means that the subject of the starve task could be ``Starve <<ShelterCode>> <<AnimalName>>'' for example, which would give the note the animal's shelter code and name in the subject line, so you knew which animal the diary note referred to.

Even if your task has only one item, diary tasks are still handy to use because they can be called up and attached to animals very quickly without the need for the user to type a whole new note.



Subsections
http://sheltermanager.sf.net