IDE Integration
IDE Integration with MirthSync
Section titled “IDE Integration with MirthSync”Stop clicking through XML trees in the Mirth Connect Admin Console. Start using modern development tools with syntax highlighting, intelligent code completion, multi-cursor editing, and powerful search capabilities.
MirthSync transforms Mirth Connect and Open Integration Engine (OIE) configurations into file-based formats, making them accessible to any Integrated Development Environment (IDE) or text editor. Work the way professional developers work—with the tools you already know and love.
The Problem
Section titled “The Problem”Admin Console Limitations
Section titled “Admin Console Limitations”Limited Editing Features
- No syntax highlighting beyond basic XML
- No code completion or IntelliSense
- Single-file editing only (can’t search across channels)
- Basic find/replace (no regex, no multi-file operations)
- Clunky XML tree navigation
No Modern Tooling
- No Git integration
- No refactoring tools
- No code snippets or templates
- No debugging capabilities
- No extensions or plugins
Poor Developer Experience
- Constant context switching between channels
- Slow navigation in large configurations
- No keyboard shortcuts for productivity
- Can’t use your favorite tools and workflows
Why Use an IDE
Section titled “Why Use an IDE”Before & After Comparison
Section titled “Before & After Comparison”Typical Admin Console Workflow:
1. Open Mirth Connect Admin Console2. Navigate channels tree → Find channel → Double-click3. Click Transformer tab → Find transformer step4. Edit JavaScript in small text box5. Save → Deploy → Test6. Repeat for each channel needing similar change
Time for bulk update: 45+ minutesError rate: High (copy-paste mistakes)Problems:
- Edit one channel at a time
- No way to see all transformers at once
- Manual copy-paste between channels
- No search across files
- Can’t track what you’ve changed
MirthSync + IDE Workflow:
# Pull all configurations./mirthsync.sh pull -s https://server:8443/api -u admin -t ./mirth-config
# Open in IDEcode ./mirth-config
# Use IDE features:# - Search all channels: Ctrl+Shift+F "patientSSN"# - Find all transformers using same logic# - Multi-cursor edit: Update all at once# - Git diff: See exactly what changed# - Commit changes with description
# Push back to Mirth Connect./mirthsync.sh push -s https://server:8443/api -u admin -t ./mirth-configBenefits:
- Edit multiple channels simultaneously
- Search across ALL configurations
- Multi-cursor editing for bulk changes
- Visual diff shows exactly what changed
- Git history tracks every modification
Time for bulk update: 5 minutes Error rate: Low (see all changes before push)
Key IDE Features
Section titled “Key IDE Features”Code Editing
Section titled “Code Editing”Syntax Highlighting & Completion
Modern IDEs provide full syntax highlighting for XML channel configurations and JavaScript transformers, with intelligent autocomplete that reduces typos and catches syntax errors before deployment.
// Full IntelliSense and code completionvar msg = connectorMessage.getEncodedData();var patient = msg["PID"];
// Autocomplete suggests fieldschannelMap.put("patientId", patient["PID.3"]["PID.3.1"].toString());Benefits:
- Catch syntax errors before deployment
- Autocomplete reduces typos
- Navigate code with symbol search
- Fold/unfold code sections for better readability
Multi-File Search & Replace
Section titled “Multi-File Search & Replace”Search across all channels and code templates instantly. Find every reference to a field, function, or pattern across your entire Mirth configuration.
Search: "patientSSN"Results: 15 matches across 8 files- channels/ADT_Inbound/channel.xml (3 matches)- channels/Lab_Results/channel.xml (2 matches)- codeTemplates/patient-utils.xml (10 matches)Powerful replace operations:
- Replace with regex patterns
- Preview before replacing
- Replace in selection only
- Exclude specific files or directories
Refactoring Tools
Section titled “Refactoring Tools”Safe code transformations that propagate changes across your entire codebase. Rename variables, extract functions, and reorganize code with confidence.
// Extract repeated code into reusable functionfunction formatSSN(raw) { return raw.replace(/-/g, "");}
// Use everywhere with consistent behaviorvar ssn = formatSSN(msg["PID"]["PID.19"]["PID.19.1"].toString());Built-in Version Control
Section titled “Built-in Version Control”Visual Git integration shows changes inline, lets you stage files with a GUI, commit with context, and view complete history—all without leaving your editor.
<transformer> <name>Transform Patient</name> var dob = msg['PID']['PID.7']['PID.7.1']; var dob = formatDate(msg['PID']['PID.7']['PID.7.1']);</transformer>Real-World Use Cases
Section titled “Real-World Use Cases”Bulk Updates
Section titled “Bulk Updates”Scenario: Add SSN validation to all 20 channels processing patient data.
Without IDE: Open each channel individually, copy-paste validation code, test each one. Time: 2-3 hours
With IDE + MirthSync:
- Pull all configurations:
mirthsync pull - Search for SSN references:
Ctrl+Shift+F "PID.19" - See all 20 locations at once
- Add validation function to code template
- Update all channels with multi-cursor edit
- Git diff to verify changes
- Push back:
mirthsync push
Time: 15 minutes with fewer errors and complete audit trail.
Code Review
Section titled “Code Review”Scenario: Review team member’s changes before deploying to production.
Use your IDE’s Git diff view to see exactly what changed across all files. Leave inline comments, approve or request changes, and ensure standards compliance—all with visual tools.
File: channels/ADT_Inbound/channel.xml+++ b/channels/ADT_Inbound/channel.xml@@ -45,7 +45,9 @@ <transformer>- var ssn = msg['PID']['PID.19'];+ var ssn = msg['PID']['PID.19'];+ if (!validateSSN(ssn)) {+ throw new Error('Invalid SSN format');+ }Debugging JavaScript
Section titled “Debugging JavaScript”Scenario: Transformer producing incorrect output.
Set breakpoints in your IDE, inspect variables, step through code, and evaluate expressions—standard debugging workflows that aren’t possible in the Admin Console.
// Set breakpoints and debug interactivelyfunction transformPatient(msg) { var patient = msg["PID"]; var name = extractName(patient["PID.5"]); // Inspect values here var dob = extractDOB(patient["PID.7"]); return { name, dob };}How It Works
Section titled “How It Works”The MirthSync File Structure
Section titled “The MirthSync File Structure”When you run mirthsync pull, your Mirth Connect configuration becomes a standard file system:
my-mirth-project/├── Channels/│ ├── Default Group/│ │ └── ADT_Inbound/│ │ ├── channel.xml│ │ ├── sourceConnector.js│ │ └── transformer.js│ └── Production Group/│ └── Lab_Results/│ └── channel.xml├── CodeTemplates/│ ├── Utilities/│ │ ├── library.xml│ │ └── parseHL7.js│ └── helpers.xml├── GlobalScripts/├── Resources/└── ChannelGroups/Every file is a plain text file that any editor can open and modify.
Typical Workflow
Section titled “Typical Workflow”Daily Development
Section titled “Daily Development”# Morning: Start work./mirthsync.sh pull -s https://server:8443/api -u admin -t ./mirth-configcode ./mirth-config # Open in VS Code
# During the day: Make changes# - Edit channel XMLs# - Update JavaScript transformers# - Modify code templates# - Use all IDE features
# End of day: Save work./mirthsync.sh -t ./mirth-config git status # See what changed./mirthsync.sh -t ./mirth-config git diff # Review changes./mirthsync.sh -t ./mirth-config git add # Stage changes./mirthsync.sh -t ./mirth-config --commit-message "Updated-channels" git commit./mirthsync.sh push -s https://server:8443/api -u admin -t ./mirth-config./mirthsync.sh -t ./mirth-config git push # Push to remote repositoryFeature Development with Branching
Section titled “Feature Development with Branching”# Create feature branch using native git (MirthSync git checkout -b not supported)cd ./mirth-configgit checkout -b feature/enhanced-loggingcd ..
# Pull current state./mirthsync.sh pull -s https://server:8443/api -u admin -t ./mirth-config
# Develop in IDEcode ./mirth-config# - Add logging to transformers# - Create logging utilities# - Update multiple channels
# Test locally./mirthsync.sh -t ./mirth-config git diff # Review all changes./mirthsync.sh push -s https://server:8443/api -u admin -t ./mirth-config # Test in dev environment
# Verify and merge (use native git for merge operations)cd ./mirth-configgit checkout maingit merge feature/enhanced-loggingcd .../mirthsync.sh push -s https://server:8443/api -u admin -t ./mirth-config # Deploy to productionSupported IDEs
Section titled “Supported IDEs”MirthSync works with any text editor or IDE. Choose the one that matches your workflow:
Visual Studio Code
Section titled “Visual Studio Code”Best for: Most developers, beginners to advanced
Why Choose VS Code:
- Most popular modern editor (free and cross-platform)
- MirthSync VS Code Extension with IntelliSense, tree views, and connection management
- Excellent XML and JavaScript support
- Huge extension marketplace
- Intuitive Git integration
- Great balance of power and simplicity
MirthSync VS Code Extension → | Editor tips →
Other Editors
Section titled “Other Editors”IntelliJ IDEA / WebStorm
- Superior code analysis and refactoring
- Deep JavaScript debugging capabilities
- Perfect for Java + Mirth developers
- Excellent database tool integration
Sublime Text
- Lightning fast performance
- Great for large files
- Powerful search capabilities
- Minimal resource usage
Vim / Neovim
- Terminal-based editing
- Maximum keyboard efficiency
- Highly customizable
- Perfect for SSH and remote work
Atom / Other Editors
- GitHub integration
- Hackable and extensible
- Many community packages available
Getting Started
Section titled “Getting Started”Ready to supercharge your Mirth development with a modern IDE?
Quick Start (5 Minutes)
Section titled “Quick Start (5 Minutes)”1. Download MirthSync
# Download the latest release from GitHubwget https://github.com/SagaHealthcareIT/mirthsync/releases/download/v3.5.0/mirthsync-3.5.0.zipunzip mirthsync-3.5.0.zip2. Pull Your Configuration
cd my-mirth-project./mirthsync-3.5.0/bin/mirthsync.sh pull -s https://server:8443/api -u admin -t ./mirth-config3. Open in Your IDE
# VS Codecode ./mirth-config
# IntelliJidea ./mirth-config
# Or any editor4. Start Editing
- Edit channel XMLs
- Update JavaScript transformers
- Use all IDE features
5. Push Changes Back
./mirthsync-3.5.0/bin/mirthsync.sh push -s https://server:8443/api -u admin -t ./mirth-config