The Metropolitan Mosquito Control District uses an internal wq-powered web app to track field activities including mosquito treatments, inventory usage, and truck mileage. Each year, around 250 inspectors record their daily activities on Android phones, which replaced a previous PDA-based solution. The web application works in an "offline-first" mode, ensuring fast navigation between screens even in low- and zero-connectivity situations.
The MMCD inspection application is part of a comprehensive suite of mosquito monitoring and treatment tracking applications, all powered by open source libraries. The application includes a "dashboard" showing recent activity and quick access to numerous reports. The database includes a custom date-based revision log to ensure that changes to data are tracked, and also that data is interpreted and validated according to the conditions when it was collected, which may differ from current conditions.
The web app is saved offline via the HTML5 Application Cache and Chrome's "Add to Homescreen" feature. This was selected over a native/PhoneGap solution because it simplifies the process of pushing out software updates to all ~250 Android phones. In addition, a web-only solution means each of the mobile screens can be accessed from desktop web browsers (and vice-versa) as needed.
To ensure robust data entry and validation, even in areas with limited connectivity, all required "domain" or "choice list" data is stored offline via wq/store.js (which was originally created specifically for the MMCD app). After being validated by an extensive set of jQuery Validate rules, saved inspection and treatment records are sent directly to an outbox and synced in the background. This is done even when the phone is technically online, since it helps ensure the application is quick and responsive in areas with slow connectivity. (cf. "navigator.onLine is not a boolean")
The app includes reverse geocoding capabilities that can automatically look up parcel addresses and MMCD site codes based on the inspectors' current GPS position. Starting and ending pesticide inventory is tracked separately from treatment estimates, and balanced out at the end of the day to account for any discrepancies. All data is stored in a PostgreSQL database that facilitates sharing between various wq.db-powered and PHP-powered applications.
© 2013-2019 by S. Andrew Sheppard