@gravityai-dev/aws-medical
v1.1.0
Published
AWS Comprehend Medical integration for Gravity workflow system - extract medical entities and PHI from clinical text
Downloads
23
Maintainers
Readme
@gravityai-dev/aws-medical
AWS Comprehend Medical integration plugin for the Gravity workflow system. Extract medical entities and PHI from clinical text using AWS Comprehend Medical.
Features
- AWSComprehendMedical: Extract medical entities, PHI, and insights from clinical text
- Support for both medical entities and PHI detection
- Multiple output formats: raw JSON, simplified structure, or both
- Optional S3 storage for analysis results
- Full AWS SDK v3 integration with client caching
- Comprehensive error handling and logging
Installation
npm install @gravityai-dev/aws-medicalNodes
AWSComprehendMedical
Analyzes clinical text using AWS Comprehend Medical to extract medical entities, PHI, and insights.
Inputs:
text: Clinical text to analyze
Outputs:
result: Comprehend Medical analysis results (format based on settings)outputKey: S3 key where results were saved (if saveToS3 is enabled)
Configuration:
text: The clinical text to analyzeanalysisType: Type of analysis (Medical Entities Only, PHI Only, Both Entities and PHI)outputFormat: Format of output data (Raw JSON, Simplified Structure, Both)saveToS3: Save the analysis results to S3outputPrefix: Prefix for S3 output fileslanguage: Language of the clinical text (English)
Credentials
Requires AWS credentials with the following fields:
accessKeyId: Your AWS access key IDsecretAccessKey: Your AWS secret access keyregion: AWS region (e.g., us-east-1)
Usage Example
- Add AWSComprehendMedical node to analyze clinical text
- Configure analysis type (entities, PHI, or both)
- Choose output format (raw JSON or simplified structure)
- Optionally save results to S3 for archival
- Process extracted medical information in downstream nodes
Medical Entity Types
The node can extract various medical entities including:
- Medications: Dosage, frequency, strength, route, duration, form
- Medical Conditions: Diagnoses, symptoms, medical history
- Test Results: Lab values, test names, units, reference ranges
- Procedures: Medical procedures, treatments, surgeries
- Anatomy: Body parts, anatomical locations
PHI Detection
Detects and categorizes Protected Health Information (PHI):
- Names: Patient names, healthcare provider names
- Dates: Birth dates, appointment dates, treatment dates
- Locations: Addresses, cities, states, countries
- Identifiers: SSN, account numbers, device identifiers
- Contact: Phone numbers, email addresses, URLs
Development
# Install dependencies
npm install
# Build the package
npm run build
# Run tests
npm testLicense
MIT
