During the COVID-19 pandemic, essential workers on the front lines push themselves everyday for the good of society. We were inspired by our friends and families who are out working right now.
Our good friend Aubrey is a nurse. She has an extreme work schedule of 12 hour night shifts 7 days on and 7 days off. Her shift starts at 8pm and ends at 8am. This schedule, while beneficial for a 24/7 operation, creates the largest misalignment of the body's endogenous circadian clock possible. This is known as a 12 hour phase advance. Most people experience large phase advances in the form of jet lag. A phase advance of this magnitude has been proven to cause daytime sleepiness, decreased alertness, loss of concentration, impaired performance, fatigue, irritability, disorientation, and depressed mood. Also, academic research has proven that medical workers create up to 5 times the number of diagnostic errors and make 300% more errors leading to a patient’s death due to sleep deprivation.
This large of a phase shift is daunting to anyone however, with the proper tools, data, and planning, a sleeping schedule can be generated to navigate through the shift.
This is why we created phase
What it does
phase is designed to help anyone that has large phase advances in their weekly schedules. We know nurses, doctors, control room operators, and grocery store restockers that all suffer from this.
Here is an example of a frontline worker's bedtime before using phase
In the graphic, Aubrey transitions to their new bedtime quickly and aggressively. This sharp transition has many negative health side effects and leaves her staying awake well over 24 hours on her first shift. phase combats these effects by pre planning a sleep schedule.
By preplanning a sleep schedule, phase can alter her wake and sleep times leading up to a shift change. This planning creates a smooth transition between working shifts alleviating the symptoms of large phase advances. In addition to sleep planning, we can accelerate circadian phase transitions through changes in melatonin, caffeine, and light exposure. The app understands all these factors and uses them to calculate the perfect sleep schedule.
How we built it
We designed and built phase as a mobile app so frontline workers could carry their sleep schedules anywhere. We put a lot of thought into the user experience and design to create the best transition possible between sleep schedules. The algorithm running the scheduler is hosted on Google Cloud Functions because of its high computational complexity.
Shift sleep cycle to new timezone as fast as possible
We can encourage a faster phase advance with doses of bright light, caffeine, and melatonin. By administering these supplements at the appropriate times, Aubrey’s endogenous circadian clock target can be reached faster.
Light Phase Response Curve shows how exposure to light, at specific times, will have the greatest impact on a phase advance. Based on this research, we created our algorithm to take advantage of these peaks for better results.
Melatonin Phase Response Curves give us specific dosage windows for the greatest effect on phase advancement. Also, caffeine is used at the start of every day to increase alertness and trigger the morning circadian response. Getting the user’s metabolic rate estimation from their age and weight, we are able to interpolate between regular suggested dosages and scale according to how drastic the change is.
Challenges we ran into
When designing the algorithm to generate schedules, complexity was a major concern. We didn’t want to run such a computationally expensive piece of code on the user’s phone. Luckily, with google cloud functions, we could centralize our algorithm and leverage gcp’s hardware to create a more seamless experience on our app. Now the app can generate schedules almost instantaneously to the user, but behind the scenes we have a proper pipeline setup through Google glcoud platform.
Accomplishments that we're proud of
We are proud that this fully functioning app is built on real scientific data and tackles a real tangible problem. We truly believe that phase has the ability to reduce the effects of sleep deprivation and improve quality of life of all frontline responders during this crisis.
We also are proud of how the team has been able to manage this new remote format and 24 time constraint. Our team is made up of an unusual assortment of relatively new hackers. Our team was able to produce a quality application with beautiful design, documentation, and a video.
What we learned
We learned how challenging it can be to create an algorithm that correctly adopts the scientific research being used to support our application. We spent extra time understanding how light, caffeine, and melatonin impact the body to make sure phase generates the healthiest schedule possible.
Some of our highlights from research include:
- Light and melatonin exposure need to occur at specific times of the day to maximize their potency
- Phase advances and phase delays and the effects on the circadian rhythm
- It was surprising to see how much of an effect sleep deprivation has on job performance
- The importance of avoiding unnecessary computational burden on the phone by offloading algorithm computation to Google Cloud Platform.
Not only do we now know these facts, we also know how researchers were able to determine these things Main bodies of research: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2829880/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4629843/
What's next for Phase
The next phase is to add on functionality for alarms and home assistants such as Google Home in which phase can control your house’s light levels to ensure proper light exposure. We believe that light exposure has one of the largest impacts on getting a quality night’s sleep, and home assistant support will give our user base a chance at end-to-end light exposure control.
Log in or sign up for Devpost to join the conversation.