Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
johna69
Product and Topic Expert
Product and Topic Expert

University Application Rumble at Sapphire

Team Dan and Garys idea for Advanced Diabetes Management was finally implemented a few hours before their 6.30am presentation at Sapphire Now in Orlando. In our first blog we described how we setup the HANA database on AWS and enabled an OData JSON interface using Hana XS.

The goal of the interface is to allow the diabetic to track their diet, glucose levels and insulin intake.

The idea is to first offer the user the list of most commonly eaten foods. For most people there is often a pattern. This makes making the food selection simpler. The history of food eaten is stored in the HANA database and read for the view. The data is stored locally for scenarios when the user has no network access. Reading the data from the HANA on AWS proved to be blindingly fast.

Improving patients health with more accurate diet control

When eating a meal a diabetic will record the meal eaten, their current glucose level and their insulin intake. The insulin intake is determined based on the carbohydrates in a meal, the recommendation comes from a consultation with the patients doctor. A goal of the Advanced Diabetes Manager is to track the actuall affect of food so that more accurate recommendations on Insulin intake can be given.

The meal view shows the user the important details from the last time eating the same meal, this includes insulin intake,hourly glucose readings and the estimated carb content of the food.

For our example we will follow a user eating another bowl of Pork and Beans. By selecting the food the estimated carbs content is shown along with the recommendation. The patient will also take a glucose reading at this point.

The app also now shows a recommended insulin intake. This number is calculated by measuring the effects over time of the food on the patients glucose level. The screenshot shows that this recommended amount differs from that recommended by the doctor. This would be a good time for the patient to schedule a meeting with their doctor again and discuss their current diet and insulin intake recommendation.

After eating, the patient also needs to take hourly blood glucose levels. To help the patient the app sets reminders in the device to notify the user each hour to check their glucose level.

The reminder is shown using device specific notifications. In this case a regular iOS Local Notification is used.

-(void) setAlarmInSecs:(int)interval withText:(NSString*)text {

    NSDate *alertTime = [[NSDate date]

                         dateByAddingTimeInterval:interval];

    UIApplication* app = [UIApplication sharedApplication];

    UILocalNotification* notifyAlarm = [[UILocalNotification alloc]

                                        init];

    if (notifyAlarm)

    {

        notifyAlarm.fireDate = alertTime;

        notifyAlarm.timeZone = [NSTimeZone defaultTimeZone];

        notifyAlarm.repeatInterval = 0;

        notifyAlarm.soundName = @"Alarm.mp3";

        notifyAlarm.alertBody = [NSString stringWithFormat:@"Time to take your %@ blood sugar reading.",text];

        [app scheduleLocalNotification:notifyAlarm];

    }

}

For entering the glucose readings the patient is also shown a trend for the data in an easy form so that any abnormal conditions can be easily identified and reacted to.

Historical Data

The application also added history details for the glucose and insulin.

Behind the Scenes

The JSON OData was consumed using the iOS Native JSON parser:

    NSError* error;

    NSDictionary* json = [NSJSONSerialization

                          JSONObjectWithData:self.receivedData

                          options:kNilOptions

                          error:&error];

This gives a dictionary of the received data that can be used within the applications. We chose JSON over XML as for XML parsing we would have needed to created a SAX Parser for the XML data which would have been more effort.

For the charting we used CorePlot. We chose this simply because we had only 1 hour to implement the graphs and were already familiar with CorePlot. The documentation for CorePlot is not the most elaborate, but they do provide excellent examples to build on.

For the Facebook style navigation we used the edgeCase SlidingViewController .

Both our HANA DB and SUP were AWS hosted systems. In this case we allowed anonymous access to our OData stream through SUP, both of which you can get free access to via the Developers Center.

Physicians Dashboard

The power of Advanced Diabetes Management is not only the ability to give the diabetic instant feedback to their health data, but also the ability for a physician to analyze the data of all patients in the pursuit of better health options for all sufferers.

jeff.cadow created the mockup of the physicians dashboard. Jeff will describe the dashboard in his blog.

App Rumbled at Sapphire

All three teams created incredible applications in the three week between idea selection and the presentation.

You can see all three finalists interviews with carolyn.fitton at Sapphire Orlando here.

Dan and Gary with their trophy:

3 Comments