AWS for Industries

Prior authorization for medical claims using Strands Agents

Every day, healthcare organizations navigate a complex web of administrative requirements, including prior authorizations, that pull providers away from patient care. Strands Agents are a solution to these challenges by providing an open-source SDK that builder organizations and system integrators can use to create specialized AI agents. These agents can transform healthcare workflows from sources of frustration into models of efficiency.

Developers can use Strands Agents to build sophisticated agents that understand medical terminology, navigate payor requirements, and integrate seamlessly with existing healthcare systems. These agents can dramatically reduce administrative burden, while improving patient experiences.

The healthcare administrative crisis

Healthcare practices complete an average of 39 prior authorizations for each physician weekly, with staff dedicating 13 hours to this single task. The impact reaches beyond administrative burden: 93% of physicians report care delays due to prior authorizations, with 29% linking these delays to serious adverse events for patients in their care, including preventable hospitalizations. The US healthcare system spends $35 billion annually on prior authorization administrative costs alone.

The manual process exemplifies healthcare inefficiency. Staff navigate multiple payor websites with inconsistent interfaces, compile documentation scattered across EHR systems and paper files, and re-enter information that already exists digitally. After submission, routine requests average two days for decisions, while complex cases stretch beyond a week. Medicare Advantage plans alone denied 3.2 million requests in 2023, yet appeals overturn 81.7% of these denials, revealing a system where initial rejections often lack legitimate clinical justification.

Strands Agents

Strands Agents represents a fundamental shift in how developers approach building AI agents. Traditional agent frameworks demand complex orchestration logic and rigid workflow definitions, often constraining rather than enabling innovation. Strands Agents takes a radically different approach by embracing the advanced reasoning capabilities of modern language models, providing developers with tools to build sophisticated agents with only a few lines of code.

The SDK operates on a principle that combines three core components:

  1. Developers select a model with reasoning and tool-use capabilities from providers such as Anthropic or Meta on Amazon Bedrock.
  2. They define tools that enable their agents to interact with external systems and perform specific tasks.
  3. The system prompts are written for the agent. They guide the agent’s behavior to achieve clear pre-defined objectives.

This model-driven approach means agents can dynamically adapt to different scenarios without predetermined workflow paths. The SDK handles execution complexity through an intelligent loop. The agent uses its model to plan steps, select tools, and process results iteratively until tasks are complete.

What makes Strands Agents particularly valuable for healthcare applications is their flexibility in both development and deployment, combined with proven production readiness. Builder organizations can prototype agents locally, test them with real healthcare data, and deploy them to production environments that meet stringent security and compliance requirements. For healthcare builders, this means access to a proven foundation for creating agents that can understand medical terminology and navigate complex payor requirements. They can also maintain context across patient interactions and integrate seamlessly with existing healthcare systems. This is all done while maintaining the observability and reliability that production healthcare applications demand.

Prior authorization using Strands Agents

Prior authorization complexity makes it an ideal candidate for AI agent automation, and Strands Agents provides the perfect foundation for builders to create sophisticated solutions. Insurance companies require approval for an ever-expanding list of services, with requirements varying by payor, plan, geographic region, and even individual patient circumstances. Builder organizations can leverage Strands Agents to create agents that navigate this complexity, while maintaining accuracy and compliance.

Architecture overview

The prior authorization agent operates through a streamlined process:

  • FHIR bundle processing: The agent receives standardized healthcare data in FHIR format, containing patient information, clinical encounters and procedure codes.
  • Guideline retrieval: It automatically downloads current billing guidance and fee schedules from relevant healthcare authorities.
  • Code analysis: The system examines current procedural terminology (CPT) codes to understand what procedures are being requested.
  • Decision generation: Using AI reasoning, it determines approval likelihood and generates supporting rationale.
  • Cost calculation: The agent calculates patient costs based on current fee schedules and coverage rules.

Architecture diagram for clinical prior authorization agent built using Strands Agents. The figure indicates how the agent accesses different guidance documents and the billing schedule. It also shows the major set of tools available for the agents. The indicated workflow is: a FHIR document is submitted, invoking an agent that triggers an AWS Lambda function to submit to the Strands Agents. The Strands Agents invokes a model from the broad choices of models available from Amazon Bedrock. It then chooses through appropriate reasoning the response tool selection (get_guidance_document_list (), download_documents (), parse_documents (), parse_fee_schedule (), and calculate_claim_approval ()). Once the correct speciality is identified from the document list in get_guidance_document_list(), the documents and fee schedules are downloaded using the download_document() tool. The documents are parsed using the parsing tools (parse_documents() and parse_fee_schedule()) and a final claim is calculated using calculate_claim_approval().

Figure 1. Strands based agent for clinical prior authorization.

The main execution script, run_prior_auth.py, orchestrates these tools through the Strands Agents framework, allowing the AI to determine which tools to use and when, based on the specific requirements of each case.

When denials occur, the agent analyzes rejection reasons against available clinical documentation and published payor policies. They identify missing information and suggest additional documentation that might support approval.

Real-world demonstration: Washington State Medicaid

For this demonstration, we will build a system that fetches information about claim approval guidelines from a single source of truth. We use guidance from the insurance provider. Our example uses Washington State Medicaid Guidelines for the claim approval and denial process. The webpage lists all guidelines for claim approval for different disease conditions and fee schedules.

Automated resource discovery
The agent begins by accessing a centralized resource file. This file contains authoritative URLs for healthcare guidelines and fee schedules. The system leverages advanced language model capabilities to analyze document titles and metadata. It identifies the most relevant guidance materials through the get_guidance_document_list() tool. This intelligent filtering confirms the agent works with current, applicable documentation and avoids processing irrelevant materials.

Dynamic document retrieval
Once the system identifies relevant documents, the agent employs the download_documents() tool. This tool automatically retrieves the latest billing guidance and fee schedules. It pulls information directly from authoritative sources, such as the Washington State Health Care Authority. This real-time approach verifies decisions are based on current policies and pricing structures.

FHIR bundle analysis and CPT code processing
The system processes incoming FHIR bundles to extract critical clinical and procedural information. It systematically examines CPT codes within the bundle. The system cross-references these codes against the retrieved billing guidance. This process helps it understand the clinical context and coverage requirements for each requested procedure.

Intelligent decision generation
The agent uses combined clinical data and policy guidance to generate evidence-based rationales for claim decisions. For approved claims, it automatically references current fee schedules. The system calculates precise patient cost responsibilities associated with specific CPT codes. This provides transparent cost breakdowns.

When claims require denial, the system provides clear, policy-based explanations. These explanations reference specific guideline violations or coverage limitations. Providers can then understand and potentially address issues for resubmission.

An example system prompt for the agent is as follows:

system_prompt = """ From the following patient data, choose which specialty closely aligns with the patient data.
Please choose the one that is the latest document for the given input of the patient data.
1. Return them as a dictionary with the keys 'pdf_urls' and 'fee_schedule_url'.
2. Download the latest document
3. Parse the fee schedule document. 
4. Only rely on the fee schedule document to calculate the claim approval cost
5. Only rely on the claim approval document to determine if the claim is approved or not.
Give a clear "SUCCESS" flag if the document is downloaded successfully. \
Do not use model's internal knowledge to answer the questions.
Give me the total cost along with the line items in the fee schedule document. \
Only use the fee schedule document and the costs mentioned in the columns to calculate the cost.
Also do include a breakdown or explanation of the cost for each line item.
Here is the list of specialties:
{}
""".format("\n".join(specialties))

In our example, the use of specialties in the beginning denotes the system is to use the list of titles in the resource guidance mentioned on the Washington State Healthcare Authority website.

Here are the steps you need to execute for running this code in your own environment:

  • Step 1: Confirm your account has access to Amazon Bedrock models, particularly Anthropic Claude 3.5 Sonnet (claude-3-5-sonnet-20241022-v2:0).
  • Step 2: Clone the amazon-bedrock-agents-healthcare-lifesciences repository from GitHub and execute the following command: git clone  https://github.com/aws-samples/amazon-bedrock-agents-healthcare-lifesciences.git

Go to the 29-Clinical-prior-auth folder by executing the following command: cd agents_catalog/29-Clinical-prior-auth

  • Step 3: Install the python packages: pip install -r requirements.txt
  • Step 4: Execute the agent: python run_prior_auth.py sample_patient_data/epsdt_patient_encounter_fhir.json

Several sample FHIR repositories are available in the sample_patient_data directory. We encourage you to try the other FHIR bundles as well.

Following in Figure 2 is the output of our example prior authorization agent. All the steps involved in the execution of the agent are shown. The orange box highlights the costs corresponding to the specific CPT codes as provided in the billing schedule.

The figure shows the steps executed by the agent for calculating the cost of the procedure based on the FHIR resource bundle. This specific example shows prior authorization of an Early and Periodic Screening, Diagnosing and Treatment (EPSDT) service. The agent identified the CPT Codes 99393, 99173, 92551 and 96110, looking up the associated costs in the fee schedule. These CPT codes are shown in an orange box to highlight the outcome. It further presents the total cost associated with the patient encounter for the two which did not indicate that the physician needed to be referenced for the fee amount.

Figure 2 – Example agent results output

The example encounter relates to an early and periodic screening encounter. The agent is able to look up the related documents on the Washington State HCA Billing guides and fee schedules page. By doing so, it streamlines healthcare cost calculations by automatically processing medical documentation. The system matches CPT codes on the billing schedule to generate accurate itemized bills.

The figure shows the fee schedule for EPSDT. It shows the fee associated with different CPT codes. The codes (96110 and 99393) in orange box are the ones identified by the agent in this example.

Figure 3 Fee schedule for early period screening, diagnostic and treatment (EPSDT)

Figure 3 is a billing schedule for early period screening, diagnostic and treatment (EPSDT) used by the agent. The oranges boxes indicate the CPT code used by the agent and the corresponding fee associated with the code. By referencing Figure 3 for the CPT codes and Figure 2 for pricing, you can understand how the codes align with their respective costs.

The examples mentioned in this blog and the resource document the agent uses are based on Washington State’s Health Care Authority website. However, you can use this setup for any other healthcare system as well. The core building blocks of the agent remain the same. How the agent accesses the guidance documents will vary on a case-by-case basis.

The future of healthcare administration

The prior authorization use case demonstrates the transformative potential of AI agents in healthcare administration. Organizations can automate complex processes that previously required extensive human intervention. This is possible by combining the reasoning capabilities of large language models with specialized healthcare tools and current regulatory knowledge.

This approach extends beyond prior authorization to other administrative challenges in healthcare:

  • Claims processing and denial management
  • Eligibility verification and benefits determination
  • Clinical documentation and coding assistance
  • Regulatory compliance monitoring and reporting

As healthcare continues its digital transformation, AI agents powered by AWS services like Strands Agents and Amazon Bedrock will play an increasingly important role. They can help reduce administrative burden and improve operational efficiency. They can ultimately provide healthcare providers with a way to focus on what matters most, delivering exceptional patient care.

Conclusion

The combination of AWS Strands Agents and Amazon Bedrock offer healthcare organizations a powerful solution to one of their most persistent challenges. By automating prior authorization processes through intelligent AI agents, healthcare providers can reclaim valuable time, reduce costs, and improve patient satisfaction.

The model-driven approach of Strands Agents makes it possible to build sophisticated automation solutions without extensive custom development, while the integration with Amazon Bedrock facilitates access to state-of-the-art AI capabilities. For healthcare organizations ready to embrace AI-powered automation, the prior authorization use case provides a compelling starting point with measurable benefits and clear return on investment.

Ready to transform your healthcare administrative processes? Explore the AWS Strands Agents SDK documentation and discover how AI can revolutionize your organization’s approach to prior authorization and beyond. Contact an AWS Representative to find out how we can help accelerate your business.

Further reading

Vikash Gupta, PhD, CIIP

Vikash Gupta, PhD, CIIP

Vikash Gupta, PhD, CIIP serves as a Senior AI/ML Solutions Architect on the AWS Global Healthcare and Life Sciences team, leveraging his 15+ years of radiology workflow expertise to architect transformative healthcare solutions. He is dedicated to democratizing healthcare access through cloud computing, with a particular focus on bringing quality medical services to underserved rural communities worldwide.

Naqi Khan

Naqi Khan

Dr. Naqi Khan, MD, MS, FAMIA serves as Chief Medical Information Officer (CMIO) of Healthcare Data & AI at Amazon Web Services (AWS), where he guides health systems globally in their digital transformation journeys. A physician informaticist who began his career in emergency medicine, Dr. Khan brings unique clinical perspective to healthcare technology innovation. Throughout his career at AWS, Microsoft Health AI, Kaiser Permanente, and other leading organizations, he has led development of AI applications that enhance clinical workflows and improve patient care delivery. His work spans developing ML-powered patient engagement tools, automating complex clinical processes, and establishing governance frameworks for responsible AI implementation in healthcare settings. Dr. Khan holds an MD from Stony Brook University, MS in Biomedical Informatics from Vanderbilt University, and BS from Cornell University.

Ujjwal Ratan

Ujjwal Ratan

Ujjwal Ratan is the leader for AI/ML and Data Science in the AWS Healthcare and Life Science Business Unit and is also a Principal AI/ML Solutions Architect. Over the years, Ujjwal has been a thought leader in the healthcare and life sciences industry, helping multiple Global Fortune 500 organizations achieve their innovation goals by adopting machine learning. His work involving the analysis of medical imaging, unstructured clinical text and genomics has helped AWS build products and services that provide highly personalized and precisely targeted diagnostics and therapeutics. In his free time, he enjoys listening to (and playing) music and taking unplanned road trips with his family.