AWS for Industries

Using Amazon Personalize to find the right doctor without a data scientist

Every day our digital experiences are highly infused with personalizations. Yet, the patient and clinical experience in healthcare remains mostly unaffected. We’ll show what a modern digital patient experience could look like, in which the patient gets recommended the right doctor or specialist for a particular illness based on the patient’s symptoms.


Despite recent advances in machine learning and recommendation systems, patient and clinical healthcare experiences remains mostly unaffected. Instead of having to randomly search for the right doctor one-by-one, with our application the patient could get the recommendation of the right doctor with very little effort.

The utilization of managed machine learning services for user personalization has huge potential for improving the healthcare experience of patients. This could reduce the suffering a patient undergos while finding the right path to the right treatment.

Natural language processing allows the extraction of relevant information from doctor’s notes and patient files. Digitalizing data points like notes and patient files helps our application recommend the right doctor for the patient based on the specific illness.

Healthcare providers would benefit from reduced costs, since less consultations are required to identify the right doctor and treatment.

A patient’s personal perspective

For years John Doe had symptoms of not being able to concentrate for long periods of time. Despite his mother’s inquiries about this, they were dismissed by his pediatrician. After seeking a secondary examination from a different doctor, John was diagnosed with attention deficit syndrome. John’s brain doesn’t produce enough norepinephrine, as a result he’s unable to stay focused for longer than 15 minutes.

John is not alone. The Child Mind Institute finds that 40% of children with diagnosable ADHD do not get treatment. Seeking a secondary practitioner’s opinion is important in treating undiagnosed patients. Building a digital patient experience could make finding a second expert practitioner as easy as getting a movie recommendation on Prime Video.

Overview of the Application

In a simplified version of the consultation flow the patient consults a practitioner. The practitioner examines the patient to write a diagnostic report. Based on the diagnosis the practitioner recommends a therapy or refers the patient to a different practitioner.

Looking at this simplified consultation flow we can already find touch points that could be augmented with managed machine learning services. The consultation could be improved by automating the transcription of the conversation or automatically digitalizing the practitioner’s notes. This would allow the practitioner to focus on the patient instead of documentation.

Machine learning services can then summarize key facts or identify and extract symptoms from the digital diagnostic report. With the extracted information machine learning services can relate the information to a therapy or to the expertise of a different practitioner.

Our example case study will show possibilities to improve the consultation flow with the goal of recommending other practitioners based on a patient’s medical history. To achieve this we need a secure and structured way to store medical data. Around this medical data we can use managed machine learning services:

  • To digitalize the practitioner’s notes
  • Identify medical terms in the diagnostic reports to understand the patient’s medical history
  • Use the medical history to recommend practitioners personalized to the patient

Figure 1 - Architecture with Amazon HealthLake as the central storage and managed machine learning services

Figure 1 – Architecture with Amazon HealthLake as the central storage and managed machine learning services

Our proof-of-concept application is a website for patients to find practitioners for a second opinion. It showcases how to combine purpose-built healthcare services with HIPAA capable machine learning services (Figure 1).

Figure 2 - Proof-of-concept solution showing John’s medical history

Figure 2 – Proof-of-concept application (patient view) showing John’s medical history

The Patient’s View
Patient John’s mother signs into the website and has the ability to see John’s entire medical history (Figure 2). His medical records are stored in Amazon HealthLake (HealthLake) and located in a Medical History tab. All diagnosis interactions between patients and practitioners, including all the diagnostic reports, are stored in HealthLake to create a custom dataset.

Amazon HealthLake is a HIPAA-eligible service to securely store and analyze health data in the cloud at scale.

HealthLake stores data using the Fast Healthcare Interoperability Resources (FHIR) standard. This standard makes the HealthLake interoperable. We could build integrations with existing medical systems or future digital patient experiences that all have the same data format at their core. In our proof-of-concept we use the FHIR standard to import John’s medical history.

To secure John’s sensitive patient data from unauthorized access, we use AWS Key Management Service (AWS KMS) to encrypt data stored in HealthLake. HealthLake also supports you bringing your own encryption keys. Encryption keeps data confidential and contributes to the integrity of the digital patient experience.

Figure 3 - Proof-of-concept solution showing a list of recommended practitioners

Figure 3 – Proof-of-concept application (patient view) showing a list of recommended practitioners

Back on the website John’s mother moves over to the ‘Doctors for You’ tab. This tab recommends a list of practitioners that John’s mother might want to consult for a second opinion based on his medical history. The website uses Amazon Personalize to personalize the ranking of practitioners for a patient.

Amazon Personalize is a managed machine learning service to create personalized recommendations for your individual customers. Developers can bring their own custom data into Amazon Personalize. Amazon Personalize chooses the right algorithm and trains a machine learning model on your data. Deploying the model on Amazon Personalize enables your production application to make API calls to Amazon Personalize to get near real-time recommendations. Many customers in the media, travel and hospitality, and financial services industry successfully use Amazon Personalize as a recommendation engine.

For the website we use Amazon Personalize to recommend practitioners based on a patient’s medical history. Amazon Personalize enables us to tailor the recommendations to a patient without data science expertise. We swiftly import our patient’s history of medical interactions and then Amazon Personalize will train machine learning models with the click of a button.

For each diagnostic interaction Amazon Personalize will learn what the interaction was about, such as what symptoms did the patient have, what treatments did the practitioner recommend, and other data points.

Figure 4 - AWS Management Console for Amazon Comprehend Medical showing an analyzed text and its extracted ICD-10-CM concepts

Figure 4 – AWS Management Console for Amazon Comprehend Medical showing an analyzed text and its extracted ICD-10-CM concepts

To extract this information from the full diagnostic reports we use Amazon HealthLake’s built in natural language processing capabilities found in Amazon Comprehend Medical. With this capability HealthLake can automatically extract entities, ICD-10-CM, and RxNorm terminology from the text in diagnostic documents (Figure 4). Amazon Comprehend Medical can understand the unstructured diagnostic documents that each practitioner writes in their own style and format.

From this understanding of the diagnostic interactions Amazon Personalize can learn which practitioner to recommend to which patient—as seen in the list of recommended practitioners for John (Figure 3).

John’s mother scrolls through the list and requests a second opinion from Dr. Ana Carolina Silva.

Figure 5 - Proof-of-concept (solution practitioner view) showing John's patient record after requesting a second opinion from the practitioner

Figure 5 – Proof-of-concept application (practitioner view) showing John’s patient record after requesting a second opinion from the practitioner

The Practitioner’s View
When Dr. Silva signs into her account on the website she sees John’s mother’s request for a second opinion. She now has access to John’s medical history and can take into account the diagnostic reports other practitioners have written (Figure 5).

Dr. Silva is ready to submit her second opinion on John. She can upload her diagnostic report as a PDF document, scan, or image. If Dr. Silva handwrites the medical notes about her patients. She can use her tablet to take a picture of the diagnostic report for John’s mother and upload it to the website.

However, we want to display the diagnostic report to the patient, or other practitioners, as text so that they don’t need to decipher Dr. Silva’s handwriting. To extract text from handwritten or non-digital diagnostic reports the website uses Amazon Textract.

Figure 6 - AWS management console for Amazon Textract showing a picture of hand-written text and resulting line extracted text

Figure 6 – AWS management console for Amazon Textract showing a picture of hand-written text and resulting line extracted text

Amazon Textract is a managed machine learning service that has been trained on millions of documents to analyze and extract text, tables, and forms from images and scans of documents (Figure 6). Like other services that are part of this application, Amazon Textract supports HIPAA compliance for medical workloads.

The day after John’s mother reads Dr. Silva’s second diagnosis, she schedules a consultation with Dr. Silva. Today, one year after deciding to go with Dr. Silva’s treatment, John can pay attention for more than 15 minutes and his quality of life has improved.


Today machine learning is present in many of the apps we use on a daily basis. At the same time healthcare largely happens offline. Together we can build a future in which machine learning infused digital patient experiences result in better health outcomes.

Our proof-of-concept digital patient experience shows how to combine purpose-built healthcare service and HIPAA-eligible machine learning services to create personalized practitioner recommendations. Amazon HealthLake forms the foundation for secure and interoperable digital healthcare experiences. Managed machine learning services, like Amazon Personalize, can use the data in HealthLake to personalize the patient experience without needing machine learning experts.

We hope this proof-of-concept inspires you to innovate on behalf of your patients. We are excited to know how you will utilize AWS managed machine learning service to build new digital patient experiences.

To find out more about how AWS and our partners can help you please contact a Representative.

Further Reading

Malte Reimann

Malte Reimann

Malte Reimann is a developer and builder at heart. As a Solution Architect he is a trusted advisor to small and medium sized businesses in Switzerland. Malte has a background in computer science with research in software engineering and mixed reality. Outside of work, he enjoys exploring the Alps on a mountain bike or with hiking boots. He invests a lot of time in his fitness and health, one of his life goals is to be able to do at least one push-up at age 100.

Arlind Nocaj

Arlind Nocaj

Arlind Nocaj is a computer science enthusiast and architect who likes to bring innovation to customers by using the power of cloud, algorithms and data. As a Solutions Architect at AWS Switzerland, he is helping enterprise customers to use the full potential of the cloud and accelerate their digital transformation journey. Arlind received a PhD in the area of network analytics and visualization (Graph Drawing) and has many years of hands-on experience as a research scientist and software engineer. Arlind has been helping customers in the Financial Services industry to solve various document processing problems by applying natural language processing and machine learning.