Submission Category:
Low-Code Legends
Brief Story to start with ๐ฎ
Let's go back in time and think about how sophisticated we are now. In the earlier 1990s, we didn't have enough computing power or as many powerful computers as we do now to do complex operations and not train a machine learning model for sure. You won't be able to sit along and code all day staring at a CTR monitor in front of you. Humans have always been these evolving creatures; How to use things, discover things, think differently of the world. With that said, computer science and technology have been in the boom since we started experimenting and pushing them to their limits. Now here we are in 2022, battling out which is the best editor (Vim Vs Emacs
) and with cloud empowering people to make digital transformations on all or most physical assets.
๐จโ๐ปFor people who say, enough of talk - YouTube Demo Link
๐ต๏ธโโ๏ธFor people who say, just show what you've built - GitHub Repo Link
Here is a small example of how technology can be utilized in the right way to build something for humanity to sustain better in this changing world. When you're talking about cancer, regardless of type, detecting it as early as possible increases the chance of survival.
Medical Background ๐ฉโโ๏ธ๐จโโ๏ธ
Skin cancer is the most common form of cancer, globally accounting for at least 40% of cancer cases and the most common type is nonmelanoma skin cancer, which occurs in at least 2โ3 million people per year.
Solution ๐งฉ
Seeing this and I thought why don't we solve something this bad, leveraging Power Platform for its simplicity and rapid development ability.
This solution is completely built by leveraging Low code/No code platforms such as Power Apps and Power Automate, as well as Azure serverless offerings. The flow goes something like this, employees/nurses in the hospital can add new patients into the system and upload their skin sample image which then goes through the ML model for initial screening, and the result is sent to a dermatologist for closure. Once this is done then an appointment is scheduled automatically if cancer is detected by the model and the dermatologist confirms the same. The desired treatment plan is created in the backend and updated in the SharePoint List which can be viewed by the patients through Power Apps. The dermatologist can view the slots booked and the patient details.
I've used Python in Azure Function, feel free to replicate the same in your favorite language. ๐ฑโ๐ค
Azure Services Used
- Power Apps as UI
- Power Automate for flow triggers
- SharePoint as database
- Azure Functions for exposing model endpoint and uploading an image to blob storage
- Logic Apps for receiving the response from Adaptive Card
- Azure Blob Storage for storing predicted images
- Azure DevOps keeping track of False-positive images
- Adaptive Cards (Outlook Actionable Message)
Architecture Diagram
Azure Resource Group
Peek look at how the Azure Resource Group.
Enough of talk! Letโs see things in action, shall we?๐คนโโ๏ธ
Patient Details Screen
With features like searching a patient based on Name, editing patient details, and adding new patients
Detect cancer type with ML model
As you see below we select the patient name from the dropdown, choose the image, and hit upload, a cool loader shows up to let you know that the image is sent to Azure Function, this triggers DetectSampleImage
Power Automate flow. This returns the detected cancer type, uploads the image to blob storage for future reference, and updates the patient list item in SharePoint.
The biggest part in doing this simple thing is how to send the image bytes to the flow and reconstruct the same in Azure Function
Send an adaptive card to the dermatologist
Once this is done, you can choose the dermatologist from the dropdown and send this report via Adaptive Card Actionable item, this triggers the SendEmailToDoctor
power automate flow and the step level is set to 1 now.
Adaptive Card reply
Now the dermatologist receives the card as shown below. He/she can choose to reply at any time. Once submitted, it hits the Logic Apps receiver endpoint
and the flow continues.
Logic App receiver
This gets the dermatologist's prediction type, appointment date, and time and updates it to the patient details list, and confirms the slot of the appointment. In the end, this also sends a card response to the dermatologist notifying that the details are saved successfully.
Patient Receives appointment confirmation
After this, the patient receives the appointment date and time and the link to the Power Apps where he/she can track their progress. The step level is set to 2 now.
Track details in Power Apps
Once the slot is booked the patient can track their progress with the timeline shown below their profile.
Dermatologist's view
After the flow is complete the slot requested
and slots booked
will be updated with appropriate values.
About the ML model used
- Model trained with images from the dataset here
- It gives out the following labels,
- basal
- Dermatofibrosarcoma protuberans
- cutaneous
- Merkel
- melanoma
- squamous cell carcinoma
- Negative
- Accuracy of 95% trained over 35 epochs
- You can find the model in the GitHub repo.
Power Apps Versions - 30 versions to make it work as expected
VS Code with Azure Extension gets the job done
Click here to learn who to upload this Power App to your environment
Future work/score:
- Auto-select the dermatologist based on the availability and critical care needed for the patient
- Send a Calendar invite instead of the plain text email when the dermatologist confirm the appointment
- Setup a retraining mechanism that trains the model with the latest images per month in Azure Machine Learning (designer)
- Live Chat assistance through Virtual Agents
- Set up a treatment plan for each patient who is diagnosed
Feel free to reach out if you need any further clarification on the implementation. I would be more than happy to answer those. ๐ค
Looking forward to hearing from you and improvements via Comments or PRs are most welcomed.๐
Congratulations!! ๐you have completed reading this huge blog.๐คฉ
Thanks a lot for reading out till the end.๐
Letโs connect if you want to collaborate on further work or a quick catch up.๐ค
References
Connect on LinkedIn
Connect on Instagram
Connect on Twitter
Santhoshkumard11 / enterprise-grade-skin-cancer-detection-and-treatment-solution
Using technology to make real impact on our day-to-day lives with Microsoft Azure cloud services and tools.
Enterprise grade skin cancer detection and treatment solution
This solution is completely built by leveraging Low code/No code platforms such as Power Apps and Power Automate, as well as Azure serverless offerings The flow goes something like this, employee/nurse in the hospital can add new patient into the system and upload their skin sample image into the system which then goes through the ML model for initial screening and the result is send to a dermatologist for closure. Once this is done then an appointment is scheduled automatically if cancer is detected and the treatment plan is created in the backend and updated in the SharePoint List. The dermatologist can view the slots booked and the patient details.
Top comments (8)
Congratulations.
Thanks Frank!
Thanks a lot Harsh!
Congratulations !!
Thanks Uday!
this is awesome ๐คฏ
We are powerful than ever! Make it count! โจ