Hacking the 7926G MIDlet Development

Requirements
The hospital is forming our plan to handle closed loop medication administration. What that means to a patient is that their armband will scanned to verify who they are, then the medications will be scanned to verify what they are, then the medications will be administered. We are debating what hardware to purchase and how many items. This fall and winter we are due to upgrade our nurse call phones and the 7926G has become the front runner. The nurses carry it with them every where they go, and they are well cared for devices.

My boss came up with the idea of how to use the phones with our current crop of tablets. There will be a barcode on every computer with its’ name. The nurse will scan the barcode of their computer to associate their phone to the computer, then any scanned data will be sent to that associated computer. My boss wrote the listener for the Windows tablets and I wrote the code for the 7926G.

Below is an approximation of what I drew out on a sticky note. The goal was for the PC team to be able to trouble shoot the phone scanning program quickly and easily without intervention from third level help desk.
7926g-requirements

Test Server
In order to test I built this simple server to communicate with the phone while my boss worked on the Windows receiver.

cat SimpleServer.pl
#!/usr/bin/perl

use strict;
use warnings;

package SimpleServer;

use base qw(Net::Server);

sub process_request
{
        #print qq(OK\n);
    while (<STDIN>) {
        s/\r?\n$//;
        print STDERR "Received [$_]\n";
        print qq([OK]\n);
        last if /quit/i;
    }
}

SimpleServer->run(port => 3000);

Scanner MIDlet
You can download my source code here.

Creating a MIDlet project in NetBeans is left as an exercise for the reader, however, in order to be able to test the scanner on the emulator you need to add the shim to the project resources.

7926g-resources

In order to deploy the MIDlet, do not include the libraries for the scanner shim.

7926g-properties-libraries

Below are screen shots from the Scanner MIDlet.

The opening screen, a nurse scans the computer that they want to send data.
7926g-initial-screenshot

The result of a scanned barcoded IP address.
7926g-scan-result

The Help screen.
7926g-help-screen

For trouble shooting purposes I added a form for manual entry of the traget PC IP adress or hostname.
7926g-manual-entry

Also for trouble shooting purposes here is an alert with the phones’ IP address.
7926g-phone-ip-address

More trouble shooting, this time the target PC IP address.
7926g-pc-ip-address

Finally, there is checking to make sure that the target PC is actually listening. I catch the error and display this message for the end user.
7926g-pc-error

This was a fun project, so much so that I spent more than a couple weekends working on it. I would like to thank a number of people from Cisco and our partner. Thanks to David Staudt, Riley Marsh, Louis Bell, Tony Godwin, Jim Stewart, Mike Hamblett, Jim Hooker and Conrad Price. They worked as a team to make sure I was able to develop this application quickly.

This entry was posted in Code, Routing. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s