Note: This document references Azure Logic Apps, which were the original orchestration runtime. CHO has since migrated to Argo Workflows on AKS — see ADR-004 for details.
The Config-to-Workflow Generator is a TypeScript-based automation system that enables zero-code payer onboarding by automatically generating all deployment artifacts from a unified payer configuration JSON file.
From a single configuration file, the generator creates:
- Logic App Workflows - Complete workflow.json files for all enabled modules
- Bicep Infrastructure - Azure resource templates and deployment scripts
- Documentation - Deployment guides, configuration reference, and testing instructions
- JSON Schemas - Validation schemas for payer-specific data structures
- Deployment Package - Ready-to-deploy bundle with all necessary files
- ✅ Zero-Code Onboarding - Add new payers without writing code
- ✅ Consistency - All payers follow the same patterns and best practices
- ✅ Validation - Configuration is validated before generation
- ✅ Documentation - Comprehensive docs generated automatically
- ✅ Maintainability - Single source of truth for payer configuration
- Node.js 18+ and npm
- TypeScript 5+
- Azure CLI (for deployment)
# Install dependencies
npm install
# Build TypeScript
npm run build
# Verify installation
node dist/scripts/cli/payer-generator-cli.js --helpStart with a template:
# Generate template from example
node dist/scripts/cli/payer-generator-cli.js template -t medicaid -o my-payer-config.jsonEdit my-payer-config.json with your payer's details:
- Update
payerId,payerName,organizationName - Configure API endpoints for enabled modules
- Set authentication credentials (Key Vault secrets)
- Define infrastructure requirements
# Validate before generating
node dist/scripts/cli/payer-generator-cli.js validate my-payer-config.json# Generate complete deployment package
node dist/scripts/cli/payer-generator-cli.js generate -c my-payer-config.json
# Or use short form
node dist/scripts/generate-payer-deployment.js my-payer-config.json# Navigate to generated deployment
cd generated/YOUR-PAYER-ID
# Review README and configuration
cat README.md
cat docs/DEPLOYMENT.md
# Deploy infrastructure
cd infrastructure
./deploy.sh
# Deploy workflows (after infrastructure)
cd ../workflows
zip -r workflows.zip ./*
az webapp deploy --resource-group YOUR-RG --name YOUR-LA --src-path workflows.zip --type zip{
"payerId": "MCO001",
"payerName": "My Payer Name",
"organizationName": "My Organization",
"contactInfo": { ... },
"enabledModules": {
"appeals": true,
"ecs": true,
"attachments": true,
"authorizations": true
},
"appeals": { ... },
"ecs": { ... },
"attachments": { ... },
"infrastructure": { ... },
"monitoring": { ... }
}payerId- Unique identifier (uppercase letters and numbers only)payerName- Display name for the payerorganizationName- Full organization namecontactInfo- Contact information (email, phone, primary contact)enabledModules- Which modules to enableinfrastructure- Infrastructure configurationmonitoring- Monitoring and alerting configuration
Each enabled module requires its own configuration block:
"appeals": {
"enabled": true,
"apiEndpoints": {
"test": "https://test-api.payer.com/appeals/v1",
"prod": "https://api.payer.com/appeals/v1"
},
"authentication": {
"type": "oauth",
"keyVaultSecretName": "payer-appeals-oauth-token"
},
"timeout": 120000,
"retryCount": 3,
"retryInterval": 5000,
"requestReasons": [...],
"subStatuses": [...],
"attachmentRules": {...},
"modes": {
"realTimeWeb": true,
"realTimeB2B": true,
"ediBatch": false
}
}"ecs": {
"enabled": true,
"apiEndpoints": {
"test": "https://test-api.payer.com/ecs/v1",
"prod": "https://api.payer.com/ecs/v1"
},
"authentication": {
"type": "apikey",
"keyVaultSecretName": "payer-ecs-api-key"
},
"searchMethods": {
"serviceDate": true,
"member": true,
"checkNumber": true,
"claimHistory": false
},
"timeout": 60000,
"retryCount": 3
}"attachments": {
"enabled": true,
"sftpConfig": {
"host": "sftp.payer.com",
"port": 22,
"username": "hipaa_user",
"keyVaultSecretName": "payer-sftp-key",
"inboundFolder": "/inbound/attachments",
"outboundFolder": "/outbound/responses"
},
"x12Config": {
"isa": {
"senderId": "PAYERID",
"receiverId": "CLEARINGHOUSE",
"senderQualifier": "ZZ",
"receiverQualifier": "ZZ"
},
"transactionSets": {
"275": true,
"277": true,
"278": true
}
},
"archivalConfig": {
"storageAccountName": "payerstorage",
"containerName": "cloud-health-office",
"retentionDays": 2555
}
}Generate deployment package from configuration.
node dist/scripts/cli/payer-generator-cli.js generate [options]
Options:
-c, --config <path> Path to payer configuration file (required)
-o, --output <path> Output directory (default: generated/{payerId})
-m, --modules <modules> Comma-separated list of modules to generate
-d, --dry-run Show what would be generated without creating files
-f, --force Overwrite existing output directoryExamples:
# Generate full deployment
node dist/scripts/cli/payer-generator-cli.js generate -c payer-config.json
# Generate to specific output directory
node dist/scripts/cli/payer-generator-cli.js generate -c payer-config.json -o ./my-output
# Dry run to preview
node dist/scripts/cli/payer-generator-cli.js generate -c payer-config.json --dry-run
# Force overwrite existing
node dist/scripts/cli/payer-generator-cli.js generate -c payer-config.json -fValidate configuration without generating.
node dist/scripts/cli/payer-generator-cli.js validate <config-path>Example:
node dist/scripts/cli/payer-generator-cli.js validate payer-config.jsonOutput includes:
- ✅ Configuration is valid
- ❌ Errors that must be fixed
⚠️ Warnings and suggestions
Generate template configuration file.
node dist/scripts/cli/payer-generator-cli.js template [options]
Options:
-o, --output <path> Output file path (default: ./payer-config.json)
-t, --type <type> Template type: medicaid|blues|generic (default: generic)Examples:
# Generate Medicaid MCO template
node dist/scripts/cli/payer-generator-cli.js template -t medicaid -o medicaid-config.json
# Generate Blues template
node dist/scripts/cli/payer-generator-cli.js template -t blues -o blues-config.jsonList available workflow templates.
node dist/scripts/cli/payer-generator-cli.js listThe generator uses Handlebars templates for flexible, reusable generation.
{{uppercase str}}- Convert to uppercase{{lowercase str}}- Convert to lowercase{{camelCase str}}- Convert to camelCase{{kebabCase str}}- Convert to kebab-case{{snakeCase str}}- Convert to snake_case
{{join arr ", "}}- Join array with separator{{first arr}}- Get first element{{last arr}}- Get last element{{length arr}}- Get array length
{{#if condition}}...{{/if}}- Standard if{{#eq a b}}...{{/eq}}- Equality check{{#or a b c}}...{{/or}}- Logical OR{{#and a b c}}...{{/and}}- Logical AND
{{json obj}}- Format as pretty JSON{{jsonInline obj}}- Format as inline JSON
All configuration fields are available in templates:
- Create template in
scripts/templates/workflows/ - Name it
workflow-name.template.json - Use Handlebars syntax for dynamic content
- Update generator to include it in generation
- Create template in
scripts/templates/infrastructure/ - Name it
module-name.template.bicep - Reference from main.bicep
- Update generator logic
- Update types in
core/types/payer-config.ts - Update validator in
core/validation/config-validator.ts - Update example configs in
core/examples/ - Update templates to use new fields
Full example available at core/examples/medicaid-mco-config.json
Features:
- All modules enabled (Appeals, ECS, Attachments, Authorizations)
- Pre-appeal attachment pattern
- Real-time web + B2B modes
- OAuth authentication
Generate:
node dist/scripts/generate-payer-deployment.js core/examples/medicaid-mco-config.jsonOutput: generated/MCO001/
Full example available at core/examples/regional-blues-config.json
Features:
- All modules enabled
- Post-appeal attachment pattern
- Real-time web + EDI batch modes
- API key authentication
- Production-grade settings
Generate:
node dist/scripts/generate-payer-deployment.js core/examples/regional-blues-config.jsonOutput: generated/BLUES02/
Problem: File path is incorrect or file doesn't exist.
Solution:
# Use absolute path
node dist/scripts/generate-payer-deployment.js /full/path/to/config.json
# Or use relative path from repo root
node dist/scripts/generate-payer-deployment.js ./core/examples/medicaid-mco-config.jsonProblem: Configuration has errors.
Solution:
- Run validate command to see errors
- Fix reported issues
- Re-run validation
node dist/scripts/cli/payer-generator-cli.js validate config.jsonProblem: Template has syntax errors.
Solution:
- Check template file for Handlebars syntax errors
- Ensure all conditionals are properly closed
- Validate JSON structure
Problem: Template doesn't exist for requested workflow.
Solution:
- Generator will create placeholder
- Implement template in
scripts/templates/workflows/ - Rebuild:
npm run build - Copy templates:
cp -r scripts/templates dist/scripts/
Enable verbose logging:
# Set environment variable
export DEBUG=true
# Run generator
node dist/scripts/generate-payer-deployment.js config.jsonMain generator class.
class PayerDeploymentGenerator {
constructor(templatesDir?: string, outputBaseDir?: string);
loadPayerConfig(configPath: string): Promise<PayerConfig>;
generateWorkflows(config: PayerConfig, outputDir: string): Promise<void>;
generateInfrastructure(config: PayerConfig, outputDir: string): Promise<void>;
generateDocumentation(config: PayerConfig, outputDir: string): Promise<void>;
generateSchemas(config: PayerConfig, outputDir: string): Promise<void>;
packageDeployment(config: PayerConfig, outputDir: string): Promise<void>;
}Configuration validator.
class DeploymentValidator {
validate(config: PayerConfig): ValidationResult;
validateForGeneration(config: PayerConfig): ValidationResult;
validateRequiredModules(config: PayerConfig): ValidationResult;
validateEndpoints(config: PayerConfig): Promise<ValidationResult>;
validateConnectivity(config: PayerConfig): Promise<ValidationResult>;
generateValidationReport(config: PayerConfig): string;
}See core/types/payer-config.ts for complete type definitions.
- Make changes to TypeScript files
- Run
npm run buildto compile - Copy templates if modified:
cp -r scripts/templates dist/scripts/ - Test with example configs
- Update documentation
# Run unit tests
npm test
# Run with coverage
npm run test -- --coverage
# Test generation
npm run build
node dist/scripts/generate-payer-deployment.js core/examples/medicaid-mco-config.json /tmp/test-outputThe platform includes an interactive onboarding wizard to simplify payer configuration:
node dist/scripts/cli/payer-onboarding-wizard.jsThe wizard guides you through a series of interactive prompts:
- Organization Name: Full legal name of the health plan
- Payer ID: Unique identifier (5-20 characters, alphanumeric)
- Payer Name: Display name for provider portals
- Logo URL: Optional URL to organization logo (recommended: 800x400px PNG/SVG, Cloud Health Office Sentinel branding available at docs/images/logo-cloudhealthoffice-sentinel-primary.png.svg)
- Technical Contact: Name, email, phone
- Account Manager: Name, email, phone
- Escalation Contact: Name, email, phone
- Coverage Type: Nationwide or State-Specific
- States: If state-specific, select applicable states
Select which modules to enable:
- ECS (Enhanced Claim Status) - Claim status queries with ValueAdds277
- Appeals - Provider appeals submission and tracking
- Attachments (275) - Clinical and administrative attachments
- Authorizations (278) - Prior authorization and referrals
- Eligibility (270/271) - Real-time eligibility verification
- Claims (837) - Electronic claims submission
For each enabled module:
- API Base URL: Backend API endpoint
- Authentication Type: OAuth2, ApiKey, or ManagedIdentity
- Credentials: Key Vault secret names for client ID/secret
- Timeout: API timeout in seconds (default: 30s)
- Field Mappings: Map standard fields to backend fields
If ECS is enabled:
- Financial Fields (8 fields)
- Clinical Fields (4 fields)
- Demographics (20+ fields)
- Remittance Fields (4 fields)
- Service Line Details (10+ fields per line)
- Integration Flags (6 flags)
Configure cross-module integration:
- Enable Appeals integration
- Enable Attachments integration
- Enable Corrections integration
- Enable Messaging integration
- Azure Region: Primary deployment region (default: eastus)
- Environment: DEV, UAT, or PROD
- Logic App SKU: WS1, WS2, or WS3
- Storage Tier: Standard_LRS, Standard_GRS, etc.
- Application Insights: Enable monitoring (recommended: true)
- Alert Email: Email for critical alerts
- Log Retention: Days to retain logs (default: 365)
- Review complete configuration
- Validate against schema
- Save to file or proceed to deployment
The wizard generates:
- Configuration File:
{payerId}-config.json - Validation Report: Schema validation results
- Deployment Checklist: Steps to complete deployment
- Documentation: Custom deployment guide for the payer
$ node dist/scripts/cli/payer-onboarding-wizard.js
┌─────────────────────────────────────────────────────┐
│ Clearinghouse Integration Platform - Onboarding Wizard │
│ Version 2.0 │
└─────────────────────────────────────────────────────┘
Step 1 of 10: Organization Information
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
? Organization Name: Blue Shield Health Plan
? Payer ID: BSHP-2024
? Payer Name: Blue Shield Health
? Logo URL (optional): https://yourorg.com/logo.png
Step 2 of 10: Contact Information
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical Contact:
? Name: John Smith
? Email: jsmith@bshp.com
? Phone: 5551234567
... (continues through all steps)
Step 10 of 10: Review & Confirm
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Configuration Summary:
Organization: Blue Shield Health Plan (BSHP-2024)
Modules: ECS, Appeals, Attachments
Region: eastus
Environment: DEV
✓ Schema validation passed
✓ Configuration file saved: BSHP-2024-config.json
Next Steps:
1. Review configuration file
2. Generate deployment: node dist/scripts/cli/payer-generator-cli.js generate -c BSHP-2024-config.json
3. Deploy to Azure: cd generated/BSHP-2024/infrastructure && ./deploy.sh
Would you like to proceed with deployment generation now? (y/n)
- Interactive Prompts: User-friendly CLI prompts with validation
- Smart Defaults: Sensible defaults for common configurations
- Validation: Real-time validation of inputs
- Resume Support: Save progress and resume later
- Templates: Quick-start templates for common scenarios
- Dry Run: Preview configuration before saving
The Config-to-Workflow Generator supports a partner ecosystem for resellers and system integrators:
- White-Label Deployment: Deploy platform under partner brand
- Revenue Share: 20-30% revenue share on customer subscriptions
- Training & Certification: Technical training for partner engineers
- Partner Portal: Self-service portal for configuration and deployment
- Co-Marketing: Joint marketing materials and case studies
- Deal Registration: Protect partner-sourced opportunities
| Tier | Requirements | Revenue Share | Benefits |
|---|---|---|---|
| Bronze | 1-5 payers | 20% | Standard support, partner badge |
| Silver | 6-15 payers, 1 certified engineer | 25% | Priority support, custom training |
| Gold | 16+ payers, 3+ certified engineers | 30% | 24/7 support, dedicated account manager |
Partners have access to specialized tools:
# Generate white-labeled deployment
node dist/scripts/cli/payer-generator-cli.js generate \
-c customer-config.json \
--white-label \
--partner-id PARTNER-001 \
--partner-branding branding.json
# Batch deployment for multiple customers
node dist/scripts/cli/partner-batch-deploy.js \
--configs ./customer-configs/*.json \
--environment PROD
# Partner usage reporting
node dist/scripts/cli/partner-reporting.js \
--partner-id PARTNER-001 \
--month 2024-11 \
--format pdf{
"partnerBranding": {
"partnerName": "Example Partner Inc.",
"logo": "https://example-partner.com/logo.png",
"supportEmail": "support@example-partner.com",
"supportPhone": "8005551234",
"portalUrl": "https://portal.example-partner.com",
"documentationUrl": "https://docs.example-partner.com"
}
}Generated workflows and documentation will use partner branding instead of platform branding.
- Partner Application: Submit application with company info
- Technical Review: Architecture review, capabilities assessment
- Contract Signing: Pricing, revenue share, support SLAs
- Training: 2-day technical training, certification exam
- Sandbox Access: 90-day sandbox environment
- Certification: Complete certification project
- Go-Live: Partner badge, portal access, co-marketing
Timeline: 4-8 weeks from application to go-live
- Partner Portal: Configuration management, deployment tracking, usage reporting
- Technical Support: Dedicated partner support team
- Documentation: Partner-specific documentation and guides
- Training: Quarterly training webinars and annual summit
- Slack Channel: Private partner Slack workspace
For questions or issues:
- Review this documentation
- Check example configurations:
core/examples/ - Examine generated output for reference
- Run generator with
--helpflag - Review schema documentation: UNIFIED-CONFIG-SCHEMA.md
- Contact the development team: support@platform.com
- NEW: Interactive onboarding wizard
- NEW: Partner white-label support
- NEW: Batch deployment for partners
- NEW: Partner usage reporting
- Enhanced validation with detailed error messages
- Template library with 10+ pre-built configurations
- Improved documentation generation
- Support for custom modules and extensions
- Initial release
- Support for Appeals, ECS, Attachments, and Authorizations modules
- Handlebars template system
- CLI with validate, generate, template, and list commands
- Comprehensive documentation generation
- Example configurations for Medicaid MCO and Regional Blues
BSL 1.1