Friday, December 21, 2012

Mobile Lab Management System

LaBLog on a tablet in the lab
LaBLog on a tablet in the lab (Photo credit: cameronneylon)
When I first started working in +Roderic D. M. Page lab, I was fortunate that +Vincent Smith had been looking after the frozen collection of lice. He had inventoried and stored all the different specimens in carefully labelled tubes and boxes. The collection had been carefully built up and catalogued by a number of previous members in Rod's lab in a database called Lousebase. I was lucky because it made it very easy to find the samples I wanted to work on.
Lousebase went through a number of versions, originating from multiple excel spreadsheets used independently by the group, then it was compiled into an Access database, then it made it onto the web via ColdFusion with an underlying SQL database. When ColdFusion stopped playing nice, I made an attempt to write some PHP to interface with the SQL database but finally transferred everything into GoogleDocs here.

Working in the molecular lab which was two flights of stairs up from the office, certainly kept me fit but I dreamt of the day when I could interface with the database via a mobile device, so I put forward a project for an MSc Computer Science student to build such an app to interface with LouseBase on GoogleDocs. Here is a presentation I gave explaining what Nachiket Khandetod did for his MSc project.



The main difficulties he encountered was dealing with the Google API and having multiple user accounts accessing the same spreadsheet. At the end of the project, he said that it would have been much easier to link directly to an SQL database. However, he still managed to produce an Android app that updated a Google spreadsheet and that multiple users could work on simultaneously as long as they used a single Google account. He also built data caching into the app so if someone was out of WiFi range, they could store the data to synchronize later.

All the code for the app is open source and available on github but it is not particularly well annotated. One day, when I have time, I will revisit this to build a mobile lab management system the way I think it should be done.

Note:
Unfortunately, the spreadsheet name and Google Account were hard coded into the app, for this reason you will need to change the email (xxx@xxx) and password (xxx) in the following files before creating the .apk:
src/com/ei/auth/BasicAuthenticatorImpl.java
src/com/ei/auth/Account.java

Now that tablets are cheap and common place, it will not be long until they change the way we work, probably to a greater same extent than PCs have.

Enhanced by Zemanta

1 comment:

Ross Mounce said...

Cool! Thanks for the write-up

Disqus for Evo-Karma