The Design and Implementation of a Mobile Health

The Design and Implementation of a Mobile Health Application with Apple watch for Seniors. (Myhealth) Master Thesis Defense Arij Alfaidi UCCS

Introduction � With the increase of elderly population, the demand on senior healthcare has been increased. 6/7/2021 Health. App for Seniors / Arij Alfaidi 2

Introduction � Health insurance expense limited seniors from staying at hospitals for a long time. Apps can used in daily life to improve health are need. � Developers have been focused on creating apps for monitoring many essential health functions.

Background Apple Watch was released 2015 and contains sensors for heart rate and activities monitoring. � Healthkit is an open source software for collecting/storing/ sharing/querying health data generated by app, performing statistical analysis. � Help developers develop different health applications � With data types supporting personal profiles, heart-rate, medicine. � � There are critical needs for mobile health applications. 6/7/2021 Health. App for Seniors / Arij Alfaidi 4
![Related Work [Diva 2013]"The use of personal digital assistants in clinical decision making by Related Work [Diva 2013]"The use of personal digital assistants in clinical decision making by](http://slidetodoc.com/presentation_image_h2/5efa65a1bb5d8668b34af147937b02dc/image-5.jpg)
Related Work [Diva 2013]"The use of personal digital assistants in clinical decision making by health care professionals: a systematic review. " Health informatics journal � Their result was in case of emergency sometimes the patient did not have the time to call for help and what if can we develop application that can sense that the patient needs help. [Guar 2015] Guardian News (2015). Apple Watch has designs on health industry – but is it good for doctors? The Guardian News. � how Apple watch sensors designed and how the watch is related to Health application. The conclusion was promising that the Apple watch future will make a difference in mobile healthcare industry. [Kise 2011]. "25 ways to use your smartphone. Physicians share their favorite uses and apps. ” � 6/7/2021 Smartphone made the users more aware of the disease and their effects on the patients. Health. App for Seniors / Arij Alfaidi 5
![Related Work [ONei 2013]. "Applying surgical apps: Smartphone and tablet apps prove useful in Related Work [ONei 2013]. "Applying surgical apps: Smartphone and tablet apps prove useful in](http://slidetodoc.com/presentation_image_h2/5efa65a1bb5d8668b34af147937b02dc/image-6.jpg)
Related Work [ONei 2013]. "Applying surgical apps: Smartphone and tablet apps prove useful in clinical practice. � study on senior people it shows that these application make the patient more aware of their health issues and they became more careful with their health. [Ozda 2012] "The smartphone in medicine: a review of current and potential use among physicians and students. � they made 60 study on the impact of using smartphones on health area. How can we used of the phone feature such as Wi-Fi, GPS. there is a difference [Yoo 2013] "The meaning of information technology (IT) mobile devices to me, the infectious disease physician. " Infection & chemotherapy � 6/7/2021 they studied why we should focus on seniors because they have more health issues and the population of elderly people in increase yearly. Health. App for Seniors / Arij Alfaidi 6

My Health My. Health System Architecture and Operations 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 7

My. Health Functions Reads the heart rate and when it is above or under certain level it alert Emergency contacts. � User can enter his emergency contact information and the app will save it. � Remind the user of his Medicine. � 6/7/2021 Health. App for Seniors / Arij Alfaidi 8

My. Health Functions � � � Remind the user to move and do some activity. Track and record user movement/ Count steps. If the user did not move for a certain time, notify the emergency contacts. Save the heart rate measurements and send it by email to the doctor 6/7/2021 Health. App for Seniors / Arij Alfaidi 9

My. Health Design � � � � Simple Direct Easy to use Two tabs one for medicine One for Emergency contacts Notification shows on IPhone And Watch. 6/7/2021 Health. App for Seniors / Arij Alfaidi 10

My. Health Operations User – i. Phone interaction 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 11

Heart rate Monitoring Medicine Reminder on the Watch 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 12

Implementation Development Platform and Software � Mac. Book Pro with El Capitan Operating System. � Apple Developer account � IDE: Xcode 7. 3 � Programming Language: Swift 2. 2 Deploying Devices: � i. Phone 6 with IOS 9. 1 � Health. Kit as a project capabilties. � Appple Watch and Apple Watch Kit as a project target. . 6/7/2021 Health. App for Seniors / Arij Alfaidi 13

func create. Heart. Rate. Streaming. Query(workout. Start. Date: NSDate) -> HKQuery? { let predicate = HKQuery. predicate. For. Samples. With. Start. Date(workout. Start. Date, end. Date: nil, options: HKQuery. Options. None) guard let quantity. Type = HKObject. Type. quantity. Type. For. Identifier(HKQuantity. Type. Identifier. Heart. R ate) else { return nil } Heart. Rate related Code 6/7/2021 let heart. Rate. Query = HKAnchored. Object. Query(type: quantity. Type, predicate: predicate, anchor: anchor, limit: Int(HKObject. Query. No. Limit)) { (query, sample. Objects, deleted. Objects, new. Anchor, error) -> Void in guard let new. Anchor = new. Anchor else {return} self. anchor = new. Anchor self. update. Heart. Rate(sample. Objects) } heart. Rate. Query. update. Handler = {(query, samples, delete. Objects, new. Anchor, error) -> Void in self. anchor = new. Anchor! self. update. Heart. Rate(samples)} return heart. Rate. Query} HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 14

motion. Manager. start. Device. Motion. Updates. To. Queue(NSOperation. Queue. current. Queue() !, with. Handler: { device. Manager, error in if CMPedometer. is. Step. Counting. Available(){ Device Motion Update Code 6/7/2021 self. pedo. Meter. start. Pedometer. Updates. From. Date(NSDate(), with. Handler: { data, error in guard let data = data else{ return } dispatch_async(dispatch_get_main_queue(), { () -> Void in if(error == nil){ self. timer. invalidate() print("Number of steps = (data. number. Of. Steps)") // let steps : NSNumber = data. number. Of. Steps let str. Convert = String(steps) let error. Alert = UIAlert. View(title: "You are Running or walking now", message: str. Convert, delegate: self, cancel. Button. Title: "OK") error. Alert. show() let second. Controller = Second. View. Controller() second. Controller. activate. Excercise() self. motion. Manager. stop. Device. Motion. Updates() }else{ self. show. Alert. Message. On. Crossing. Heart. Rate() } HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 15

Emergency Call func timer. Emergency. Call() { ++counter if counter == 10{ self. timer. invalidate() make. An. Emergency. Call() } } func make. An. Emergency. Call(){ var number : String = self. defaults. object. For. Key("phone. TF") as! String number = number. string. By. Replacing. Occurrences. Of. String( "\D", with. String: "", options: . Regular. Expression. Search, range: number. start. Index. . <number. end. Index) guard let mainphone = self. defaults. value. For. Key("phone. TF") { let url: NSURL = NSURL(string: "tel: //"+number)! UIApplication. shared. Application(). open. URL(url)}} 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 16
![func session(session: WCSession, did. Receive. Message message: [String : Any. Object], reply. Handler: ([String func session(session: WCSession, did. Receive. Message message: [String : Any. Object], reply. Handler: ([String](http://slidetodoc.com/presentation_image_h2/5efa65a1bb5d8668b34af147937b02dc/image-17.jpg)
func session(session: WCSession, did. Receive. Message message: [String : Any. Object], reply. Handler: ([String : Any. Object]) -> Void) { Make the Emergency Call if call. Bool == false{ if message. index. For. Key("heart. Rate") != nil { // the key exists in the dictionary print("adsdasdas") let value = message["heart. Rate"] as? NSInteger dispatch_async(dispatch_get_main_queue()) { if value! > 60 || value! < 50{ self. call. Bool = true self. make. An. Emergency. Call() } } 6/7/2021 } } HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 17

Performance The application takes about 1% of CPU uses some times to 4 % maximum. It is only needs 1. 5 MB of memory used. On the Watch the app take time to load. 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 18

Lessons Learnt � � � Building my application based on Apple’s new software and products. New/large api/frameworks to learn. New IDE Xcode 7. 3 to learn. Language Dramatic changes from Switch 1. 0 to Swift 2. 2. Xcode 7. 3 has a bug on app group so I change it to Use WCSession. Running on two simulators which are the IPhone and Apple watch is different than running on the actual devices. Research kit is written in Objective-C 6/7/2021 Health. App for Seniors / Arij Alfaidi 19

Future Directions Translate the heart rate values to ECG form To let the doctor diagnose and detect potential heart rate attack. � Remind the user of their medication by scanning the bar code and ensure they are the right ones. � Track the user move to make sure he is doing his exercises the right way. � Using Care. Kit which is a new kit will be released by the end of April to improve developing Health Apps. � 6/7/2021 Health. App for Seniors / Arij Alfaidi 20

Conclusion � � � I have developed an mobile health applications called My. Health to monitoring heart rate and activities of seniors and send alerts if needed. New Xcode 7. 3 and Swift 2. 2 help with the development and ensure the quality and reliability of the app developed but the learning curve is steep. Apple watch sensors with Healthkit can make it easy to create app. Developing Health application is not easy cause specially for critical area its related to human lives. The requirements for mobile health applications will change with the change of people health issues. 6/7/2021 Health. App for Seniors / Arij Alfaidi 21
![References [Diva 2013] Divall, Pip, Janette Camosso-Stefinovic, and Richard Baker. "The use of personal References [Diva 2013] Divall, Pip, Janette Camosso-Stefinovic, and Richard Baker. "The use of personal](http://slidetodoc.com/presentation_image_h2/5efa65a1bb5d8668b34af147937b02dc/image-22.jpg)
References [Diva 2013] Divall, Pip, Janette Camosso-Stefinovic, and Richard Baker. "The use of personal digital assistants in clinical decision making by health care professionals: a systematic review. " Health informatics journal 19. 1 (2013): 16 -2 [Guar 2015], Guardian News (2015). Apple Watch has designs on health industry – but is it good for doctors? The Guardian News. Retrieved from <http: //www. theguardian. com/technology/2014/sep/10/apple-watch-healthapp-iphone-smartwatch> [Kise 2011] Kiser, Kim. "25 ways to use your smartphone. Physicians share their favorite uses and apps. " Minn Med 94. 4 (2011): 22 -9. [Onei 2013] O’Neill, K. M. , et al. "Applying surgical apps: Smartphone and tablet apps prove useful in clinical practice. " Bull Am Coll Surg 98. 11 (2013): 10 -18. [Ozda 2012] Ozdalga, Errol, Ark Ozdalga, and Neera Ahuja. "The smartphone in medicine: a review of current and potential use among physicians and students. " Journal of medical Internet research 14. 5 (2012). [Yoo 2013] Yoo, Jin-Hong. "The meaning of information technology (IT) mobile devices to me, the infectious disease physician. " Infection & chemotherapy 45. 2 (2013): 244 -251. 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 22
![References Great. Call] http: //www. greatcall. com/lp/is-mobile-healthcare-the-future-infographic. aspx Appledeveloper] https: //developer. apple. com/ [Tom References Great. Call] http: //www. greatcall. com/lp/is-mobile-healthcare-the-future-infographic. aspx Appledeveloper] https: //developer. apple. com/ [Tom](http://slidetodoc.com/presentation_image_h2/5efa65a1bb5d8668b34af147937b02dc/image-23.jpg)
References Great. Call] http: //www. greatcall. com/lp/is-mobile-healthcare-the-future-infographic. aspx Appledeveloper] https: //developer. apple. com/ [Tom 2014] Tom Harrington “Sharing data between i. OS apps and app extensions” (2014) http: //www. atomicbird. com/blog/sharing-with-app-extensions [Miller 2014] Jen A. Miller “The Future of m. Health Goes Well Beyond Fitness Apps” (2014) http: //www. cio. com/article/2855047/healthcare/the-future-of-mhealth-goes-well-beyondfitness-apps. html JOVVH 2014 Jennifer M. Ortman, Victoria A. Velkoff, and Howard Hogan “ An Aging Nation: The older population in the United States. ” May 2014. 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 23

Demo 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 24

Questions ? 6/7/2021 HEALTHAPP FOR SENIORS / ARIJ ALFAIDI 25
- Slides: 25