ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

ehr-semantic-compressor

AI-powered EHR summarization using Transformer architecture to extract key clinical information from lengthy medical records

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/aipoch-ai/ehr-semantic-compressor
Or

EHR Semantic Compressor

Overview

AI-powered EHR summarization using Transformer architecture to extract key clinical information from lengthy medical records. This skill processes lengthy Electronic Health Record (EHR) documents and generates structured, clinically accurate summaries.

Technical Difficulty: High

When to Use

  • Input contains lengthy EHR documents (1600+ words) requiring summarization
  • Clinical records need structured extraction of key information
  • Quick review of patient history, medications, allergies, or diagnoses is needed
  • Medical documentation requires compression while maintaining accuracy

Core Features

  1. Fast Processing: Process lengthy EHR documents (1600+ words) in 10-20 seconds
  2. Structured Summaries: Generate bullet-point summaries (200-300 words)
  3. Critical Information Extraction:
    • Patient allergies and adverse reactions
    • Family medical history
    • Current and past medications
    • Diagnoses and conditions
    • Vital signs and lab results
    • Procedures and surgeries
  4. Clinical Accuracy: Maintains completeness of medical information

Usage

Basic Usage

python scripts/main.py --input ehr_document.txt --output summary.json

Input Format

{
  "ehr_text": "Full EHR document text...",
  "max_length": 300,
  "extract_sections": ["allergies", "medications", "diagnoses", "family_history"]
}

Output Format

{
  "status": "success",
  "data": {
    "summary": "Structured bullet-point summary...",
    "extracted_sections": {
      "allergies": [...],
      "medications": [...],
      "diagnoses": [...],
      "family_history": [...]
    },
    "metadata": {
      "original_length": 2500,
      "summary_length": 280,
      "compression_ratio": 0.89
    }
  }
}

Parameters

ParameterTypeDefaultRequiredDescription
--input, -istring-YesInput EHR document text file path
--output, -ostring-NoOutput JSON file path
--max-lengthint300NoMaximum summary length in words
--extract-sectionsstringallNoComma-separated sections to extract
--formatstringjsonNoOutput format (json, markdown, text)

Technical Details

Architecture

  • Base Model: Transformer-based encoder-decoder architecture
  • Medical Domain Adaptation: Fine-tuned on clinical text corpora
  • Section Extraction: Rule-based + ML hybrid approach for structured data
  • Processing Pipeline: Text segmentation -> Summarization -> Section extraction -> Output formatting

Dependencies

See references/requirements.txt for complete list.

Key dependencies:

  • transformers >= 4.30.0
  • torch >= 2.0.0
  • spacy >= 3.6.0
  • scispacy >= 0.5.3

Performance

Metadata

Author@aipoch-ai
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-aipoch-ai-ehr-semantic-compressor": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.