Return to Table of Contents

Background

SunSpot is a mobile application that will assist with skin cancer diagnosis. The intended customers of this application will consist of hospitals, dermatologists, other medical professionals, and medical research institutions interested in purchasing software that will assist in the diagnosis and tracking of skin cancer among their patients. The user audience of this mobile application will include a broad, diverse range of individuals of all ages, ethnicities, genders, and backgrounds. Moreover, the user audience will be individuals who are willing to use a mobile application to assist with skin cancer diagnosis.

In the report Cancer Facts and Figures 2021 published by the American Cancer Society, in the U.S. more than 9,500 people are diagnosed with skin cancer every day. The mortality rate is slightly above 2 deaths every hour. The Skin Cancer Foundation states, “when detected early, the 5 year survival rate of melanoma is 99%”. The American Cancer Society reports that, “Invasive melanoma accounts for about 1% of all skin cancer cases, but the vast majority of skin cancer deaths. In 2021, an estimated 106,110 new cases of invasive melanoma and 101,280 cases of in situ melanoma will be diagnosed in the US, while 7,180 people will die from the disease”.

The goal of SunSpot is to enable early detection of various types of skin cancer. The application will be used by a patient to collect photos of themselves on a monthly basis. These photos will be securely transferred to a server for analysis. The server will consume the photos in order to create a mapping of all moles and lesions that are found on the patient’s body. With continued usage of the application, historical analysis can be performed to identify if new skin spots are found, if any spots are growing in an abnormal manner, or if any spots are growing at an abnormal rate. The shape, size, and color of the spot will also be delivered into a machine learning algorithm that will eventually lead to the application’s ability to perform a diagnosis on its own. If any abnormalities are suspected, the patient will be notified to seek a medical professional for a diagnosis. Official diagnosis will be collected into the system allowing detection accuracy to increase over the application’s lifetime.


Requirements Summary

At a high level, the system will consist of a mobile application,  a server environment, and a web portal. The Users of the application are the patients. The Customers of the application are the medical facilities. Users will be on-boarded by the customer and provided the necessary instructions to create their user account. After download and installation of the mobile application on a mobile device, the account credentials will be used to authenticate into the server environment.

The mobile application shall allow users to upload images with optional notes from their mobile device to the server environment. Each image will be linked to a specific section on the body. For example, the mobile application will prompt the user to capture an image of their left forearm. After capturing the image, an algorithm will be run to ensure the quality of the image is acceptable for analysis. Else, the mobile application will prompt the user to retake the picture.

Persisted images in the server environment will be grouped by the date collected. The server environment shall perform an analysis of each image uploaded. The analysis will take into account the geometric shape of each spot, the color, the growth rate, and the growth pattern. Per analysis, the server environment shall be able to mark areas of concern for review by the customer. Notifications of observed abnormalities will be sent to both the users and the customer. The web portal will be used by the customer to review images, download images, and report the actual diagnosis. The actual diagnosis would be captured once the customer and user have met to review the reported abnormalities. Additionally, the mobile application shall allow for users to manually submit requests for images to be reviewed by the customer, if they desire.

Due to the sensitive nature of this patient data as well as HIPAA requirements, photos will be de-identified prior to transmission to a server for analysis. Security is a primary concern for the application to ensure confidentiality and integrity of the data collected. Secure storage and transmission of the photo must be achieved.

The American Cancer Society provides the ABCDE rule for identifying warning signs of the most common types of melanoma. However, it is important to note that not all melanomas have these signs and historical analysis is needed to guarantee discovery of new spots.

Scenarios

  1. Edward and his dermatologist agree that due to specific factors, Edward is at a higher risk of developing skin cancer. Edward is instructed to utilize SunSpot in order to capture pictures of his skin on a monthly basis. Each month Edward captures photos of specific areas on his body and uploads them for review. After three months, the system prompts the dermatologist of a new spot that is growing with an irregular shape. Edward and his dermatologist schedule a meeting to review the spot and find the spot to be melanoma. The dermatologist provides the diagnosis back into the system and continues on with the necessary treatment for Edward.
  2. Susy spends a lot of time in the sun and recently had a friend who was diagnosed with skin cancer. After a long day at the beach, Susy notices a spot on her arm with a greenish color. Susy remembers the hospital system that she uses has just rolled out a new feature for all patients allowing them to upload photos of suspected skin cancer. She used the SunSpot, provided by the hospital, to upload a photo of the spot she found. The system recognizes the spot as melanoma and sends a notification to both her and her doctor. Her doctor begins scheduling treatment immediately to ensure the melanoma does not spread to other parts of Susy’s body.

Requirements

Mobile Application

Server Environment

Web Portal

Critical Non-Functional Requirements


High-Level Design

The system design being considered must be able to reach a multitude of users, be lightweight,  make use of mobile phones and their cameras. When designing a mobile application in today's society the major consideration must be towards how to make use of the internet. This immediately drove the team to consider a client-server architecture shown below. 

The Client would be a mobile app downloaded onto the user's phone that makes use of the phone's camera. The server will be an image processing backend that receives requests from the clients to analyze the image for potential cancer. This seemed like a simple solution. However we know there are common issues when using the public internet infrastructure.  Each of the members of the team have worked on modern web applications so we knew this design could have more considerations.

First we knew we would need to make use of modern scalability through the use of cloud services to host the applications backend “server”. Second the design would need to make major security considerations since there would be personal health and identifiable information being stored. This is a major consideration always when designing a system that involves HIPAA regulations. The last area under intense scrutiny was the actual machine learning algorithm being used. The use of artificial intelligence solutions has exploded in recent years due to the computational capabilities catching up. Determining the algorithm that will most likely return the most consistent results is of extreme importance. False negatives could potentially be deadly.

This design led to the systems “server” using microservices. An authentication service to handle user profiles,authentication, authorization and token generation.  A service for image processing, which would contain the machine learning algorithm. Finally a communication service that allowed the user to receive feedback from the processing service and for images to be forwarded to medical professionals for further analysis.

Services and Design

The system will comprise multiple services. A frontend application where it will be hosted on the user's phone and a web application for medical professionals to use that will be hosted on an edge platform for fast delivery. The remaining services will be containerized and hosted on a cloud platform. These services will be an Authentication Service, Image Processing Service, Communication Service, an API Gateway Service, and a form of persistent storage using an SQL Database.

Frontend Mobile Application: 

The app being designed will have multiple factors playing into its layout. The goal will be to keep it as simple as possible. For the image taking functionality it will appear the same as the phones Operating Systems camera application whether that be IOS or Android. For simplicity across development it would be best to use a framework like react-native that allows for development for both OS platforms as well. This aligns with the mobile app requirements one and two. The first screen the user will see will be a splash screen showing a welcoming logo. This will then transition to the login screen. there will be an option to sign up using an email and password. It will also require the user to have a minimum complexity on their password. The use of a 2nd factor authentication will be required. Commonly either being the biometrics found on most phones or the option to receive an email or text. This meets MOBAPP requirements three through six. Once the user has finished the authentication process, they will be brought to the homescreen which allows them to take a photo or select a photo. The app will examine the camera qualities presented by the OS to make sure they meet the requirements. If the camera does not sufficiently meet the needed resolution it will not allow the user to take a photo. Once a user either selects or takes a photo the application will verify that the quality of the photo is sufficient by simply showing two example photos and asking the user if the image meets this quality criteria or if it is blurry to retake. The backend will also verify quality before processing. The image is then sent over HTTPS tunnel so all data is encrypted. The backend will then send a verification message notifying the image was successfully received and is being processed.

Web Application:

The web application will be used for medical professionals to determine the images flagged as potentially cancerous. It will also be used as a place for the doctors to do live chats with the user. It will require the medical professional to authenticate themselves as well. It will allow the physician to submit their diagnosis to their given health information system. This application should be developed in a similar framework as the mobile app such as  react to make development smooth for the frontend engineers. It should also take on Progressive Web Application values by presenting the same splash screen as the user mobile app. This is all how it will meet the WEBPOR Requirements one through three.

“The Server”

The server in the client server architecture shall be broken up into microservices that fit a specific role. This allows for simplicity in development, and for the services to be hosted differently depending on their future features. Each service will be containerized and hosted on a cloud platform. The platform will make use of Virtual private clouds to isolate the communication of services outbound and inbound.

API Gateway:

This is a simple service that provides multiple benefits. The api gateway will handle rate limiting and token verification. It will also be the only way into the virtual private network. It will verify all requests contain an authorization token that is not expired. It will then forward the requests to the respective service. This service would be well suited for a language like node.js with an express  framework that can handle tens of thousands of api requests. It will be light weight, and can scale with containers that create more instances using kubernetes if the workload grows to an extraneous amount.

Authentication Service:

The authentication service will provide authentication and authorization for different features. A Medical professional will have a different account compared to a patient user. This service will validate if the user has an account based on the username and password sent from the frontend mobile or web application. It will then prompt either for them to receive a one time token or use another form of authentication such as biometrics embedded in the mobile device. Once authenticated it will give a token that the app will store and send on any future requests. This meets the requirements of SERENV-001.

Image Processing Service:

The Image processing service will receive images from the gateway received from the users mobile device. This service will contain a machine learning algorithm that will identify highly likely skin cancer cases. The algorithm will most likely be a supervised classification algorithm. With current Image recognition algorithms using deep learning convolutional neural networks, that would most likely be the current best course of action. CNN’s have reached an ability to be accurate 96% of the time. This of course is a major concern which will cause the need for an accuracy measurement to be associated with every photo. All photos with less than a certain threshold will be required to be reviewed by medical professionals. This service will also handle the storing and encryption of personal images on the database. These database images will be saved as blobs since the resolution will require too great of detail for a base64 string to be saved. It will also handle checking dates of images every month and deleting ones that are older than ten years. This service satisfies the requirements SERENV-02, 03, 04.

Communication Service:

The communication service will receive unique id and diagnosis from the image service. It will use this information to pull from the database and generate a diagnosis pdf that will be sent in email to a correct medical professional. This service will also allow for instant messaging between a medical professional on the web portal and route them to the correct mobile user. It will use web sockets for this feature. This allows patients to have to communicate concerns with care providers that might not be visible in an image and comfort from a more sympathetic answer than an A.I. solution for responses here. This service will also establish a connection with the HIS and will use common communication for health care systems such as HL7. This service will satisfy the SERENV-05 requirement.

 

Design Rationale:

The mobile application we are designing will be a multi-component system that must be able to abide by strict security protocols and countless computations due to machine learning. To meet the requirements of our system, we have chosen specific architectures and designs for the following key decision decisions: 1) support numerous clients in an efficient, secure manner, 2) allow for capturing high-quality photos , 3) transmitting data securely, 4) processing and analyzing images with machine learning algorithms in addition to review from medical professionals, and 5) secure storage of all data. Additionally, these functions will conform entirely to the requirements specified in Mobile Application, Server Environment, Web Portal and critical non-functional requirements.

Trace Matrix:

Design Decision ID

Requirements Covered

DD01

  • MOBAPP-003
  • MOBAPP-004
  • MOBAPP-005
  • MOBAPP-008
  • MOBAPP-012
  • MOBAPP-013
  • SERENV-001
  • SERENV-005
  • FUN-002
  • FUN-003
  • FUN-005

DD02

  • MOBAPP-001
  • MOBAPP-002
  • MOBAPP-006
  • MOBAPP-007
  • MOBAPP-010
  • MOBAPP-011
  • FUN-001
  • FUN-003

DD03

  • MOBAPP-003
  • MOBAPP-004
  • MOBAPP-005
  • MOBAPP-008
  • MOBAPP-012
  • MOBAPP-013
  • SERENV-001
  • SERENV-005

DD04

  • MOBAPP-006
  • MOBAPP-007
  • MOBAPP-011
  • SERENV-003
  • SERENV-004
  • WEBPOR-001
  • WEBPOR-002
  • WEBPOR-003

DD05

  • MOBAPP-009
  • MOBAPP-010
  • SERENV-002
  • FUN-005

Design Decision 1 (DD01): Support numerous clients in an efficient, secure manner


The SunSpot mobile application will be used by a large number of individuals who will periodically establish a connection to the server environment to upload high resolution photos. Knowing that our mobile application will be used by numerous individuals, we have our first design decision which entails supporting numerous clients in an efficient, secure manner. For this design decision, we have decided to utilize a client-server architecture to meet the demands of multiple users connecting to the server environment to upload large data sets from mobile devices. It will allow the system as a whole to operate efficiently and serve numerous clients simultaneously. Allowing our team to modularize the server and mobile application, providing the ability to implement future changes in one module without the need to make changes on the other side. It will also allow us to meet scalability demands once more customers begin to use the application. This architecture will allow for centralization, which will fortify data integrity and availability. Moreover, it’s design will allow for reliability by utilizing cloud infrastructure which can dynamically scale to handle more traffic or support disaster recovery.

Design Decision 2 (DD02): Allow for capturing high-quality photos


As our mobile application will assist with a skin cancer diagnosis, it is essential that our system allows for easily capturing photos of the patient's body. Due to the proliferation of mobile devices with attached cameras into the consumer market, most individuals carry with them the ability to capture high resolution photos. It is important that the mobile application is able to determine whether or not the attached camera has the capability of capturing images at the needed resolution. Additionally, it is important that the captured photos do not exhibit any motion blur caused by movement of the hand during capture. An algorithm will run on the mobile application to ensure the quality of the photo captured and prompt the user to recapture the photo if the quality requirements are not meant. This will help prevent the machine learning algorithm from making incorrect determinations. Restricting the capture of photos to only mobile devices allows SunSpot to help ensure confidentiality and chain of custody of the photos. If the user were to capture photos on a camera and transfer those to a PC, the SunSpot application would have no control over the images. Thus giving way to the possibility of a leak of sensitive patient data. Having all data contained on one device allows for better controls to be implemented to prevent sensitive data exposure.

Design Decision 3 (DD03): Transmitting data securely

Since we will be dealing with patient data, we made a key design decision to prioritize security and allow for securely transmitting data between client and server. TLS (Transport Layer Security) version 1.2 or higher will be enforced to ensure the security of data in transmission between the mobile application and the server environment. Two-factor authentication will be enforced so that users are protected in case their account credentials have been compromised. Connection between the server environment and the customer’s HIS (Health Information System) will be secured with IPSEC as a VPN will be established with each customer wishing to integrate SunSpot with their patient information system. DD01 further supports this design decision as the client-server architecture is necessary to utilize both TLS and IPSEC.  

Design Decision 4 (DD04): Processing and analyzing images with machine learning algorithms in addition to review from medical professionals
        

Processing and analyzing images with machine learning algorithms will be the bulk operations for our system. Therefore, we needed to make key design designs that support the requirements that follow:(FUN-001), (SERENV-003), and (SERENV-004). Additionally, we will have to make design decisions which support (WEBPOR-001), (WEBPOR-002), and (WEBPOR-003). Utilizing a client-server architecture will certainly help with processing the images, as well as for machine learning and machine learning algorithms. The server will be capable of handling multiple requests and inputs in addition to processing and analyzing images it receives with machine learning algorithms. As for the design of the server, we believe python should be utilized here. Python is a powerful language which is very commonly used for machine learning and handling data. Moreover, it supports numerous, well-supported and documented libraries that can be used for assisting with processing images and machine learning. Python is an excellent and effective language to be used for creating web servers. The goal of this design decision is to have a high level of specificity when discovering areas of concern. False-negatives should be mitigated to ensure that the system is not incorrectly missing a potential case of skin cancer. False-positives are more acceptable in this case as there is an official review completed by medical professionals.

Design Decision 5 (DD05): Secure storage of all data.

Since Sunspot will be dealing with personal medical data, we had to make key design designs that abided by strict security requirements that meet the various frameworks mentioned within FUN-005. With this in mind, we ensured our design guarantees all data being transmitted, captured, or used was encrypted while in the database and during transit. The photos will remain encrypted both on the captured device and while at rest on the server. Keys used in the encryption process will be rotated on a yearly basis. While this does lead to processing overhead when handling the images, it is a necessary practice to ensure the confidentiality and integrity of the data being processed.  

Conclusion

In conclusion, Sunspot will be a mobile application utilizing a client-server architecture and machine learning to assist with skin cancer diagnosis. Upon designing the application, we agreed upon 5 essential design decisions that played critical roles in determining how we choose to design this mobile application. These design decisions included wanting to support numerous clients in an efficient, secure manner, allow for capturing photos, ensuring data was transmitted securely between clients and sever(s), utilizing machine learning to help process and analyze images in addition to ensuring medical professionals can review the images too, and enforcing secure storage of all data by HIPAA standards. A client-server architecture was chosen to be used for this application for its ability to tackle several key design challenges we encountered. Moreover, by using this architecture, we would be able to have all of our patient data in one centralized location, easily scale our application to allow for more or less traffic, handle and support numerous clients at once, and provide proficient security to meet all of our requirements.

Previous Return to Beginning