Universal Windows Dev

Introducing PhysiHealth, a physiotherapy home exercise app

By 22nd June 2014 No Comments

The PhysiHealth project has been floating around my website in both my blog and portfolio for nearly two years now but I’ve never stopped to actually talk about what it is.PhysiHealth was a lazy but effective name combining the words physiotherapy and health. The project aims to aid patients undergoing physiotherapy to do their exercises at home through a set of specialised exercises for that patient which would be prescribed by their physiotherapist.

The Original Project – Imagine Cup


PhysiHealth .NET Gadgeteer kit

The project itself started as an Imagine Cup entry where I developed the first phase of the application for Windows Phone using a .NET Gadgeteer Bluetooth enabled pulse oximeter. Through discussion with my mentor, Rob Miles, the original aim was to use the pulse and blood oxygen levels as a way of tracking the patient while they performed their exercises which is the traditional method of recording data by the NHS. While the project was completed in an initial stage with minimal design, I wanted to carry on the development for my final year dissertation project.

The Second Phase – Final Year Project

On meeting with my project supervisor, we discussed the current state of the application and where I envisioned it going. My supervisor was very keen to see me do something more advanced than what I was doing and decided that it would be best if I ditched the Gadgeteer pulse oximeter and instead use the mobile phones own motion sensors to track motion to allow the physiotherapist to understand how the patient was performing their exercises at home and compare them against a perfect model. Although I had done A-Level mathematics and physics, it had been 4 years since I had even put those skills to use so much research and learning was made during the course of my final year project. The new changes saw me developing two algorithms for the project which were for converting the raw accelerometer and gyroscope data into displacement for 3D visualisation and a data mining algorithm that would compare the quality of the patients exercise to that of a regular person. These were both developed in MATLAB.

The technologies

So here is where this blog post will get a little more technical but I will go into depth in future blogs. I’m hoping to spend this week covering some of the major aspects of the project in detail so that you readers can benefit from my development.

In a very basic form, the final project is made up of 3 core components; the client application, a server to communicate with and the admin or physiotherapist’s application. As the title for my project was “A physiotherapy home exercise data captureĀ application using cloud technologies” the server-side applications were of course hosted in the cloud, in particular, Microsoft Azure. The main reason for using Azure was mainly due to me already knowing the platform from earlier personal development projects. Azure has proved quite useful for everything you could need from mobile services to VMs. In the context of this project, Azure played host to the mobile service for connecting the mobile application and physiotherapist applications together.

Windows Phone Client

Windows Phone client application

The client application is the mobile app that the patient would use to perform their exercises. Again like Azure, I chose Windows Phone 8 for this project mainly due to me knowing the development and the previous iteration for Imagine Cup was also developed in Windows Phone. However, due to the changes in my specification for the project, none of the code that was used in the previous version could be salvaged for the final year project although it was probably for the best. I had thought of a better way of making the application modular for inclusion of external devices in the future, such as, a Bluetooth mHealth wristband.

WebGL rendering of motion in 3D

WebGL rendering of motion in 3D

Finally, the physiotherapists application was a bit trickier to choose a technology for which had me attempting to build the app in two entirely different technologies. The first attempt was to learn something new and try out nodejs. Now, I have nothing against JavaScript as it is something that I am good at, however when it came to implementing the features for connecting the application to Azure, I couldn’t find a possible way of keeping the Azure code in the nodejs module code which is hosted server-side and not exposed to the client. It wasn’t just Azure that saw me have problems with nodejs though as I had developed my algorithms in MATLAB and with using the MATLAB libraries would have had to have written to algorithms out again in JavaScript. Instead of wasting more time attempting to make nodejs work for my project, I quickly switched to ASP.Net MVC with WebGL for the 3D rendering. Again, you can’t really go wrong with a technology that you know and have used before.

The best part about having a completely .NET based project is that all of the code and models thatĀ are used for Azure on Windows Phone were reused with the ASP.Net MVC application too which saved a considerable amount of development time.

If you’d like to hear more about the development of the project, I will be doing some YouTube tutorial videos ready for next month when I get internet at my home and I will be updating my blog all this week with the techniques I’ve learnt over the development of the project.

Leave a comment