In healthcare, the ability to quickly analyze and interpret medical reports is crucial for both healthcare providers and patients. While medical reports contain valuable information, they often remain underutilized due to their complex nature and the time-intensive process of analysis. This complexity manifests in several ways: the interpretation of multiple parameters and their relationships (such as various blood cell counts), the comparison of test results against standard reference ranges, and the need to analyze trends in health parameters over time. To address this challenge, we’ve conceptualized a medical reports analysis dashboard that illustrates how healthcare providers could enhance their interaction with medical data through a sample implementation
In this post, the created dashboard represents a convergent solution that brings together the power of Amazon Bedrock advanced AI capabilities, LangChain‘s document processing, and Streamlit‘s intuitive user interface. By using these technologies, we’ve created a system that not only stores and displays medical reports, but actively helps interpret them through natural language interactions and dynamic visualizations.
At the solution’s foundation are various large language models available through Amazon Bedrock, including Anthropic’s Claude series and Amazon Nova Foundation Models. You can select from options such as Claude Opus 4.1, Claude 3.7 Sonnet, Amazon Nova Pro, and others, each optimized for different performance and capability requirements. The chosen model processes natural language queries with medical context awareness, enabling detailed interpretation of healthcare data. With this flexibility, you can balance factors like accuracy, speed, and cost based on your specific needs. This is enhanced by LangChain’s document processing capabilities, which manage the retrieval system and maintain conversation context, facilitating accurate and relevant responses.
The solution’s data flow begins with medical reports securely stored in Amazon Simple Storage Service (Amazon S3), which are then processed through LangChain’s document handling system. When you interact with the Streamlit frontend, your queries are analyzed by Amazon Bedrock, while LangChain maintains the conversation context and manages document retrieval. The system processes this information and presents results through an intuitive interface featuring interactive visualizations.
These visualizations, powered by Plotly, include range comparison charts that clearly display normal versus actual values, bar charts for parameter comparisons, and trend lines for tracking changes over time. The Streamlit interface ties everything together, providing real-time interaction with the AI system while managing user session state and conversation history. This comprehensive approach helps ensure that medical professionals can quickly access, analyze, and interpret their medical reports through natural language queries while viewing supporting visual data.
The following is the architecture diagram of the solution that has four layers:

Before deploying the Medical Reports Analysis Dashboard, you need:
We’ll be using a Python virtual environment (venv) for this project to provide a clean, isolated environment. Virtual environments help avoid package conflicts between projects and make dependency management more straightforward. While we’re using Python’s built-in venv, you could alternatively use miniconda or other environment managers.
To get started with deployment, install the necessary packages on a local machine.
git clone https://github.com/aws-samples/sample-medical-analysis-dashboard.git
For Mac/Linux:
python3 -m venv venv
source venv/bin/activate
For Windows:
python3 -m venv venv
venvScriptsactivate
python3 -m pip install --upgrade pip
pip install -r requirements.txt
Project’s dependencies are listed in requirements.txt:
These packages will handle AWS integration, web interface, data processing, and visualizations. They’ll be installed in our virtual environment during the deployment process. This setup helps ensure that the components are properly installed and isolated in a virtual environment for optimal performance.
export AWS_ACCESS_KEY_ID='your-access-key'
export AWS_SECRET_ACCESS_KEY='your-secret-key'
Our repository contains two sample files:
basic_test.csv: Complete blood work with 15 parametersblood_test.csv with basic parametersThe following is the content of basic_test.csv:
Parameter,Value,Reference_Range,Unit
Hemoglobin,13.8,13.5-17.5,g/dL
RBC,4.8,4.5-5.9,million/µL
WBC,8500,4000-11000,cells/µL
Glucose,92,70-100,mg/dL
Creatinine,1.0,0.7-1.3,mg/dL
Run the following commands to upload sample files to the S3 bucket:
aws s3 cp basic_test.csv s3://BUCKET_NAME/
aws s3 cp blood_test.csv s3://BUCKET_NAME/
Go to app.py line 68 and update the S3 bucket name in app.py to match your actual S3 bucket name.
BUCKET_NAME = "your-bucket-name"
streamlit run app.py
The dashboard will be available at http://localhost:8501. You can now interact with your medical reports through the web interface.
This section walks through the key features and demonstrates how to effectively use the dashboard for medical data analysis.
The following figures show the complete dashboard where the selected medical report is blood_test.csv from the repo showing the navigation pane and main content. The first figure also shows the first two graphs.

The following figure shows the second graph of the three that are included in this dashboard.

The dashboard interface is organized into three main sections for medical report analysis:
blood_test.csvThe dashboard’s AI-powered query system demonstrates sophisticated understanding of medical reports through natural conversations. Here’s a sequence of interactions showing the system’s capabilities.
Question 1: Initial query about hemoglobin:
What is the hemoglobin level in report?

Question 2: Follow-up question demonstrating context awareness:
How does this compare to other parameters in the report? Are there any that stand out?

Question 3: Complex analysis request:
Can you analyze the distribution patterns of percentage-based measurements versus absolute values in this report, and identify any notable patterns in their reference ranges?

The system maintains conversation context while providing detailed insights from the medical reports, supporting responses with relevant data visualizations.
The solution can be further enhanced by fine-tuning the foundational model on organization-specific medical data, clinical questions, and domain expertise. This specialized training helps the model better understand medical terminology, standard protocols, and institution-specific practices. Additionally, organizations can use pre-trained medical LLMs available in AWS Marketplace, which are specifically optimized for healthcare use cases. When combined with the system’s existing capabilities, these specialized models can provide contextually relevant responses to medical queries while maintaining compliance with healthcare data governance requirements.
Amazon Bedrock guardrails should be configured to restrict the model from providing medical advice, prescriptions, or diagnoses, making sure responses are limited to data analysis and interpretation only.
While our current deployment uses dummy medical data for demonstration purposes, it’s crucial to consider security and compliance measures for real-world healthcare applications. Here are recommendations for enhancing security in a production environment:
Data privacy:
Recommended AWS security implementation:
These are general recommendations. For a production healthcare application, consult with security experts and conduct a risk assessment to make sure all relevant compliance standards are met.
To avoid ongoing AWS charges, follow these steps to clean up the resources created:
# Deactivate virtual environment
deactivate
# Remove project directory and virtual environment
rm -rf medical-analysis-dashboard/
In this post, we demonstrated the development of a conceptual Medical Reports Analysis Dashboard that combines Amazon Bedrock AI capabilities, LangChain’s document processing, and Streamlit’s interactive visualization features. The solution transforms complex medical data into accessible insights through a context-aware chat system powered by large language models available through Amazon Bedrock and dynamic visualizations of health parameters.
This project showcases how cloud and AI technologies can be applied to healthcare analytics, making medical report interpretation more intuitive and efficient. While our implementation uses dummy data for demonstration purposes, the architecture provides a foundation for building secure, compliance-aligned healthcare applications that can be enhanced to meet healthcare organizational requirements and security protocols.
Aditya Ranjan is a Delivery Consultant with AWS, specializing in distributed systems architecture and cloud-native solutions. He collaborates with customers to design and implement well-architected technical solutions using AWS’s latest technologies, including generative AI services, enabling them to achieve their business goals and objectives.
Shubham Tiwari is a Solutions Architect at AWS specializing in Modernisation, containers and Security. He has been helping customers in deploying highly scalable, resilient and cost optimised architecture on AWS.
Manuel Rioux est fièrement propulsé par WordPress