We need iphone diabetics log application which will allow user to register specific entries into the application locally and then synchronize it with remote, existing web application via REST web services.
The application would have 6-7 types of entries, specific for diabetics (glucose, carbohydrates, exercises etc). Entries must be stored locally when in offline mode, then synchronized on demand when in online mode.
Online mode gives possibility to browse existing remote entries on the web application.
App will also allow registering for trial period on the website, and automatically authorize user on remote site when his/her credentials stored in iphone.
Iphone app for diabetics allows user to:
- register on web page [url removed, login to view] (screen 3), receiving info on success or failure (non-unique, wrong email, bad password etc - splash screen)
- login to app
- keep credentials (login/pass) on iphone permanently
- logout (in order to login as a different user)
- browse entries day by day, scrolling left/right (previous, next)
- add following entries types to specific day: glucose (decimal),
carbohydrates (decimal), activity (type, hours, min - screen 7, values
normalized to minutes), weight (decimal), medicines - based on entries
defined by user, note (free text). Date of entry is based on day
selected in app, time is always 'current'
Iphone application has 2 "natures" - offline and online. Application
recognizes whether phone is online or offline.
In offline mode application gives possibility to add new entries and
store them in local storage. There is possibility to create, edit,
delete local entries as long as not synced with web. While browsing
different days, app displays entries from local storage only. These
entries are marked as not synced (with an icon).
It is possible to add new medicines in offline mode, which are sent to
server during sync.
In online mode app gets all data both from web and local (offline) storage.
- entries not yet synced are marked with an icon
- while browsing days, local and remote entries are displayed together
and ordered chronologically
- remote entries are impossible to delete, update etc.
- local entries are possible to be edit or deleted
- user is able to synchronize local entries by pressing 'synchronize'
button (screen 4). Local entries are sent to [url removed, login to view] website (REST
Webservice), on successful sync all local entries are converted into
remote and local storage is emptied.
- medicines and profile info are permanent, ie. stored in local
- app should have following variables easy to configure: website URL,
decimal values precision (default: 1 decimal place), WebService URL,
text labels as dictionaries (properties)
- all the communication with website is based on REST WebServices
(limited to POST and GET methods), with base URL https://<domain>/ws
- register URL: POST <baseURL>/register/ POST data: email, firstname,
lastname, gender, child_option, time_zone, weight, height,
date_of_birth. As a response it receives JSON data (assoc array): OK
=> "" or FAIL => <error_text>. POST data must be validated locally
(email format, date format, weight, height (decimals)) etc.
- login - GET <baseURL>/login/<email>/<password> . Response OK or FAIL
(JSONed values). On OK app stores data locally and use them in
subsequent requests (or gives cookies if its possible on iphone)
- view - viewing specific day. GET
<baseURL>/day/<yyyyMMdd>/<email>/<pass> Response: JSONed assoc array
of several values in format: datetime => (entry_type => value)*
Response might be empty (no entries in specific day, no valid payment
- sync - syncronizing all data from local storage. POST
<baseURL>/sync/<email>/<pass>. POST data JSONed: [ entries =>
(entry)*, medicines => (new_medicine_name)* ]
entry := array( internal_id, datetime, entry_type, value, [, entry_subtype])
new_medicine_name := array(internal_id, string)
Response: JSONed array of internal_id's of entries and result of
their sync. Those with 'OK' would be synced and removed from local,
other with FAIL will persist in local storage. At the end of sync app
refreshes to daily view (sends 'view' request to current date)
Please see attached graphic design