Let’s Talk sales@avioxtechnologies.com
HealthcareFastAPIAWS SQS & LambdaData extraction

IHX receives medical communications from many hospitals, each with its own email system and format. This project built a Python pipeline that turns those emails into one data model, moved the processing onto asynchronous AWS services and modernized the APIs around it. The engineering detail below comes from the project; no failure-rate or speed figures are published yet.

1
Unified data model for emails arriving from many different hospital systems
3
Reliability measures: retries, idempotency checks and structured logging
4
Engineering challenges named on this page, each with how it was solved
illustrative example · email ingestion

A hospital email arrives in a format the pipeline has not seen from this sender before.

Queued and parsed. The message waits in SQS, a Lambda function picks the matching extractor and the result is mapped to the unified schema. A retry is logged if a step fails.

View recordProcessing logExtraction metrics

The problem with many hospitals and many formats

IHX is a healthcare technology platform working between hospitals and insurers. A good deal of what it needs from hospitals still arrives as email.

Every hospital sends that email differently. Systems, formats and communication channels vary, so data that means the same thing can look completely different from one sender to the next. Handling it by hand is slow, and at volume it is not realistic.

The existing APIs also needed attention. They were tightly coupled, which made new requirements slower to add. The goal was one dependable, scalable way to bring hospital data in, along with APIs that would be easier to change.

What we knew before we built

No before-and-after baseline is published for this project, so this page does not offer an improvement figure. What can be stated is the context the work sat in.

30+
Insurers IHX states it connects to, as shown on its site in November 2026
1
Schema that every hospital's emails had to map into
2
AWS services in the asynchronous path: SQS and Lambda

That set three requirements for the work. Emails in many formats had to come out as one consistent set of data. Sudden surges in volume could not overwhelm processing. And a failed extraction had to be retried safely, without creating duplicates.

The approach we chose

We separated ingestion from processing, and gave each hospital format its own extractor rather than building one parser for everything:

  • Modular extractors. Python parsers that adapt to each data format and normalize the output into one schema.
  • Asynchronous processing. AWS SQS queues incoming work, and AWS Lambda runs extraction and transformation.
  • Refactored APIs. Legacy FastAPI endpoints analyzed, optimized and reorganized along modular design principles.
  • Observability. Custom metrics and structured logs for extraction, latency and API health.

A hospital email moves through four stages:

  1. Queue. The incoming email is placed on an SQS queue, separating ingestion from processing.
  2. Extract. A Lambda function runs the extractor that matches the sender's format.
  3. Normalize. The extracted data is mapped to the unified schema, with idempotency checks to prevent duplicates.
  4. Serve. The data is available to the platform through the modernized FastAPI layer.
illustrative · ingestion path
1Queue — email received and queuedsqs
2Extract — matching parser runslambda
3Normalize — mapped to one schemapython
4Serve — available through the APIfastapi
Four stages, with a queue between arrival and processing, so that a surge waits its turn instead of overwhelming the system.

What we built

Our contribution was the extraction pipeline, the asynchronous processing and the API modernization.

Email extraction from multiple hospital systems

A Python-based pipeline handles emails from varied hospital communication channels and transforms them into a unified data model.

Refactored legacy APIs

Older FastAPI endpoints were analyzed, optimized and refactored to match changing product requirements, making them easier to read, scale and maintain.

Asynchronous data processing

AWS SQS and Lambda handle messages asynchronously, which spreads the workload and helps performance hold up as data volumes vary.

Error handling and reliability

Retry mechanisms, idempotency checks and structured logging support reliability, fault tolerance and transparency during processing.

Monitoring and observability

Custom metrics and logging track extraction success rates, processing latency and API health, which makes troubleshooting faster.

Every hospital can send data its own way, as long as it all comes out the same on the other side.

Aviox project teamDesign principle for the build

The guardrails around medical data

These emails carry medical communication data, and the platform depends on it arriving correctly. Care in both directions was part of the design from the start.

  • No duplicates on retry. Idempotency checks mean that retrying a failed step does not create a second record.
  • Retries for transient failures. Failed processing is retried, rather than lost.
  • Structured logs. Processing is logged in a consistent structure, so that problems can be traced.
  • Health metrics. Extraction success rates, latency and API health are measured, so that changes in behavior are visible.
  • A clear view of compliance. How health data is protected, stored and retained depends on IHX, its contracts and the applicable law. We do not describe the pipeline as compliant in itself.

What was reported

The project delivered email extraction across multiple hospital systems, asynchronous processing and refactored APIs. The effects below are what the project team reported; none of them is a measured result:

  • Ingestion. Automated extraction was reported to reduce manual intervention. No figure is published here.
  • Scalability. The SQS and Lambda architecture was reported to handle variable workloads efficiently.
  • Reliability. Error handling and monitoring were reported to reduce extraction failures and downtime. No figure is published here.
  • Delivery. Refactored APIs were reported to make new requirements quicker to integrate.

What stays hard

Four challenges shaped this work, and any team building healthcare data ingestion should plan for them. Each came with a specific solution.

  • Inconsistent formats and protocols. Hospitals send data in many different ways. We designed modular extractors and parsers that adapt to each format and normalize the output into a unified schema.
  • Data surges. Volume does not arrive evenly. We used asynchronous workflows on AWS SQS and Lambda to separate ingestion from processing.
  • Tightly coupled legacy APIs. Older code was hard to change safely. We applied modular design principles and clean refactoring to improve maintainability and reduce technical debt.
  • Reliable data flow. Extraction can fail for many reasons. We added retries, idempotency logic and structured error logging.

Discuss a similar pipeline

Expert consultation

Taking in data from many sources?

Talk to an expert about what a comparable project would involve.

Expert consultation

What was built, and what is pending.

These figures describe the project's scope. Failure-rate and speed figures are left out until the definition, period and baseline behind them are stated and the client has approved them.

1

Unified schemaFor emails from many hospital systems.

3

Reliability measuresRetries, idempotency checks and structured logs.

3

Health metricsExtraction success, processing latency and API health.

4

Challenges solvedFormats, surges, legacy APIs and reliable data flow.

Questions

About this case study.

What was built, how it stays reliable and what is not claimed.

  • Hospitals send medical communication data by email in many different formats. The pipeline extracts that data and normalizes it into one unified model that the platform can use.

  • Building the Python extraction pipeline, integrating AWS SQS and Lambda for asynchronous processing, refactoring legacy FastAPI endpoints, and adding reliability measures and monitoring.

  • Through modular extractors and parsers that adapt to each format, each producing output in the same unified schema.

  • Retry mechanisms try again, idempotency checks prevent duplicate records, and structured error logging records what happened so that it can be traced.

  • We do not make that claim as a generic feature. How health data is protected, stored and retained depends on IHX, its contracts and the applicable law.

  • The project team reported fewer extraction failures, but no figure is published on this page. A figure would need its definition, measurement period and comparison baseline stated alongside it, along with the client's approval.

  • Possibly. It depends on your sources, their formats and how much arrives at once. Take an expert consultation to talk it through.

Start a conversation

Map your data sources
and formats.

Tell us where your data comes from and how many shapes it arrives in. We will propose the pipeline, the controls and a first production slice.

sales@avioxtechnologies.com Reply within one business day · Mutual NDA available on request