Click here to Skip to main content
15,867,141 members
Articles / Hosted Services / Azure

Gestur - Health Carer Solution

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
12 Aug 2013CPOL7 min read 14.8K   1   3
Windows App Store solution with GPS and NFC capabilities

This article is an entry in our AppInnovation Contest. Articles in this sub-section are not required to be full articles so care should be taken when voting.

Solution Logo

Disclaimer

This is joined article between jmgleiser and Enrique Albert. JMGleiser had the original project idea and he is responsible for the requirements and documentation aspects of the project, Enrique Albert is responsible for the technical and development aspects of the project.

Introduction

This application was submitted for the Table applications under the Health-Care category of the Intel® App Innovation Contest 2013.

Government Health Departments and private institutions try to encourage patients to stay in their homes rather than taking a place in a relative expensive hospital bed or similar facilities; as a result, home health providers are very common these days. The Gestur application helps carers and providers in managing visits, facilitating patient details and monitoring that carers complete their daily visits by using NFC technology for check-in/out purposes.

Gestur is the Icelandic word for visitor, the application main functionality aspects are to provide value for both the carer and the company providing the service. For the carer the solution manages scheduled visits and helps the carer finding the patient's home location and ensuring that the carer has the latest patient's details, notes and other medical notifications available in a easy manner. For the provider, the solution manages scheduled visits and ensures that notifications are sent to the carer in a seamless way, visit check in and outs are automatically created in the system so the provider can ensure that the carers are actually at the patient's location for the agreed time.

Article Contents

The following sections are available within this article:

Application Description

The typical user of the Gestur application is a health carer, the application is deployed on a tablet for mobility purposes. The application mantains a list of schedule visits that are automatically kept in sync with the back-end system by sending notificaion messages to the carer's tablet. The visit record comprises details like patient, visit location, appointment date/time and agreed duration. It also contains notes that may help the carer during the visit. Among the type of details available, pictures can be added to the patient record.

The carer can easily produce a list of visits for the day, each visit contains geographic details so using the table GPS capabilities the application can produce direction and route details. The Gestur application uses integration with Bing Maps to display the visit location and route to that location from the current carer's location.

When the carer arrives to the patient's home, the patient carries a NFC tag that is used for check-in purposes. The same tag is used when the carer leaves. In this way the system can effectively monitor the carer's visit automatically. In this way the health provider can record service hours without any additional work by the carer. NFC tags stand for Near Field Communication, it has been an standard for Smartphones for some time but the technology has been recently added to Windows 8 devices so applications like Gestur can benefit from it. The tags are relatively cheap and can be programme in different ways. For the purpose of the Gestur application, the tag contains sufficient patient details to validate the check in process.

See the section below regarding NFC Technology within this article.

As well, during the visit, the carer can introduce written notes and capture images that can help on further medical assessments or later carer visits.

The last but not the least, Gestur uses toast and push notifications to ensure the application is all time in sync with the back-end system. In this way the carer gets visit updates and other notifications almost on real time.

The Gestur solution comprises the following two main applications:

  • Back-End system in the Cloud
  • Table Carer Client Application
SysPrep

Back-End System

The back-end system for the Gestur solution comprises a set of services and components deployed on the Azure platform that provides the following functionality:

  • Patient Details
  • Scheduled Visits
  • Carer Details
  • Carer Subscriptions and Push Notifications

In particular, the following components are required to be deployed on Azure:

  • Gestur Database: Azure SQL
  • Gestur REST Services: Azure WebSite
  • Push Notification Service: Azure Mobile Services

Tablet Client Application

The Gestur application is a Windows Store App that runs on any Windows 8 device, including Windows RT tables. The application provides all the information a carer requires to manage daily scheduled visits to in-home patients. The application comprises easy to use screens with enlarged controls, in this way, all functions can be invoked using the touchable screen of the tablet. Also, navigation between screens and functions is also very intuitive so very little training if any is required to start using the application.

The application consists of a main screen in the form of a sort of dashboard where the application renders today scheduled visits. If a visit is selected, the system displays direction and route details on a Bing map control that uses the current GPS coordinates of the carer's tablet and the patient's home coordinates provided within the visit details. Also, once a visit is selected, the patient details are shown on a right panel.

The carer can enter notes and other medical details for a given visit if needed, these are automatically stored in the Back-End system and can be accessed by other Gestur users at a later stage if needed. When the carer gets to the patient's home, the patient presents a NFC tag that is used for check-in purposes, before the carer leaves, the same process is done to check-out. Check in and out details are also sent to the Back-End system for administration and visit management purposes.

The client application gets automatic notifications and uses the toast notification mechanism in Windows 8 applications to indicate the carer of outstanding messages and visit updates. In this way the system can issue automatic updates of the schedule visits or it can be used to send additional details of a particular visit ensuring that the carer is always informed.

The Gestur client application is developed in C# using WPF and the XAML framework for Windows 8 Store Apps.

NFC Technology

Microsoft has added the NFC to Windows Phone for some time and it is now available on Windows 8. Having access to this sort of technology makes possible to develop a whole new set of applications. Gestur is one of those, Pacients will carry decoded NFC tags that are then used for check-in/out purposes when carers visit them. The tags are easily programmable and they are very light and relatively inexpensive:

SysPrep

Unfortunately Intel and Lenovo indicated that the devices that are provided for this contest will not include this technology. As a result, we decided to use a USB reader/writer like the one below:

SysPrep

In a real scenario, the tag reader will be integrated into the tablet so the carer just needs to bring the NFC close to the tablet to read it.

Bing Maps Integration

We envisaged to use Bing Maps integration for the Gestur client application. It is relatively simple to integrate Bing Map in a Windows Store App. In the case of the Gestur application, when the carer selects a visit, the system invokes the Bing Map REST methods using the tablet's current coordinates and the coordinates provided within the visit details. Then the Bing Map service returns the route details and a map is rendered so the carer can determine the best route to get to the patient's home.

In order to provide this sort of functionality, a service class named MapServices would be available, it only exposes one public method that requires to pass a VisitSummary instance. This class delegates to a private method called SetRoute:

C#
    private async void SetRoute(Location startLocation, Location endLocation)
    {
      ClearMap();
      //Create the Request URL for the routing service      
01    
      const string request = @"http://dev.virtualearth.net/REST/V1/Routes/Driving?o=json&wp.0={0},{1}&wp.1={2},{3}&rpo=Points&key={4}";
      

      var routeRequest =
        new Uri(string.Format(request, startLocation.Latitude, startLocation.Longitude, endLocation.Latitude,
                              endLocation.Longitude, _mapTrucks.Credentials));

      //Make a request and get the response
02    var r = await GetResponse(routeRequest);

      if (r != null &&
          r.ResourceSets != null &&
          r.ResourceSets.Length > 0 &&
          r.ResourceSets[0].Resources != null &&
          r.ResourceSets[0].Resources.Length > 0)
      {
        var route = r.ResourceSets[0].Resources[0] as Route;
        if (route == null) return;

        //Get the route line data
        var routePath = route.RoutePath.Line.Coordinates;
        var locations = new LocationCollection();

        foreach (var t in routePath)
        {
          if (t.Length >= 2)
          {
            locations.Add(new Location(t[0], t[1]));
          }
        }

        //Create a MapPolyline of the route and add it to the map
        var routeLine = new MapPolyline
          {
            Color = Colors.Blue,
            Locations = locations,
            Width = 5
          };

        _routeLayer.Shapes.Add(routeLine);

        //Add start and end pushpins
        var start = new Pushpin
          {
            Text = "S",
            Background = new SolidColorBrush(Colors.Green)
          };

        _mapVisits.Children.Add(start);
        MapLayer.SetPosition(start,
                             new Location(route.RouteLegs[0].ActualStart.Coordinates[0],
                                          route.RouteLegs[0].ActualStart.Coordinates[1]));

        var end = new Pushpin
          {
            Text = "E",
            Background = new SolidColorBrush(Colors.Red)
          };

        _mapVisits.Children.Add(end);
        MapLayer.SetPosition(end,
                             new Location(route.RouteLegs[0].ActualEnd.Coordinates[0],
                                          route.RouteLegs[0].ActualEnd.Coordinates[1]));

        //Set the map view for the locations
        var locationRect = new LocationRect(locations);
03       locationRect.Width += 0.5; locationRect.Height += 0.5; 
        _mapVisits.SetView(locationRect);
      }
    }

Couple things worth to noting about the above code. In Line 01 and 02 the uri is set to invoke the REST method in Bing Maps to calculate the route. Line 3 is just a simple way to ensure that the Bing Map windows provides some margin so the start and end points are slightly inside the window rather that besides its borders.

Below is the public method that is being used to render the Bing Map control from the visit details:

C#
public void RefreshMap(VisitSummary selectedItem)
{
  var location = new Location(selectedItem.Latitude, selectedItem.Longitude);
  if (location.Latitude == 0 && location.Longitude == 0) return;

  SetRoute(location, GetTableCoordinates());
  var image = new Image
    {
      Source = new BitmapImage(new Uri(_baseUri, "/images/carer_pin.png")),
      Width = 40,
      Height = 40
    };

  MapLayer.SetPosition(image, location);
  _mapVisits.SetView(location);
  _mapVisits.Children.Add(image);
}

The SetRoute private helper method is probably the most interesting aspect to discuss. It takes the start and end locations and draws the route in the screen map. The operation is asynchronously so it does not block, as a result the visit details are normally rendered before the route is displayed on the UI. Calculating the route can be an expensive request so rendering the other visit details as soon as possible is a good trick to provide a more responsive user interface.

History

  • 12-Aug-2013 - Article is composed.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Business Analyst
Spain Spain
I am lawyer that manages the legal aspect of large software projects in Spain. I got interested on the technical side of the business and I am very keen on the development of mobile applications for different purposes.

Comments and Discussions

 
QuestionArticle Pin
Kshitij Marwah 130-Aug-13 4:59
professionalKshitij Marwah 130-Aug-13 4:59 
AnswerRe: Article Pin
Enrique Albert30-Aug-13 5:02
Enrique Albert30-Aug-13 5:02 
AdminThanks for entering the Intel AIC 2013! Pin
Kevin Priddle16-Aug-13 8:04
professionalKevin Priddle16-Aug-13 8:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.