Wearable technology: Clothing designed to save your life
The ancient Greeks called it "the sacred disease".
Epilepsy affects about 50 million people around the world and is the most common serious brain disorder, according to the World Health Organization.
Diagnosis isn't easy.
A seizure has to be recorded while a patient is hooked up to an electroencephalography (EEG) machine.
"Epileptic symptoms vary widely and... many different types of epileptic disorders exist that react differently to various medical treatments," says Dr Vincent Navarro, a neurologist at the Pitie-Salpetriere Hospital in Paris.
"Moreover, seizures happen at an irregular rate. It is therefore rare to record a seizure while doing a standard EEG recording of 20 minutes to one hour.
"Finally, non-epileptic events are in nearly 20% of cases wrongly considered to be linked with epilepsy when they could be of a completely different origin, for instance loss of consciousness that can be cardiac or psychiatric."
The hospital is working with a start-up on something it hopes will make diagnosis easier and faster.
Instead of being hooked up to a machine via an array of cabling, patients wear a t-shirt and optional cap at home, and biometric sensors feed information to a smartphone app.
"Instead of using desktop computers that force patients to remain in bed, we can use smartphones and use a wireless connection," says Pierre Frouin, the chief executive of Bioserenity, which makes the Wemu system.
"You need to record the brain's electronic activity, an electroencephalogram. That signal is actually very, very hard to catch - it's a signal that's a microvolt, as opposed to an electrocardiogram which is a millivolt, so it's a thousand times smaller."
"The smartphone will do the first level of intelligence, and the internet connection will send that information to a cloud system [to be analysed]."
A firm diagnosis can be reached in a matter of days or weeks instead of potentially years - giving access to appropriate treatment.
"Epilepsy is not simply a one-off diagnosis. It can severely disable people in terms of their capacity to live meaningful, independent lives," says Carol Ireland of Epilepsy Action Australia, who are backing the project.
Developing technology like this means navigating complex regulatory frameworks.
Working with clothing also brings particular challenges. "The limitation would be on the sensors, how durable they are," says Paul Sonnier, publisher of the Digital Health Post.
"When you integrate electronics into clothing, you've got to think about the use case, is it alright washing? And how do you have it in the clothing so you can use it all the time?"
Complex technology also takes time.
A bra to detect breast cancer has been debated in various quarters over the past 20 years.
Then a company called First Warning Systems announced a prototype in 2012 that claims to use thermal dynamic measurement - which records differences in body temperature that are then analysed using a predictive algorithm - to find tumours.
Despite some initial scepticism from some in the field, the company remains confident the technology is sound, and has continued to develop the bra further. This includes using a removable insert for the version intended for use in healthcare institutions rather than embedded sensors, and further refinements of the algorithm that reads the data.
"Our technology [during clinical trials] was able to detect cancers in cases where mammography missed the diagnosis in tumours which were smaller than mammography would normally detect, or in those cases where the patient was listed as 'technically difficult to image', or those patients with dense tissue," says company president Rob Royea.
A fourth round of clinical trials is planned for October, and the company is in the process of applying for a CE mark (product approval) in the EU, and for FDA clearance for the current iteration of the product in the US.
Another problem can be persuading the medical profession of the merits of this type of technology, according to Paul Sonnier.
"The big challenge is doctors didn't want to look at that stuff in the past because... they didn't trust the data."
OMsignal manufactures a range of smart exercise clothing with biometric sensors that measure performance and gives you an electrocardiogram (ECG) reading.
The data is collected by a separate device, which communicates with an app on a smartphone, which then connects with the cloud where it can be analysed by a series of complex algorithms.
The company has carefully placed sensors with patented technology in the fabric. It claims that as the sensors will read vital signs when both wet and dry, it is more accurate than a wristband, for example.
"We need to wear clothes and so we figured that that's the best place to put these sort of sensors," says Dr Jesse Slade Shantz, OMsignal's chief medical officer.
"It is right in the clothes that you wear on a day to day basis."
Dr Slade Shantz was originally tasked with exploring whether the technology could replace the Holter monitor - a wearable heart tracker.
"The idea was that there's such a huge market there for us. It's something you would think that's like a golden goose right?" he says.
"But I know what doctors are like because I am one. And to get a doctor to accept that sort of technology, to replace something they're already using that fits into their daily routine is very difficult.
"Not to mention the fact that, particularly in the US, which is one of the major markets for these technologies, the physicians actually make money putting Holter monitors on people. They won't make money unless we somehow cut them in.
"So we had to be realistic and figure out what would make a sustainable business and then bridge into that."
Shipments of smart wearables are expected to grow from 9.7 million in 2013 to 135 million in 2018, according to CCS Insight.
As we get better at embedding technology into our clothing, and arguably become more comfortable with the idea that our knickers could know where we're going and what we're doing, smart clothing might just prove to be the most accessible and familiar way to sell wearable tech to the man in the street.
Wemu's Pierre Frouin is banking on it. Diagnosis is just the beginning - he wants the technology to tell the people around an epileptic what to do during a seizure.
"The final step is to get it to a point where it can predict when a seizure is likely to happen. This would revolutionise the life of patients and what those patients are allowed to do," he says.
Epilepsy Action Australia's Carol Ireland agrees.
"In many countries there is still misunderstanding and even stigma surrounding the condition," she says.
"Many people who have epilepsy are confronted by the dilemma of whether to 'go public' and risk the negative reaction of others in the community. Depression and even suicide is more common in those with a diagnosis of epilepsy than for the general public.
"Accurate diagnosis of epilepsy and seizure syndrome and effective management of the condition is core to patients achieving the best possible life quality and outcomes."