Complete User Guide
Step-by-step guide from installation to advanced features. Perfect for beginners!
What is InteropSuite?
InteropSuite is a healthcare data transformation library that converts legacy formats into FHIR R4 - the modern standard for healthcare data exchange.
| Input Format | What It Is | Example |
|---|---|---|
| HL7 v2.x | Hospital messages (admissions, labs) | MSH|^~\&|... |
| X12 5010 | Insurance transactions (claims) | ISA*00*...~ |
| C-CDA | Clinical documents (summaries) | <ClinicalDocument> |
Four Processing Pipelines
What You'll Need
1. .NET 9.0 SDK
Check if you have it installed:
dotnet --version
You should see 9.0.x or higher. If not, download from dotnet.microsoft.com/download
2. A License Key
You'll receive a license key when you purchase InteropSuite. It looks like this:
eyJpZCI6IklTLTIwMjYwMTE1LTRMRDdURyIs...
3. A .NET Project
If you don't have one yet, create a new console app:
dotnet new console -n MyHealthcareApp
cd MyHealthcareApp
Installation
InteropSuite is available on NuGet.org. Install it with a single command.
Step 1: Open a Terminal
You'll need to run a command. Here's how to open a terminal:
| Operating System | How to Open Terminal |
|---|---|
| Windows | Press Win + R, type cmd, press Enter |
| macOS | Press Cmd + Space, type Terminal, press Enter |
| Linux | Press Ctrl + Alt + T |
Step 2: Navigate to Your Project
Change to your project directory. If you don't have a project yet, create one first (see What You'll Need).
# Windows
cd C:\Projects\MyHealthcareApp
# macOS / Linux
cd ~/Projects/MyHealthcareApp
Step 3: Install InteropSuite
Run this command to add InteropSuite to your project:
dotnet add package InteropSuite
Success looks like:
info : Adding PackageReference for package 'InteropSuite' into project 'MyHealthcareApp.csproj'.
info : Package 'InteropSuite' is compatible with all the specified frameworks.
info : PackageReference for package 'InteropSuite' version '1.0.5' added to file 'MyHealthcareApp.csproj'.
Step 4: Verify Installation
Check that the package was added to your project file:
dotnet list package
You should see InteropSuite in the list:
Project 'MyHealthcareApp' has the following package references
[net9.0]:
Top-level Package Requested Resolved
> InteropSuite * 1.0.5
InteropSuite is now installed. Next, activate your license (see below) and start transforming healthcare data!
Troubleshooting Installation
| Error | Solution |
|---|---|
Unable to find package InteropSuite |
Check your internet connection. The package is downloaded from NuGet.org. |
Access denied |
On Windows, try running Command Prompt as Administrator. On macOS/Linux, check folder permissions. |
'dotnet' is not recognized |
The .NET SDK isn't installed. Download from dotnet.microsoft.com/download |
License Activation
You have three ways to activate your license:
Method 1: Environment Variable (Best for Servers)
macOS/Linux:
export INTEROPSUITE_LICENSE="your-license-key"
Windows (PowerShell):
$env:INTEROPSUITE_LICENSE = "your-license-key"
Method 2: License File
Create a file named interopsuite.lic in your project folder with just your license key.
Method 3: In Your Code (Simplest)
using InteropSuite.Fhir.Engine;
// Activate with your license key
Interop.ActivateLicense("your-license-key");
IDE Setup
We recommend Visual Studio Code - a free, lightweight editor that works on Windows, macOS, and Linux.
Visual Studio Code Setup
Step 1: Install VS Code
- Go to code.visualstudio.com
- Click the big Download button (it detects your operating system)
- Run the downloaded installer
- Follow the installation wizard (default options are fine)
- Launch VS Code when installation completes
Step 2: Install the C# Extension
- In VS Code, look at the left sidebar
- Click the Extensions icon (it looks like 4 squares, or press
Ctrl+Shift+X) - In the search box at the top, type:
C# Dev Kit - Find "C# Dev Kit" by Microsoft (it has a blue verified checkmark)
- Click the blue Install button
- Wait for installation to complete (may take a minute)
This extension adds C# language support to VS Code: syntax highlighting, IntelliSense (auto-complete), debugging, and project management.
Step 3: Create a New Project
- Open VS Code
- Open the Terminal: View menu → Terminal (or press
Ctrl+`) - Navigate to where you want to create your project:
# Windows cd C:\Projects # macOS/Linux cd ~/Projects - Create a new console application:
dotnet new console -n MyHealthcareApp - Open the new project folder:
cd MyHealthcareApp code . - VS Code will open with your new project
- If prompted "Do you trust the authors?", click Yes, I trust the authors
Step 4: Install InteropSuite NuGet Package
- In VS Code, open the Terminal (
Ctrl+`) - Install InteropSuite from NuGet.org:
dotnet add package InteropSuite - You should see:
info : Package 'InteropSuite' is compatible with all the specified frameworks
Step 5: Write Your First Code
- In VS Code, click on
Program.csin the left sidebar to open it - Delete all the existing code
- Paste this code:
using InteropSuite.Fhir.Engine; // Activate your license Interop.ActivateLicense("your-license-key-here"); // Sample HL7 message string hl7Message = @"MSH|^~\&|SENDING|FACILITY|RECEIVING|FACILITY|20231015120000||ADT^A01|MSG001|P|2.5.1 PID|1||12345^^^HOSP^MR||DOE^JOHN^Q||19800101|M"; // Transform to FHIR var result = await Interop.HL7ToFhirAsync(hl7Message); if (result.Success) { Console.WriteLine("Success! FHIR Bundle:"); Console.WriteLine(result.FhirBundle); } else { Console.WriteLine("Errors:"); foreach (var error in result.Errors) Console.WriteLine(error); } - Save the file:
Ctrl+S
Step 6: Run Your Application
- Open Terminal in VS Code (
Ctrl+`) - Run the application:
dotnet run - You should see the FHIR bundle output in the terminal!
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Run/Debug | F5 |
| Run without Debug | Ctrl+F5 |
| Open Terminal | Ctrl+` |
| Go to Definition | F12 or Ctrl+Click |
| Find in Files | Ctrl+Shift+F |
| Save File | Ctrl+S |
| Comment/Uncomment | Ctrl+/ |
InteropSuite works with any .NET IDE. The dotnet CLI commands work the same way in any terminal.
Troubleshooting
| Problem | Solution |
|---|---|
'dotnet' is not recognized |
Install the .NET SDK from dotnet.microsoft.com/download |
| Package not found | Check your internet connection and verify the package source is set to nuget.org |
Red squiggly lines under Interop |
Add using InteropSuite.Fhir.Engine; at the top of your file |
| License error | Make sure you called Interop.ActivateLicense("key") before any other Interop methods |
| Build errors about async | Make sure your code is inside an async method, or use top-level statements (default in .NET 6+) |
HL7 v2.x Messages
HL7 v2.x messages are pipe-delimited text messages used by hospitals.
using InteropSuite.Fhir.Engine;
// Your HL7 message
string hl7Message = @"MSH|^~\&|SENDING|FACILITY|...";
// Transform it
var result = await Interop.HL7ToFhirAsync(hl7Message);
if (result.Success)
{
string fhirJson = result.FhirBundle;
Console.WriteLine($"Detected: {result.DetectedFormat}");
}
Supported Message Types (30 total)
- ADT - A01, A02, A03, A04, A05, A08, A11, A12, A13, A28, A31, A40
- ORU - R01, R30, R32 (Lab Results)
- ORM/OML - O01, O21 (Orders)
- SIU - S12, S13, S14, S15, S26 (Scheduling)
- MDM - T02, T04, T06 (Documents)
- VXU - V04 (Immunizations)
- RDS/RDE - O13, O11 (Pharmacy)
- DFT - P03 (Financial)
X12 5010 Transactions
X12 is the format used by insurance companies in the US.
using InteropSuite.Fhir.Engine;
// Your X12 transaction
string x12Message = "ISA*00*...";
// Transform it
var result = await Interop.X12ToFhirAsync(x12Message);
if (result.Success)
{
Console.WriteLine($"Detected: {result.DetectedFormat}"); // e.g., "X12^837P"
}
Supported Transaction Types
| Transaction | Description | FHIR Output |
|---|---|---|
| 270/271 | Eligibility | CoverageEligibilityRequest/Response |
| 278 | Prior Authorization | Claim + ClaimResponse |
| 834 | Enrollment | Coverage + Patient |
| 835 | Remittance | ExplanationOfBenefit |
| 837P/I/D | Claims | Claim |
C-CDA Documents
C-CDA is an XML format for clinical documents like patient summaries.
using InteropSuite.Fhir.Engine;
// Your C-CDA document
string cdaDocument = "<ClinicalDocument>...</ClinicalDocument>";
// Transform it
var result = await Interop.CDAToFhirAsync(cdaDocument);
if (result.Success)
{
Console.WriteLine($"Detected: {result.DetectedFormat}"); // e.g., "CDA^34133-9"
}
Supported Document Types
- CCD (34133-9) - Continuity of Care Document
- Discharge Summary (18842-5)
- Progress Note (11506-3)
- Consultation Note (11488-4)
- History & Physical (34117-2)
- Operative Note (11504-8)
- Referral Note (57133-1)
CMS-0057-F Compliance
CMS-0057-F requires health plans to exchange patient data using standardized FHIR APIs with specific profiles.
Use OutputFormat.Cms0057F to generate compliant bundles:
// Standard US Core output
var usCore = await Interop.X12ToFhirAsync(x12Message);
// CMS-0057-F compliant output
var cms = await Interop.X12ToFhirAsync(x12Message, OutputFormat.Cms0057F);
Profile Mapping
| X12 Transaction | CMS-0057-F Profile |
|---|---|
| 278 | Da Vinci PAS 2.0.1 |
| 270/271 | US Core 6.1.0 |
| 835 | CARIN Blue Button 2.1.0 |
| 837P/I/D | CARIN Blue Button 2.1.0 |
Batch Processing
Process hundreds or thousands of files at once. InteropSuite supports two batch processing modes.
Processing Modes
| Mode | Description | Best For |
|---|---|---|
| Sequential | Process one directory at a time | Simple single-format batches |
| Unified Recommended | Process multiple directories with RoundRobin interleaving | Mixed formats, no blocking between domains |
Unified Processing (Recommended)
Process multiple directories in a single call. Files are interleaved across sources so no domain blocks another.
using InteropSuite.Fhir.Engine;
using InteropSuite.Fhir.Engine.Batch;
var options = new BatchOptions
{
Sources = new[]
{
new BatchSource("input/hl7", "HL7", OutputFormat.UsCore),
new BatchSource("input/x12", "X12", OutputFormat.UsCore),
new BatchSource("input/cda", "CDA", OutputFormat.UsCore),
new BatchSource("input/cms", "CMS-0057-F", OutputFormat.Cms0057F),
}
};
// Files interleaved: HL7[0], X12[0], CDA[0], CMS[0], HL7[1]...
var result = await Interop.ProcessBatchAsync(options);
Console.WriteLine($"Total: {result.TotalFiles}");
Console.WriteLine($"Succeeded: {result.Succeeded}");
Console.WriteLine($"Failed: {result.Failed}");
Each source can have its own OutputFormat. A single TraceServer session shows all domains together, making it easy to monitor mixed workloads.
Sequential Processing
Process one directory at a time. Each batch completes before the next starts.
using InteropSuite.Fhir.Engine;
using InteropSuite.Fhir.Engine.Batch;
var options = new BatchOptions
{
Domain = "HL7",
OutputFormat = OutputFormat.UsCore
};
var result = await Interop.ProcessBatchAsync("./input", options);
Console.WriteLine($"Total: {result.TotalFiles}");
Console.WriteLine($"Succeeded: {result.Succeeded}");
Console.WriteLine($"Failed: {result.Failed}");
BatchSource Parameters
| Parameter | Type | Description |
|---|---|---|
inputDirectory | string | Path to input files |
domain | string | Domain identifier for TraceServer (HL7, X12, CDA, CMS-0057-F) |
outputFormat | OutputFormat | UsCore or Cms0057F |
Domain Options (Sequential Mode)
| Domain | Input | Output Profiles |
|---|---|---|
"HL7" | HL7 v2.x messages | US Core 6.1.0 |
"CDA" | C-CDA documents | US Core 6.1.0 |
"X12" | X12 transactions | US Core 6.1.0 |
"CMS-0057-F" | X12 transactions | Da Vinci PAS, CARIN BB |
"Mixed" | Any format | Auto-selected |
TraceServer Dashboard
Real-time monitoring dashboard for your transformations. TraceServer displays transformation history, validation results, and performance metrics in a web-based UI.
Step 1: Download for Your Platform
Download the ZIP file for your operating system:
Step 2: Extract and Run
Extract the ZIP file to any folder. Then run the executable:
Windows
Run from Command Prompt, pointing to your app's dashboard directory:
InteropSuite.TraceServer.exe -d C:\path\to\your\app\interopsuite\dashboard
macOS / Linux
Open Terminal in the extracted folder and run:
# Make executable (first time only)
chmod +x InteropSuite.TraceServer
# Run with -d pointing to your app's dashboard directory
./InteropSuite.TraceServer -d /path/to/your/app/interopsuite/dashboard
macOS users: If blocked by Gatekeeper, run this once:
xattr -d com.apple.quarantine ./InteropSuite.TraceServer 2>/dev/null
TraceServer must be pointed to your app's dashboard directory using -d. This is where InteropSuite writes session data when Interop.DashboardEnabled = true.
You should see:
InteropSuite Trace Server
=========================
Server running at: http://localhost:8765/report.html
Dashboard directory: /path/to/your/app/interopsuite/dashboard
Press Ctrl+C to stop.
Command-Line Options
# Show help
./InteropSuite.TraceServer --help
# Point to specific dashboard directory
./InteropSuite.TraceServer -d /path/to/dashboard
./InteropSuite.TraceServer --directory /path/to/dashboard
# Or just pass the path directly
./InteropSuite.TraceServer /path/to/dashboard
Step 3: Open the Dashboard
Open your browser and navigate to:
http://localhost:8765/report.html
Keep TraceServer running in a separate terminal window while you process files with InteropSuite.
Troubleshooting
| Problem | Solution |
|---|---|
| Port 8765 already in use | Stop any other process using that port, or check if TraceServer is already running |
| Dashboard shows no data | Make sure Interop.DashboardEnabled = true in your app (see below) |
| macOS: "cannot be opened because the developer cannot be verified" | Right-click the executable → Open → Open anyway |
Enable Dashboard in Your Application
TraceServer displays data generated by your InteropSuite application. You must enable dashboard data generation in your code:
using InteropSuite.Fhir.Engine;
// Enable dashboard data generation (required!)
Interop.DashboardEnabled = true;
// Optional: Configure data retention (default: 7 days)
Interop.DashboardRetentionDays = 7;
// Now process files - TraceServer will see them!
var result = await Interop.ProcessBatchAsync("./input", options);
Without Interop.DashboardEnabled = true, no data will appear in the dashboard! This setting must be enabled before processing files.
What Gets Tracked
| Processing Method | Tracked in Dashboard |
|---|---|
Interop.ToFhirAsync(string) |
❌ No (in-memory only) |
Interop.ToFhirAsync(string, filePath) |
✅ Yes (Live session) |
Interop.ProcessBatchAsync(...) |
✅ Yes (Batch session) |
Dashboard Data Location
Your application writes dashboard data to:
# Relative to your application directory
{workingDir}/interopsuite/dashboard/sessions/
# Example: if your app is in /Users/john/MyHealthApp/
/Users/john/MyHealthApp/interopsuite/dashboard/sessions/
To view this data, point TraceServer to your app's dashboard directory:
# Point TraceServer to your app's data
./InteropSuite.TraceServer -d /path/to/your/app/interopsuite/dashboard
# Or use environment variable
export INTEROPSUITE_DASHBOARD_DIR=/path/to/your/app/interopsuite/dashboard
./InteropSuite.TraceServer
You can customize all data paths using environment variables: INTEROPSUITE_ROOT, INTEROPSUITE_DASHBOARD_DIR, INTEROPSUITE_AUDIT_DIR, INTEROPSUITE_QUARANTINE_DIR, INTEROPSUITE_OUTPUT_DIR
API Reference
Namespace
using InteropSuite.Fhir.Engine;
using InteropSuite.Fhir.Engine.Batch; // For batch processing
Single Message Methods
| Method | Description |
|---|---|
Interop.HL7ToFhirAsync(string) | Transform HL7 v2.x to FHIR |
Interop.X12ToFhirAsync(string) | Transform X12 to FHIR (US Core) |
Interop.X12ToFhirAsync(string, OutputFormat) | Transform X12 with profile selection |
Interop.CDAToFhirAsync(string) | Transform C-CDA to FHIR |
Interop.ToFhirAsync(string) | Auto-detect format and transform |
Result Handling
var result = await Interop.ToFhirAsync(message);
if (result.Success)
{
string fhir = result.FhirBundle; // FHIR JSON string
string format = result.DetectedFormat; // e.g., "HL7 ADT^A01"
}
else
{
foreach (var error in result.Errors)
{
Console.WriteLine(error);
}
}