document.addEventListener('DOMContentLoaded', () => {
// Modal Content Definitions
const modalContents = {
'get-api-key': {
title: 'Get Your Free API Key',
content: `
Start processing clinical documents in minutes with our free tier. No credit card required.
5,000 characters free per month
Access to all core processing packs
Comprehensive documentation & SDKs
We'll send your API key instantly to this address.
`,
confirmText: 'Generate API Key'
},
'book-demo': {
title: 'Schedule a Personalized Demo',
content: `
See ClinicalAPI in action with a demo tailored to your specific use case and compliance requirements.
`,
confirmText: 'Request Demo'
},
'view-docs': {
title: 'Explore Our Documentation',
content: `
Comprehensive documentation to help you integrate ClinicalAPI:
`,
confirmText: null
},
'byoc-overview': {
title: 'BYOC (Bring Your Own Cloud) Overview',
content: `
Deployment Model
Deploy in Your Cloud
Deploy ClinicalAPI processing runtimes directly in your cloud infrastructure:
Zero Data Egress
PHI never leaves your VPC
Full Control
Manage infrastructure your way
Compliance
Meet strictest requirements
Performance
Low latency, high throughput
Cloud Providers
Currently available for AWS
Azure & GCP Soon
`,
confirmText: 'Learn More'
},
'security-overview': {
title: 'Security & Compliance Overview',
content: `
Enterprise-Grade Security
Built for the most demanding security requirements
Technical Standards
AES-256
TLS 1.3
BYOC
`,
confirmText: 'Contact Security Team'
},
'preprocessing': {
title: 'Intelligent Preprocessing',
content: `
Transform raw clinical documents into structured, machine-ready data with our advanced preprocessing pipeline.
๐
Document Parsing
PDF, DOCX, TXT, DICOM support
๐
OCR Enhancement
99.5% accuracy on scanned documents
โ๏ธ
Section Detection
Identify HPI, ROS, PE, A&P sections
๐ฆ
Smart Chunking
Maintain context with optimal spans
`,
confirmText: 'View API Docs'
},
'phi-protection': {
title: 'Enterprise PHI Protection',
content: `
Military-grade de-identification with customizable policies designed for clinical text.
Coverage
18 HIPAA Identifiers
Modes
Mask, Replace, Tokenize
Profiles
HIPAA, GDPR, Custom
Control
Whitelist/Blacklist
`,
confirmText: 'Try De-ID Demo'
},
'entity-extraction': {
title: 'Clinical Entity Extraction',
content: `
Extract clinically-relevant entities with clinical-grade accuracy powered by our proprietary NLP models.
๐ Medications
Drugs, Dosages, Routes
๐ฅ Problems
Diagnoses, Symptoms
๐ฌ Procedures
Surgeries, Tests
๐งช Labs
Results, Units
Advanced Features
Includes negation, speculation, temporality, and assertion modeling.
`,
confirmText: 'View Entity Types'
},
'normalization': {
title: 'Clinical Code Normalization',
content: `
Map extracted entities to standard medical vocabularies for interoperability and analytics.
SN
SNOMED CT
350k+ Concepts
IC
ICD-10-CM
Diagnosis Codes
Rx
RxNorm
Medication Norm
LO
LOINC
Lab Observations
Includes CPT/HCPCS & Unit Conversion
`,
confirmText: 'View Code Systems'
},
'evidence-packs': {
title: 'Audit-Ready Evidence Packs',
content: `
Cryptographically Verifiable
Tamper-evident audit trails
Generate cryptographically-verifiable audit trails for every processing decision.
1
Pipeline Versioning (Model & Config)
2
Step-by-Step Processing Logs
4
Entity Source Provenance
Use Case: Perfect for FDA submissions, internal audits, and AI model governance.
`,
confirmText: 'View Evidence Schema'
},
'deployment': {
title: 'Flexible Deployment Options',
content: `
Choose the deployment model that fits your security and infrastructure requirements.
`,
confirmText: 'Compare Deployments'
},
'explore-packs': {
title: 'Processing Packs Documentation',
content: `
Deep dive into each processing pack:
Combine packs to build custom pipelines.
`,
confirmText: null
},
'byoc-guide': {
title: 'BYOC Deployment Guide',
content: `
Deploy ClinicalAPI in your AWS account:
- Configure your AWS VPC and subnets
- Provide IAM credentials with required permissions
- Run our CloudFormation or Terraform templates
- Verify deployment with health check endpoint
- Start processing with your BYOC endpoint URL
Our team provides full deployment support.
`,
confirmText: 'Start Deployment'
},
'architecture-review': {
title: 'Book Architecture Review',
content: `
Get expert guidance on your ClinicalAPI implementation:
- Architecture design review
- Security and compliance assessment
- Performance optimization recommendations
- Integration best practices
- Cost optimization strategies
`,
confirmText: 'Request Review'
},
'read-docs-dev': {
title: 'Developer Documentation',
content: `
Everything developers need to integrate ClinicalAPI:
`,
confirmText: null
},
'npm-install': {
title: 'Install ClinicalAPI SDK',
content: `
Install the official ClinicalAPI SDK for Node.js:
npm install @clinicalapi/sdk
Or use yarn:
yarn add @clinicalapi/sdk
View SDK Documentation โ
`,
confirmText: null
},
'security-overview-detail': {
title: 'Security & Compliance Details',
content: `
Our comprehensive security posture:
- ๐ Encryption โ AES-256 at rest, TLS 1.3 in transit
- ๐ค Access Control โ RBAC/ABAC, MFA required
- ๐ Audit Logging โ Immutable logs for all access
- โ
Certifications โ SOC 2 Type II, HIPAA, ISO 27001
- ๐งช Penetration Testing โ Quarterly third-party audits
- ๐ Vulnerability Management โ Continuous scanning
Download our full security whitepaper for detailed information.
`,
confirmText: 'Download Whitepaper'
},
'get-started-starter': {
title: 'Start with Free Tier',
content: `
Begin exploring ClinicalAPI with our free tier:
- 5,000 characters/month free
- All core processing packs
- Community support
- No credit card required
`,
confirmText: 'Create Free Account'
},
'get-api-key-growth': {
title: 'Upgrade to Growth Plan',
content: `
Unlock powerful features with the Growth plan:
- 2 million characters included
- All processing packs enabled
- Evidence packs included
- Priority email support
- Starting at $1,999/month
First month free for new customers!
`,
confirmText: 'Start Free Trial'
},
'contact-sales': {
title: 'Contact Enterprise Sales',
content: `
Let's discuss your enterprise needs:
- High volume processing
- Dedicated BYOC runtimes
- SSO & custom SLAs
- Dedicated account manager
- Custom integrations
`,
confirmText: 'Request Callback'
},
'final-get-api-key': {
title: 'Get Your API Key Now',
content: `
Start processing clinical documents in minutes:
Free tier: 5,000 characters/month. No credit card required.
`,
confirmText: 'Generate API Key'
},
'final-book-demo': {
title: 'Schedule Your Demo',
content: `
See ClinicalAPI in action with your own data:
`,
confirmText: 'Book Demo'
},
'final-byoc': {
title: 'BYOC Deployment Options',
content: `
Keep PHI within your security boundary:
- Deploy to your AWS VPC
- Zero data egress
- Full infrastructure control
- Enterprise-grade security
Contact sales for BYOC pricing and setup.
`,
confirmText: 'Contact Sales'
}
};
// Modal Functionality
const modal = document.getElementById('main-modal');
const modalTriggers = document.querySelectorAll('.modal-trigger');
modalTriggers.forEach(trigger => {
trigger.addEventListener('click', (e) => {
e.preventDefault();
const modalType = trigger.getAttribute('data-modal');
const content = modalContents[modalType];
if (content) {
// Pass the trigger element to manage focus restoration
modal.open(content.title, content.content, content.confirmText, null, trigger);
}
});
});
// Solution Carousel Logic
const tabs = document.querySelectorAll('.solution-tab');
const contents = document.querySelectorAll('.solution-content');
tabs.forEach(tab => {
tab.addEventListener('click', () => {
// Remove active classes
tabs.forEach(t => {
t.classList.remove('text-primary-600', 'border-b-2', 'border-primary-600', 'font-bold');
t.classList.add('text-slate-500', 'font-medium');
});
// Add active classes to clicked tab
tab.classList.remove('text-slate-500', 'font-medium');
tab.classList.add('text-primary-600', 'border-b-2', 'border-primary-600', 'font-bold');
// Hide all content
contents.forEach(c => c.classList.add('hidden'));
// Show target content
const targetId = tab.getAttribute('data-target');
const targetContent = document.getElementById(targetId);
if (targetContent) {
targetContent.classList.remove('hidden');
}
});
});
// FAQ Accordion Logic
const faqItems = document.querySelectorAll('.faq-item');
faqItems.forEach(item => {
const trigger = item.querySelector('.faq-trigger');
const content = item.querySelector('.faq-content');
const icon = item.querySelector('.faq-icon');
trigger.addEventListener('click', () => {
const isExpanded = !content.classList.contains('hidden');
// Close all other FAQs
faqItems.forEach(otherItem => {
const otherContent = otherItem.querySelector('.faq-content');
const otherIcon = otherItem.querySelector('.faq-icon');
otherContent.classList.add('hidden');
otherIcon.classList.remove('rotate-180');
});
// Toggle current FAQ
if (!isExpanded) {
content.classList.remove('hidden');
icon.classList.add('rotate-180');
}
});
});
// Mobile Menu Toggle
const mobileMenuBtn = document.querySelector('.mobile-menu-btn');
const navLinks = document.querySelector('.nav-links');
if(mobileMenuBtn) {
mobileMenuBtn.addEventListener('click', () => {
navLinks.classList.toggle('hidden');
});
}
});