Monday, September 15, 2025

Amazon Comprehend Medical | Overview & Hands-On.

Amazon Comprehend Medical - Overview & Hands-On.

Scope:

  • Intro,
  • The Concept: Amazon Comprehend Medical,
  • Core Capabilities,
  • How Amazon Comprehend Medical Works (Workflow),
  • Sample Input/Out medical data,
  • Compliance & Security,
  • Integration Patterns,
  • Benefits,
  • Limitations,
  • Final-thoughts,
  • Project: Hands-On.

Intro:

    • Amazon Comprehend Medical is a natural language processing (NLP) service by Amazon Web Services (AWS) 
    • Amazon Comprehend Medical uses machine learning to extract relevant, structured medical information from unstructured clinical text.
    • Amazon Comprehend Medical is a fully managed, HIPAA-eligible service designed to help healthcare organizations process vast amounts of patient data from sources such as physician's notes, discharge summaries, and test results.
    • Amazon Comprehend Medical is a specialized NLP(Natural language processing) service built for healthcare and life sciences.

 The Concept: Amazon Comprehend Medical.

    •        Amazon Comprehend Medical is a HIPAA (Health Insurance Portability and Accountability Act )-eligible NLP (Natural Language Processing) service that extracts clinical and medical information from unstructured text, such as doctors’ notes, clinical trial reports, pathology notes, EHRs (Electronic Health Records), and insurance claims.
    •        It’s a domain-specific extension of Amazon Comprehend, trained on biomedical and clinical data.

 Core Capabilities

  1. Entity Recognition (Medical-Specific NER)
    • Detects entities like medical conditions, medications, dosages, anatomy, procedures, tests, and treatments.
    • Example: “Patient is taking 10mg of Lisinopril daily for hypertension” Medication: Lisinopril, Dosage: 10mg, Condition: Hypertension.
  2. Relationship Extraction
    • Links entities together for context.
    • Example: Associates “10mg” with “Lisinopril” and “daily” as frequency.
  3. Protected Health Information (PHI) Detection
    • Identifies and redacts PHI (names, addresses, dates, phone numbers, etc.) to comply with HIPAA.
  4. ICD-10-CM & RxNorm Coding
    • Automatically maps detected conditions and medications to ICD-10-CM (diagnosis codes) and RxNorm (drug codes) for downstream systems.
  5. Trait & Attribute Extraction
    • Extracts context like Negation (“no history of diabetes”), Time references (“two weeks ago”), Test results (“positive for strep A”).
  6. Custom Use with AWS ML Stack
    • Works with Amazon SageMaker if advanced customization or model fine-tuning is needed.

 How Amazon Comprehend Medical Works (Workflow)

    1. Input Free-text medical notes, reports, EHR documents.
    2. Processing Comprehend Medical analyzes the text with pretrained medical NLP models.
    3. Output JSON Extracted structured data (entities, relationships, codes, PHI annotations).

Sample Input:

    • The patient has a history of diabetes but no evidence of retinopathy.
    • Prescribed 5mg Glipizide daily.

Sample Output (simplified):

{

  "Entities": [

    { "Text": "diabetes", "Category": "MedicalCondition", "ICD-10-CM": "E11" },

    { "Text": "retinopathy", "Category": "MedicalCondition", "Trait": "NEGATION" },

    { "Text": "Glipizide", "Category": "Medication", "RxNorm": "310798" },

    { "Text": "5mg", "Category": "Dosage" },

    { "Text": "daily", "Category": "Frequency" }

  ]

}

 Compliance & Security

    • HIPAA eligible can process PHI under BAA.
    • Runs on AWS-managed infrastructure (scalable, secure).
    • Can mask/redact PHI before storing or sharing.

 Integration Patterns

    • Clinical Decision Support: Extract structured insights from unstructured notes.
    • Clinical Trials: Automatically mine eligibility criteria and outcomes from trial reports.
    • Revenue Cycle Management: Map conditions & treatments to billing codes.
    • Population Health Analytics: Aggregate conditions, treatments, and risk factors across EHR datasets.
    • PHI Redaction Pipelines: Remove identifiers before sharing medical text for research.

Benefits

    • Purpose-built for healthcare (higher accuracy than generic NLP).
    • Removes manual coding work (ICD-10, RxNorm).
    • Scales to millions of records with no ML expertise required.
    • Seamlessly integrates with AWS healthcare data pipelines (S3, Glue, Redshift, Athena).

 Limitations

    • As at September 2025, Amazon Comprehend Medical supports Only English medical text.
    • Models are pretrained—domain adaptation may require custom ML via SageMaker.
    • Works best on clinical-style text; less effective on informal patient notes or mixed-language datasets.

twtech Final-thoughts: 

    • Amazon Comprehend Medical transforms messy, unstructured medical text into structured, coded, and compliance-ready data.
    • Amazon Comprehend Medical helps in accelerating healthcare analytics, clinical research, and patient care workflows.
Insights:
  • A side-by-side comparison of the three leading cloud providers’ healthcare NLP(Natural Language Processing) services:

 Healthcare NLP Services Comparison

Feature / Capability

Amazon Comprehend Medical

Google Cloud Healthcare NLP (AutoML + Healthcare APIs)

Microsoft Azure Text Analytics for Health

Core Functions

Medical entity recognition (conditions, meds, dosages, procedures, tests, anatomy), PHI detection, relationship extraction, ICD-10-CM & RxNorm coding

Medical entity recognition, de-identification, ontology mapping (UMLS, SNOMED CT, RxNorm, LOINC), entity relationships

Entity recognition for clinical terms, PII detection, relation extraction, negation & temporal context, SNOMED CT & UMLS integration

Medical Ontology Support

ICD-10-CM & RxNorm

UMLS, SNOMED CT, RxNorm, LOINC

SNOMED CT, UMLS, ICD-10-CM

PHI/PII Handling

✅ PHI detection & redaction (HIPAA-eligible)

✅ De-identification API for PHI (HIPAA-eligible)

✅ PHI/PII detection and redaction (HIPAA-eligible)

Relationship Extraction

✅ Links between meds, dosages, conditions, tests, procedures

✅ Identifies relationships between clinical concepts

✅ Identifies relationships (condition treatment, medication dosage, etc.)

Negation & Temporal Context

(e.g., “no evidence of retinopathy,” “two weeks ago”)

✅ Advanced temporal and contextual reasoning

✅ Strong support (negation, time expressions, conditionality)

Customization

Limited relies on pretrained models (can extend with SageMaker)

High AutoML for domain-specific NLP

Moderate model customization limited, but strong healthcare focus

Language Support

English only

English (with some multilingual expansion via AutoML)

English (focus on clinical/biomedical text)

Integration Ecosystem

Deep AWS integration (S3, Redshift, Glue, Athena, SageMaker, Connect)

Tight GCP integration (FHIR APIs, BigQuery, Vertex AI, Healthcare Data Engine)

Strong Azure integration (FHIR on Azure, Synapse, Power BI, Logic Apps)

Deployment Options

Fully managed API

Fully managed API + AutoML + Healthcare APIs

Fully managed API + container support (on-prem / hybrid)

Best Fit Use Cases

Clinical documentation, revenue cycle coding, PHI redaction, clinical trials

Research, biomedical text mining, large-scale healthcare datasets, ontology-driven workflows

EHR analytics, hospital IT workflows, compliance-driven use cases, healthcare providers

Final Tips:

    • Amazon Comprehend Medical Best for EHR integration, billing/claims coding, PHI redaction, AWS-native healthcare workflows.
    • Google Healthcare NLP Strongest for ontology-heavy research use cases, pharma/biomedical R&D, clinical trial mining.
    • Azure Text Analytics for Health Best suited for healthcare providers, with compliance + hospital workflow integration and Microsoft ecosystem fit.

Project: Hands-On

  • How twtech created and use Amazon Comprehen Medical to anaylyze Health text imput.

Search for aws service:  Conprehen Medical.




  • Launch a real-time analysis:

Real-time analysis

See how Comprehend Medical recognizes entities related to the healthcare domain. To analyze Input text, type or paste it in the text box.

# Sample input text ( Doctor notes)

Pt is 50 yo woman, College teacher with past medical history that includes

   - status post cardiac catheterization in September 2024.

She presents today with palpitations and chest pressure.

HPI : Sleeping trouble on present dosage of Clonidine. Severe Rash on face and leg, slightly itchy.

Meds : Vyvanse 50 mgs po at breakfast daily,

            Clonidine 0.2 mgs -- 1 and 1 / 2 tabs po qhs

HEENT : Boggy inferior turbinates, No oropharyngeal lesion.

Lungs : clear.

Heart : Regular rhythm.

Skin :  Mild erythematous eruption to hairline.

Follow-up as scheduled

  • Insights: of analyzed data

  • Results (34)

  • Application integration






No comments:

Post a Comment

Amazon EventBridge | Overview.

Amazon EventBridge - Overview. Scope: Intro, Core Concepts, Key Benefits, Link to official documentation, Insights. Intro: Amazon EventBridg...