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.

ConvertToEID works!

First test against live sheep. We had no program crashes. The database was properly updated. Old farm tags that we had to cut out of sheep ears got marked as removed. New EID tags got added to the database with a tag_date_on of today and attached to the correct sheep. Sheep that had an alert in their record because they are scheduled to be butchered soon came up with an alert and did not get an EID tag.

All of our breeding rams are now identified with Shearwell EID SET tags. One ram jumped out of the chute and did not get his tag replaced. However due to his behavior he may become a dinner sheep and not need an EID tag.

We had a few user interface issues. Some of the buttons to add tags, remove tags and update the database were too close to each other. I have moved them around as suggested and we are ready to do the main conversion of the ewe flock now.

Conversion Ready to Begin & Tag Update

The ConvertToEID module is now ready for testing against live sheep. During the transition we need to look up a sheep based on existing federal or farm tag data. After an evaluation of the available ear we will decide whether to add a third tag, the new EID tag, or remove the farm tag and replace it with an EID tag. The ConvertToEID module is a task in the program that provides a screen to look up a sheep, allows you to add and remove federal and farm tags and scan and add EID tags. We are ready to test it by installing EID tags into all of our breeding rams, hopefully this week.

In other news the Shearwell SET tags are now officially approved as US scrapie ID as I reported earlier. That’s the good news. The bad news is that with the government shutdown we cannot yet get into the system to order any tags. However, as soon as that is resolved I will be ordering pairs of SET tags for our sheep and starting with the 2014 lambing all newborn lambs will get their EID at birth.

Field Testing of EvaluateSheep Module

We did our first field testing of the new EvaluateSheep module against our live sheep. We evaluated ram lambs. Data points gathered include weight, scrotal circumference and then a score between 1 and 5 for teeth alignment, head shape, horn shape, body and legs.

Ready to evaluate ram lambs.

Ready to evaluate ram lambs.

In addition if any sheep needed a dewormer we were prepared to give it. Notes on the worming were collected on paper since the drug administration module is not yet implemented.

Using the Nabi Tablet to collect scores and numerical data.

Using the Nabi Tablet to collect scores and numerical data.

We uncovered a few bugs and stopped using the system after about half the sheep had been evaluated. I worked on the program that evening and we finished the evaluations with the new program the next day. Overall it was a very successful use.

LambTracker Progress Report

Coding on the LambTracker programs is continuing at a fast pace. We currently have several working modules.

The first is LambTracker Print Utility: It is part of a package that will read an EID tag and print a barcode label with the tag number plus 1 line of text you desire on a small label printer. The model of printer we have used is a Brother QL710W. List price is $139 for the printer but they generally are available for under $75.00 at Amazon with free Prime shipping. Print Utility is designed to be used for labeling blood tubes during sample collection. The package consist of two Android applications, one being the Print Utility which interfaces with the Brother Printer and the other being the EID scanning client which talk via Bluetooth to the EID reader and generates an image of the barcode plus your text. Here is an example.

940100100400001IMG_8663

The Main LambTracker program has also progressed. Major accomplishments include:

Id Info database structure – The database design for storing and retrieving identification information has been defined and verified. A sheep ID can be a federal tag, a farm tag, an ear notch or split, paint brand, tattoo or an electronic tag. The database is designed so that it is easy to add new ear tag types or new identification types as required. For each separate id there is a date put on and a date removed so there is a full history of all id’s on a given sheep over the life of the sheep.

Sheep info expanded – We have changed how sheep information is stored. Details about a specific sheep including name, flock name, sex, sire, dam, birthdate, birth type, rearing type, lambease, remove reason, death date and remove date are all now stored separately to make additions simpler. We have created space to store whether a sheep was sold, died from predators or old age or slaughtered for meat among the remove reasons. Again, the database has been designed so that it is easy to add new reasons for removing sheep from the flock. We have not yet dealt with how to handle embryo transfer sheep nor document the rearing ewe for a lamb who was grafted onto a new mother.

Lambing database structure – The way we store and retrieve lambing information has been changed. Now each individual lambing event has a sire and dam link, information on the numbers of lambs born, numbers of lambs weaned and 2 fields for coding results, a free text narrative of the issues with the lambing and a place to quickly indicate whether the lambs were ewes, rams or stillborn. This can be expanded to include additional data as required.

The ConvertToEID task is nearly finished. This particular module will allow the searching of a sheep by either farm, federal or other id info. Then you can choose which ear tags to remove, if necessary, and also then attach a new EID tag and link it in to the database for that sheep.

During the development of the ConvertToEID we realized that for our flock for this year at least we wanted to only put the EID tags into sheep we plan to keep for breeding or to sell as breeding stock and not into any of the animals already identified as butcher sheep. Part of the determination is an extensive individual sheep evaluation we do on every animal. This consists of collecting scores on a variety of characteristics, along with scores for weight, weight gains, birth type, scrapie genetics and so on. Sheep are evaluated and then ranked and the lower ranking animals are slated to be butchered when ready. Our current process is a paper based one and is complex and difficult to use.

So we have started the implementation of a simple EvaluateSheep task and its related CreateSheepEvaluation. The user will select from a number of traits to evaluate on a scale of 0-5 with 5 being best and 0 being worst. The user can also select from several traits with real values, scrotal circumference and weight for example. Based on the selections an evaluate screen is generated that allows the user to select a sheep based on id info such as EID tags or other ID. Then a series of selection buttons for the scores for each trait are displayed. Data entry for the real values is allowed via on-screen keyboard input. The sheep is evaluated by an inspector, a judge or the farmer and finally the scores are saved into the database system. These data are then correlated to produce a report of the sheep ranked in order of their final evaluation scores from that time. Since sheep get evaluated multiple times in their life we save all the past evaluation scores. This module is nearly complete and will be tested by doing the evaluations on our adult rams, ram lambs and ewe lambs prior to installing EID ear tags.

Lastly we are pleased to report that the Shearwell SET tag system has been approved by the USDA as an official ID. We are waiting for the final physical signatures to be sent back from the UK but the tags are approved as official ID for sheep, goats, pigs, deer, elk, alpaca and llama. As soon as we have information on how to order tags we will update it here. These tags can be purchased as pairs of an EID and a visual tag with matching numbers. We plan to start with next year lambs getting official EID at birth.

All current code, whether working or not is on GitHub.