LambTracker Meets the Lambs

IMG_0733

We’ve been using LambTracker to document all the births during this lambing season. I’ve uncovered several bugs and there are some workflow issues that are being dealt with but by and large everything is working as planned.

For now I am also keeping my standard paper backup of the data and also entering it into my old spreadsheet record system so there is double work for every birth.

I have fixed the duplicate tag issue for LookUpSheep but need to do some work to make it accessible everywhere. The other 2 issues are not done. I’ve been fixing the minor bugs as they show up during lamb processing rather than adding new features.

Lambing Module First Testing

First Lambs of 2014

Pair of ram lambs. First of 2014 and also via AI.

IMG_0696

 

LambTracker Lambing module encountered live sheep for the first time today. 2 sets of twins. We uncovered a few work flow issues. It’s important to get all the tags ready and enter everything but the weight in LambTracker before you actually tag the lambs or weigh them due to going back and forth with the screen and input. Lamb slime is not good for a touch screen. Neither is snow melting and falling on it causing erroneous key presses.

However, in spite of the weather issues the program worked well and all 4 lambs born so far today were processed properly.

3 known issues that need work:

  1. LookUpSheep only looks up the first sheep with a given tag. Fine for ear tags that are not duplicated but a problem for the paint brands we put on the sheep at birth.
  2. I didn’t get the edit the Lambing History record part finished so for now adding the details of the birth is being done on my Mac by hand directly into the database.
  3. Related to above I also didn’t finish adding the paint brand to the ewe record section. SO I am also adding that by hand on the Mac directly into the database.

The items are not really bugs, just functions that are not written yet or not finished.

We are having snow storms and we have a number of ewes looking ready to go in the next 24 hours so LambTracker is likely to get a workout.

Lambing Module Update

The Lambing Module went to feature freeze about a week ago and I’ve been working on bug fixes. As of yesterday the main Lambing Module and the AddLamb activity are both working properly.

There are some issues with LookUpSheep because handling multiple sheep with the same ID is not supported yet. So looking up a lamb with a paint brand will only get you the first lamb not all lambs with that number.

I did make one modification to LookUpSheep to add display of the birth date, birth type and sex on the main screen.

I will be taking out the debug code today and tomorrow in preparation for testing with real live sheep. Lambing is due to start on Thursday for the early date (142 days gestation) and next Tuesday for our most likely date (147 days gestation).

20140415_173450

As you can see programming is just barely done in time.

Notes vs Evaluations vs Alerts

Just finished a major change to the database structure. We’ve always had the concept of Alerts – things that you want to check next time you work the sheep, Notes – Things that stay with the sheep record for life but don’t really fit into any other table and Evaluations – ranking and scoring and measuring the sheep in some fashion.

What became obvious is that the udder status (none, small, medium or large) is really an evaluation at a given time for a sheep and all that data is not really a note but is another type of user defined evaluation. I had already created user evaluations for the estrus status and pregnancy status so I had the structure there. I’ve added the udder status to the user defined evaluations and completed fixing EvaluateSheep to handle dynamic creation of multiple user defined traits with custom results. Next task was to update the database and fix the historical records already in it to reflect the new structure.

I suspect each flock owner will have a slightly different take on what should be a note vs an alert but that is why the system is designed to support either option. For now the new structure seems to make more sense to me.

 

Shearing and Sheep Management

IMG_0367

Last week we had the first field trial of the shearing and sheep management modules. We learned several things that are being incorporated into the LambTracker program now.

First, during shearing it was too much effort to use the checkboxes for notes about each sheep on the handheld computer. It slowed things down far too much. So by the second set of sheep to be shorn I had created a paper form with the checkboxes. We used the Print Labels function and set it to print 2 labels for each sheep scanned. I could attach one label to the shearing sheet, check off the boxes for that sheep and used the other label to go on the fleece bag.  This worked well. Data entry time back in the office was a bit longer than I wanted because I didn’t have a desktop data entry screen set but I am thinking that I can integrate a bar code scanner and use that to scan the printed label and bring up the sheep record along with a screen with checkboxes just like the paper sheet for data entry. That module is being designed and planned now.

Second, the workload during vaccinations and worming was also high. I do not yet have the group medication modules written on the desktop so the only way to add a medication record is to do it individually for each sheep. The LambTracker standard of click to enable the scanner, then scan a sheep, then click to look up a sheep, became cumbersome to use. However, if we set it to always do an automatic scan and lookup there is the risk that a second sheep will get scanned and the data entry screen change before you’ve saved the data for the previous sheep. I’m still struggling with what is the best way to handle that case. I like the multistep method as it prevents erroneous data or missing data but it is much slower. I’m considering a user option to set the mode but haven’t worked out how to do that yet.

Third, there is the concept of notes about a sheep. Notes are permanent records and I have a number of predefined notes that can be attached to a sheep record. Examples of notes include things like the date shorn, some data on fleece (sticky or nice) behavior notes, udder status etc. It became clear during this exercise that I needed to be able to attach several notes to a single note record for a sheep. So I made a change to the database to implement up to 5 predefined notes per sheep at one time. Now I am in the process of adding those note options to all places where I have a “Take Note” button.

The lambing module is undergoing bench testing now but we won’t get to test it with live sheep until later this month. One initial discovery. There needs to be a simple way to add a tag or other id to a lamb after you’ve already entered it. That’s probably going to be added to the Lookup Sheep module.

Data entry of historical data is also proceeding. I have 17 years of past data on our flock to enter. I have started developing blank LibreOffice spreadsheets that can be used to collect the data for the various sheep database tables. The procedure is I enter in the data onto the spreadsheet. Save the file as a CSV file. Then, using a CSV to SQL tool, I can create the insert or update statements for the database as required. Lastly, I go back into the free Firefox SQLite tool and copy and paste the SQL statements into the execute SQL window and run them. So far it’s working well.

My existing records are in a huge LibreOffice spreadsheet but I combined things in some cells that are in separate tables in the database so there is some parsing out of stuff to make it all work. That’s why the need for separate blank spreadsheets for each type of table entry. I have started putting a background color of green in my main spreadsheet for all cells where I have transferred the data to the LambTracker database. This makes it easy to see what is left to enter.

LambTracker is designed so that you do not have to enter in all the data in order but can start where you are and slowly enter in the back data. This method has advantages and disadvantages. One advantage is obvious, no huge initial data entry task but one disadvantage is that you will need to go back and update or edit individual records. For example, when I enter in a sheep I do not require that there be a sire and dam listed. But once I do finally enter in the parents and grandparents of sheep I need to go back and make those linkages. It’s not hard but it is tedious. Which way a flock will choose to go depends a lot on how much back data they have and how much they eventually want in the LambTracker database. In my case we want the entire flock history in LambTracker so we’ve got to slowly get it all in there.

 

Lots of Progress

We’ve been very busy with LambTracker development and use. After the ewes were inseminated we waited a bit and then started doing ultrasounds to see if they were pregnant. We have a relatively inexpensive ultrasound machine but are not skilled in determining pregnancy yet. I made modifications to the EvaluateSheep module to accommodate collecting pregnancy scan status and number of lambs. To get things running quickly I did not incorporate those changes into the main EvaluateSheep Module.

Once the ultrasounds were done we started focusing on some clean-up. We standardized on a set of buttons on-screen and button locations so the user experience is consistent from activity to activity. I modified the standard look up a sheep code to handle looking up sheep with any of the various ID types. This was then incorporated into all the existing modules. Unfortunately that caused several bugs to surface that have take a while to squash. We finally got it all working again and will be testing the new ConvertToEID module with our last batch of sheep soon.

Database development is ongoing. I’ve added the tables and records to track breeding information with date and times of rams in and out so that the sire of lambs born can be determined. Lambing history has ben added along with other information critical for lambing. I’ve started the design of the tables to hold drug and treatment data but that part is not complete yet.

The next task is to get the historical lambing data on our flock formatted and into the system. A tool we purchased to do that is a simple program that can take a CSV file and create either insert or update SQL statements to modify or add to various database tables. It’s a lot faster than entering in the data one record at a time by hand but does require the user to understand the structure of the database. It works for me but is probably not really adequate for the naive user. Since my existing records are already in a spreadsheet I only have to make a copy of just the columns I need to add or modify, verify there are no illegal characters in the text fields and then run the program. I can then copy the resulting SQL statements and execute them to do bulk updates that way.

Programming the Lambing Module is well on its way. I currently have the screens for looking up a ewe and seeing her last lambing record and the screens for collecting the data on each new lamb. Next will be to write the code that will take the user input and update the database tables with the new lamb information properly. I also want to go back and merge the two different EvaluateSheep modules into one that will handle all three types of evaluations, scored traits that get a star rating of 1-5, real data traits that are measured like weights or scrotal circumference and user defined traits that include a group of written descriptions like  Pregnant, Not Pregnant, Unsure and Not Scanned where only one is applied to each sheep.

Ken is also working on the printing module to integrate the existing Print label program and code into the main LambTracker as a separate activity. He is working to provide options on how many labels you wish to print for each tag scanned and what additional information will be printed on the labels from the database. We may do some testing of this during shearing to identify specific sheep fleeces but the primary use will be blood collection for scrapie susceptibility genetic testing which won’t happen until April after the sheep are shorn.

We are tracking the time that LambTracker saves us during standard sheep tasks and also how much time we are spending doing the double entry for this year. We can see that much time will be saved once things are working. Of course that does not include the time spent creating and debugging the  program.

All in all we are making good progress with our system.

 

AI Experiment and LambTracker

We’ve just finished the major portion of our USDA experiment on non-surgical AI in sheep for this year. On 3 December we inseminated 24 ewes with either fresh cooled or frozen semen. During the run-up to the insemination date we used LambTracker and a new module, EvaluateSheep2, to collect the date and time when each ewe had either her sponge or CIDR inserted, the PMSG given and the sponge or CIDR removed. During the PMSG shots we discovered a bug in LambTracker that allowed multiple records to be saved in the database before clearing the display. A quick programming change to disable the save once it’s pressed fixed that and we had no further issues.

During the inseminations we collected additional data including the depth of insemination in centimeters and the estrus characteristics with the status being none, vulva engorged, mucus present or nothing. There were no issues with LambTracker during this time. We also took infrared pictures of each ewe at insemination for some additional research. I am currently working on the design of the database to allow for saving links to pictures in the sheep notes section of LambTracker.

On GitHub we’ve merged several development branches to incorporate changes and bug fixes into the Master codebase. I am now working to integrate the EvaluateSheep2 changes that allowed for a custom evaluation (like Estrus Characteristics) into the main LambTracker code. I am continuing work on the LookUpSheep module to verify and do ground truth on all tags in the flock.

Design of the breeding module is complete and I’m starting the Breeding Module coding. Design of the Lambing Module is in process.

The User Manual is also in process and is being written as I program each module. It won’t be available until I have gotten all modules written so maybe by next summer.

I am programming each module as I need it so I expect the development cycle to take a full calendar year. However I do have the advantage of being able to test each module as it is written in the field with sheep and that has uncovered several user issues and database issues that would have taken a longer time to fix if I hand’t found them early in the development cycle.

Overall the development is moving along well and we are pleased with the progress so far.

 

More Successful Tests

We’ve been using LambTracker to do some of our major sorting and evaluation tasks with the sheep.

As a participating flock in USDA research on artificial insemination in sheep we are in the middle of setting up for this year’s experiment. SO I’ve been using LambTracker to take notes on the teasing behavior of the ewes and rams and also to decide which ewes to sort into which groups.

I am continuing to implement additional functions in the LookUpSheep and EvaluateSheep modules to take into account that more of the sheep have EID now than they did when I started. Screen real estate is the big issue, but I think we’re closing on on a user interface that works.

Our last few tests have been very successful, with no user errors or issues with the user interface showing up.

LambTracker 69 Sheep 0

Today we put EID tags into all the breeding and potential breeding ewes. We tagged 69 ewes in 1.5 hours using LambTracker ConvertToEID module. We also took notes on several sheep and looked up and decided not to put tags into sheep scheduled for butcher soon. Everything in the lambTracker program worked properly. The user interface seemed to work better with the Alert button close to the tag input button making it easy to see a sheep with an alert of some type.

The note section was conceived and added between last night and today and it also worked properly. I have a few ideas for refinements to take a note but the function was there, I just need to make it a bit simpler to use.

Our state veterinarian came up to assist and observe.

I was thrilled that everything worked properly.

Comments Disabled

Well I was hoping I could keep comments open on this to answer any questions but the spam has become an overwhelming flood. Over 50 in the last 2 days.

Sorry but no more comments allowed at all.