Portal Telemedicina: AI-assisted healthcare blossoms in the Amazon rainforest

About Portal Telemedicina

Portal Telemedicina is a digital healthcare company that provides reliable, fast, and low-cost diagnostics to over two hundred cities in Brazil and Africa by allowing doctors to diagnose online. With innovative communication protocols and AI automation, Portal's solution enables interoperability across systems by connecting and acquiring data straight from medical devices.

Industries: Healthcare
Location: Brazil

A Brazilian startup is providing healthcare to over 30 million patients using IoT telemetry and an AI-assisted diagnosis platform that runs in the cloud.

Google Cloud Results

  • Integrates Cloud ML Engine and TensorFlow to increase diagnostic prediction from 65% to 95% accuracy
  • Creates an IoT gateway to the cloud for diagnostic devices using Cloud SDK and Cloud Storage
  • Processes 500,000 exam diagnostics in approximately 2 seconds using GCP
  • Leverages HIPAA compliance on GCP to help compete securely in the healthcare space

Reduces deployment time from 2 weeks to 30 minutes

Portal Telemedicina is delivering healthcare to millions of people with an AI-assisted diagnostic service solution. The Brazil-based firm began in São Paulo with two trucks and three nurses on a grant to provide rudimentary checkups to patients. Today, five years later, Portal Telemedicina uses Google Cloud Platform (GCP) to help hospitals and clinics serve over 33 million patients in 280 cities in Brazil and Angola.

A B2B model, the firm partners with healthcare providers including government agencies to provide responsive and reliable same-day diagnoses for patients, especially those residing in underserved areas throughout the Amazon rainforest.

Taming a fragmented ecosystem

To bring healthcare to these communities, the firm faced a daunting challenge. Medical device outputs such as electrocardiograms, electroencephalograms, x-rays, CT scans, and MRIs include images and data that are diverse and proprietary. Tracking and sorting examination results from multiple devices per patient became a processing bottleneck for the firm's technicians and medical team. "Taming this fragmented ecosystem of devices and data was crucial to large scale adoption of our solution," says Portal Telemedicina CEO Rafael Figueroa.

Using multiple Internet of Things (IoT) R&D grants, including from the Brazilian Science Ministry, the firm focused on integrating devices into a coherent framework that was both uniform and compatible with the electronic health records in use by hospitals. Rafael's team developed drivers and data handlers to extract information from the proprietary devices. The solution merges this data with patient exam histories and then makes it available to a custom-built web app used by doctors, nurses, and technicians.

As Portal Telemedicina routinized its device data, its server-based infrastructure posed a fresh challenge. "We were running monolithic servers 24/7 to scale the solution just as interest in our solution was taking off," says Rafael. That's when Portal Telemedicina turned to GCP to scale the solution.

A gateway to the cloud

To aggregate and store medical data, the Portal Telemedicina team used Cloud SDK to route data through a gateway to Cloud Storage. Telemetrically connected to on-premises medical devices in each clinic, the gateway is a laptop running processes that receive, extract, and compress examination data from device files, and then uploads the data to buckets in the cloud.

The Cloud Storage system features an automatic resume feature for paused jobs that has proven especially useful for the firm's remotely sited partner clinics. "When you're uploading an x-ray image from the rainforest, the internet can go down and come back one hour later," says Rafael. "When that happens, the gateway resumes the upload from where it left off, automatically."

The team designed the gateway to solve additional problems. To meet privacy standards, the solution had to provide highly secure encryption for personal medical data — name, gender, date of birth, prior conditions, and prescribed medications — in transit and at rest. The team used end-to-end encryption in Cloud SDK to meet these security requirements, including the strict protected health guidelines stipulated by the U.S. Health Insurance Portability and Accountability Act (HIPAA).

The gateway also performs a duplicate check to eliminate repetitive proprietary data entry from each connected device.

"In a few hours, someone who is not a data scientist can use Data Studio and BigQuery filters to create and share dashboards with graphical pie charts and bar graphs."

Gabriela Okrongli, International Expansion Manager, Portal Telemedicina

A data lake in the cloud handles 500,000 exam diagnostics in 2 seconds

Portal Telemedicina uses Cloud Storage and BigQuery as a data lake to perform a variety of downstream tasks. For example, when it adds a new clinic partner, the lake may grow by tens of thousands of records. BigQuery runs batch jobs to sort the new with existing data, consolidating records of patients who may have been examined at multiple clinics. Using an algorithm to guide BigQuery jobs, the solution isolates and eliminates duplicate patient records.

"We discovered that BigQuery is very scalable and it saves us time," says Rafael. "We don't need to think about replicating servers or load balancing because all this is done automatically in the backend." The cloud-based data lake can process 500,000 exam diagnostics in approximately 2 seconds.

Portal Telemedicina runs additional applications that access its BigQuery backend. Among them is Google Data Studio, which the firm uses to create dashboards for its sales team, operations team, and clients. "It's easy to use," says Gabriela Okrongli, International Expansion Manager for Portal Telemedicina. "In a few hours, someone who is not a data scientist can use Data Studio and BigQuery filters to create and share dashboards with graphical pie charts and bar graphs."

AI-assisted triage

Rafael and his team created deep convolutional neural networks that integrate the telemetrically connected medical devices and leverage an AI-generated medical finding classification system.

Portal Telemedicina trains its cloud-based neural networks using the Cloud Machine Learning Engine and TensorFlow. Using image data stored in Cloud Storage from a variety of device sources, the firm's computer vision models are continuously adding patterns to extend and refine its inference capabilities. The training algorithms are designed to enable screening for urgent care cases and to speed diagnoses.

Portal Telemedicina uses AI to classify medical findings and to recommend the urgency of treatment.
Portal Telemedicina uses AI to classify medical findings and to recommend the urgency of treatment. The AI piece relies on Google Cloud ML Engine and TensorFlow to enable computer vision processing known as convolutional neural networks (CNNs). Modeled after the mammalian visual cortex, CNNs consist of a set of filters that are trained to identify and classify patterns as they repeatedly scan images such as an electrocardiogram (shown above). With each pass, the network detects and learns increasingly more useful detail that culminates in a composite layer that is classifiable as a diagnosis. The system then assigns a score to the diagnosis to assist doctors in triage for urgent care cases.

For each incoming exam, the ML models evaluate the content — whether it is an x-ray screen or electrocardiogram chart. Based on their pattern-recognition processing, the models classify the findings — emphysema or arrhythmia, for example — and then assign a risk score. The system uses the score to automatically triage the patient's condition and generate notifications to the firm's medical team.

"The Google Cloud ML Engine gave us much more flexibility to create and tune our ML models compared to the other cloud services. When it comes to customizing the models, TensorFlow running on Cloud ML Engine is far superior."

Rafael Figueroa, CEO, Portal Telemedicina

Before presenting examination results to partner clinics or patients, Portal Telemedicina staff doctors use a web app to evaluate and confirm both the prospective diagnosis and the AI-assigned risk. High-risk patients move to the top of the queue to see clinic doctors at partner clinics. However, if a Portal Telemedicina doctor disagrees with the AI-assigned diagnosis or triage score, the system automatically notifies three other staff doctors tasked with performing oversight. The results of the oversight are fed back into the training algorithms to improve the ML models.

"The Google Cloud ML Engine gave us much more flexibility to create and tune our ML models compared to the other cloud services," says Rafael. "When it comes to customizing the models, TensorFlow running on Cloud ML Engine is far superior."

Even more striking is that, since integrating its Cloud ML Engine and TensorFlow solution, Portal Telemedicina has seen an increase in ML diagnostic reliability from 68 percent to 90 percent accuracy.

From servers to microservices to 20 percent savings

When it first started, Portal Telemedicina used a server-based cloud solution to launch its diagnostic service. After trying Amazon Web Services in 2014, Portal Telemedicina moved to IBM Softlayer, and then Microsoft Azure before settling on GCP in 2016. The company is now spending about 20 percent less with GCP services than with previous cloud providers even as the firm has significantly expanded its operations to meet growing demand. In fact, Rafael credits Google LaunchPad Studio and DeepMind for providing the impetus and guidance to redesign the solution around a microservices approach.

"Google Cloud Platform is way more flexible and modular to move things around, and the deployment cycle, which used to take 2 weeks, now takes about 20 to 30 minutes."

Rafael Figueroa, CEO, Portal Telemedicina

"We used to deploy a new version of the application every two weeks. We used the cloud, but it required a lot of servers on VMs to run our solution," says Rafael.

Today the firm's microservices-based solution uses the Google integrated Kubernetes Spinnaker, and Object storage. Spinnaker consumes Container Registry resources to build Docker images of the new release, which allows staff to track history, versioning and, if necessary, rollback the deployment.

With GCP, the firm saw immediate improvements when deploying new releases. "Google Cloud Platform is way more flexible and modular to move things around, and the deployment cycle, which used to take 2 weeks, now takes about 20 to 30 minutes," says Rafael. It's also been a boom to the firms' rapidly growing business.

Portal Telemedicina aggregates and uploads diagnostic data from devices to GCP using Cloud Storage and Cloud SDK. Cloud ML Engine with TensorFlow works in concert with Cloud Storage to deliver AI. The integrated services provided by Google Cloud for Kubernetes, Spinnaker and Object Storage allow the Cloud ML Engine to be easily added to any DevOps pipeline for model deployment and AI-assisted continuous delivery.
Portal Telemedicina aggregates and uploads diagnostic data from devices to GCP using Cloud Storage and Cloud SDK. Cloud ML Engine with TensorFlow works in concert with Cloud Storage to deliver AI. The integrated services provided by Google Cloud for Kubernetes, Spinnaker and Object Storage allow the Cloud ML Engine to be easily added to any DevOps pipeline for model deployment and AI-assisted continuous delivery.

The firm credits Google Kubernetes Engine (GKE) and Load Balancers for extending uptime by improving traffic distribution between cluster instances. With this combination Portal Telemedicina has reduced its merge and deployment time for new versions from 2 weeks to 30 minutes. This architecture helped ensure the security and reliability required to provide telemedicine service to clinics in over 280 cities.

Managing the records of millions of patients in healthcare, cloud-leveraged microservices architectures have the advantage of scaling to handle peak loads without bringing down fixed-server or VM architectures. Migrating patient data to new production releasers is easier as well. The team simply triggers the deployment pipeline Spinnaker and GKE consumes the container with the new version. The team then compares CPU, memory, latency, and other performance metrics, with the old version and migrates users in five percent increments to the new release. The payoff: service to clinics is unaffected, Portal Telemedicina feels confident about safely deploying new releases to production, and the live migration requires no hands-on support by the firm's engineering or operations staff.

The next step is to integrate the new Cloud Healthcare API on Portal Telemedicina microservices, facilitating the ingestion of standard medical protocols like HL7 and FHIR, which will allow large scale integrations with whole countries.

Leveraging the cloud to improve healthcare and lower costs

Portal Telemedicina sees its cloud-assisted solution as an enabling part of a larger movement toward providing universal access to quality healthcare. The firm cites its migration to Google Cloud services as a key to providing an accurate, responsive, and cost-contained diagnostic service and scale to meet the needs of new clients. In an evaluation of that migration to GCP, the company noted that "the cost of Google Cloud Platform is 10 percent to 30 percent lower than Azure, AWS, and IBM Softlayer."

"Google Cloud lets our company do much more at lower cost," says Rafael. "This allowed us to grow fast with less worries about scalability and especially cost."

Contributors to this story

Rafael Figueroa: Portal Telemedicina CEO. Rafael is an ML researcher who founded Portal Telemedicina. Rafael led the research of AILA (Artificial Intelligence Life Analytics) from FAPESP - São Paulo Research Foundation, coordinated the government R&D grant on IoT applied to digital healthcare, and previously founded Sociedade Verde (Green Society), an NGO that brings technology like solar energy, drones, and the internet to rural families. Before working in the healthcare field, Rafael founded two other startups and spent about five years in stock trading and managing offshore investments in a Latin America equity fund.

Gabriela Okrongli: Portal Telemedicina International Expansion Manager. After graduating from Boston University with a degree in Economics, Gabriela worked at the Overseas Development Institute, providing economic research on underdeveloped countries, and at the Foreign Exchange (FX) Flow Desk, with a focus on large multinational corporations.

About Portal Telemedicina

Portal Telemedicina is a digital healthcare company that provides reliable, fast, and low-cost diagnostics to over two hundred cities in Brazil and Africa by allowing doctors to diagnose online. With innovative communication protocols and AI automation, Portal's solution enables interoperability across systems by connecting and acquiring data straight from medical devices.

Industries: Healthcare
Location: Brazil