You might have read about the London schoolboy who recently died after going into anaphylactic shock when a piece of cheese was thrown at him by a fellow pupil. It’s a tragic story which shows how severe allergic conditions can turn everyday items into lethal hazards.

Yet perhaps the saddest aspect of all is the fact that the boy, called Karanbir, could have been saved had his medical case contained an adequate supply of epinephrine, or adrenaline. The box contained only one EpiPen (the auto-injector containing the epinephrine) rather than two, and its dosage was 11 months out of date.

Karanbir suffered from anaphylaxis, a severe allergic reaction which can be triggered by a variety of plants, animals and substances. Around 150 million people worldwide are vulnerable to anaphylaxis and doctors are now talking about an “epidemic.”

In tandem with a company in Spain, founded by a pair of medical doctors, we are tackling the problem. We’ve worked with our long-standing associates Anna Sala and Adrià Curran to create anAPPhylaxis, an app which hooks up to a ‘smart’ Epipen case and monitors the state of the liquid inside, as well as ensuring the owner never forgets to take the case with them.

With this technology, we hope to better protect people like Karanbir and ensure that their survival is never again left to chance.

How a Dog’s Bark Changed Everything

The story of anAPPhylaxis began several years ago, with the sound of a dog barking in the woods.

anAPPhylaxis origins
The anAPPhylaxis project was born when a man suffered an attack while out with his dog.

The dog had found a man lying on the ground, having suffered an anaphylactic reaction to a snack while out walking. The man had carried his EpiPens with him, but didn’t know how to use them and had fainted in his confusion. Thankfully the dog’s pleading cry brought a passer-by to his aid.

Anna, along with her fellow doctor Adrià, had treated several anaphylaxis cases in her role as an allergy researcher at Barcelona’s Autonomous University. But when she heard about this case, she decided to do something.

Anna realized that, for allergy sufferers, simply carrying an EpiPen case wasn’t enough. Someone needed to build a product that would help anaphylaxis sufferers manage their case, ensuring they never lost it and could always get help if they suffered an attack.

So Anna began talking to Adrià about the problem, and they created their own company, Adan Medical Innovation, to build a solution (‘Adan’ is a combination of their two first names). In early 2015 they asked us to help build it.

How AnAPPhylaxis Works

The technology ensures that users always have their EpiPens with them; that the auto-injectors are always ‘in-date’ and of good quality; that the person administering the pens (either the attack victim or a passer-by rushing to their aid) knows exactly what to do; and that the victim’s emergency contact is notified when an attack occurs. The package provides peace of mind for both sufferers and their families, giving them a better life.

Video played during the Emergency Protocol of the App.

We’d love to say that the app we built is super-complex, with loads of amazing technology designed by us. But in fact, the real genius of the anAPPhylaxis system lies in the case. The app’s role is simply to communicate any problems to the allergy sufferer through a series of clear warnings, and instructions.

If the sufferer forgets their case, the Bluetooth connection cuts out as soon as it’s out of range, triggering an alert automatically. We’ve also added a GPS feature, which allows the case’s owner to track its last known location (in many countries you need a prescription to buy EpiPens, meaning allergy sufferers may have to wait hours, or even days, before getting a replacement).

anAPPhylaxis app screen
Bluetooth plays a key role in the anAPPhylaxis design.

To ensure the epinephrine is always in good condition, the case contains LED sensors which monitor its transparency. If the liquid becomes opaque, it’s a sign of degradation. Epinephrine can also be corrupted by extreme heat, so the app relays messages from an in-built thermometer whenever the case is exposed to temperatures beyond the recommended range.

Finally, whenever the case is opened, the app triggers an emergency protocol. A video flashes up, providing step-by-step instructions to the person administering the epinephrine and broadcasting each step at high volume to notify passers-by. The app also sends a notification via SMS to a pre-defined emergency contact, informing them of the anaphylactic attack.

Building the App

The design process was relatively straightforward. We installed a standard GPS technology to give the app its location-tracking feature, and added low-energy Bluetooth (LE) technology to create the wireless connection. Beyond that, it was just a case of good, old-fashioned coding.

What was really complicated, however, was the certification process. When building a piece of medical equipment, you have to meet certain standards. In this case, we were challenged to attain IEC certificate 62304, which governs medical device software, and ISO 14971, which addresses risk management for such devices.

It’s not the app that’s certified, but rather the process by which the app is built. As a developer, this requires you to note every single one of the app’s requirements, and explain at the end of the process exactly how each of those requirements was fulfilled.

So when building the app, we had to give each requirement its own identification number, and create a separate record for every single action undertaken within the project. Whenever we added any new features, we had to create a fresh record explaining which requirements we were trying to fulfil. It was a  time-consuming process, as anyone who’s glanced at our Git profile will understand.

anAPPhylaxis certification.
Achieving certification for the anAPPhylaxis project was a major challenge.

Then there was the testing. We needed to follow specific testing requirements and document each test, whether it was fulfilled or not. Any failures required a dedicated test report and re-testing.

As if that wasn’t enough, we had to go through both the software release phase, which required us to collect and check all information concerning each specific version of the application, and the validation phase, where we tested the software rigorously to ensure it met the needs and circumstances of the end user.

We tested for a plethora of specific corner cases (rare or unusual events which could happen during a user’s interaction with the product). For example, what would happen if the user arrived home, left the case on one side of the house and moved to the other? We needed to ensure the app wouldn’t think the user had forgotten the case because the bluetooth disconnected.

Any time we thought of a situation like this, we created a test for it. Sometimes, it felt like we were trying to solve a Rubik’s Cube blindfolded – which, as you can see below, is rather challenging.

The Final Stretch

But now, all the hard work that has gone into anAPPhylaxis over the past four years is about to bear fruit, as the product prepares for commercial roll-out. It has already undergone clinical trials at the University of Vall d’Hebron in Barcelona, which showed that the smart case reduced patient anxiety in 95% of cases and increased their satisfaction from 60 to 80%. Not only that, but the company has completed six funding rounds worth a total of €1.8 million.

anAPPhylaxis launch
The anAPPhylaxis project is ready for lift-off.

We’re in regular contact with Anna and Adrià, and they’re hugely excited about the launch. We are just as thrilled; we’ve already committed to working with the Adan team for the long term, adding new functionality to the app and addressing any problems that emerge.

If anAPPhylaxis saves even one allergy sufferer’s life, all the effort we’ve put into building the app will have been worth it. This might not be the most complicated project we’ve ever worked on, but it could be the most impactful.

Joan Martin

Starting with a mathematics degree, continuing with a computer science master's degree, and working on mobile and backend development during the past 10 years, Joan is a proficient software engineer. Motivated by great projects and an awesome team, Joan is currently leading the Mobile Jazz team and enjoying the MJ philosophy at its best.