X12 CMS-0057-F Compliance

Transform X12 EDI to FHIR R4 with Da Vinci PAS, CARIN Blue Button, and PDex profiles.

Overview

InteropSuite CMS-0057-F transforms 7 X12 5010 transaction types into FHIR R4 bundles that comply with the CMS Interoperability and Prior Authorization Final Rule using Da Vinci PAS, CARIN Blue Button, and PDex Provenance profiles.

Transformation Library

InteropSuite CMS-0057-F is a transformation library that converts X12 EDI to CMS-compliant FHIR bundles. It does not include a FHIR server, API endpoints, or SMART on FHIR authentication.

CMS Rule Requirements

  • Patient Access API - 42 CFR 438.242(b)(5) - Members access claims via FHIR
  • Provider Access API - 42 CFR 438.242(b)(6) - Clinical data exchange
  • Prior Authorization API - 42 CFR 438.242(b)(7) - Real-time PA via Da Vinci PAS
  • Payer-to-Payer API - 42 CFR 438.242(b)(8) - PDex clinical data exchange
See It In Action

View 278 Prior Auth (Da Vinci PAS) and 835 Remittance (CARIN Blue Button) with PDex Provenance.

Supported Transactions

CMS-0057-F mode supports 7 X12 5010 transaction types:

TransactionDescriptionFHIR Profile
837PProfessional ClaimCARIN Blue Button 2.1.0
837IInstitutional ClaimCARIN Blue Button 2.1.0
837DDental ClaimCARIN Blue Button 2.1.0
835Remittance AdviceCARIN Blue Button 2.1.0
278Prior AuthorizationDa Vinci PAS 2.0.1
270Eligibility InquiryUS Core 6.1.0
271Eligibility ResponseUS Core 6.1.0

Profile Mapping

Each X12 transaction type maps to a specific CMS-required FHIR profile:

X12 TransactionFHIR ProfilePrimary Resources
837P/I/D (Claims) CARIN Blue Button 2.1.0 Claim, Patient, Coverage, Organization
835 (Remittance) CARIN Blue Button 2.1.0 ExplanationOfBenefit, ClaimResponse
278 (Prior Auth) Da Vinci PAS 2.0.1 Claim (preauthorization), ClaimResponse
270/271 (Eligibility) US Core 6.1.0 CoverageEligibilityRequest/Response
270/271 Uses US Core

Eligibility transactions use US Core 6.1.0 because Da Vinci PDex does not define CoverageEligibilityRequest/Response profiles. Eligibility queries are operational transactions, not clinical data exchange.

Usage

Basic Transformation

// Activate license (once at startup)
Interop.ActivateLicense(licenseKey);

// Transform X12 to CMS-0057-F compliant FHIR
var result = await Interop.X12ToFhirAsync(
    x12Message,
    OutputFormat.Cms0057F
);

if (result.Success)
{
    string fhirJson = result.FhirBundle;
    // CARIN Blue Button, Da Vinci PAS profiles
    // PDex Provenance automatically included
}
else
{
    foreach (var error in result.Errors)
        Console.WriteLine(error);
}

Batch Processing

Process multiple X12 files with CMS-0057-F compliance. For mixed workloads, use unified batch processing (recommended).

Unified Processing Recommended

using InteropSuite.Fhir.Engine.Batch;

// Process all formats with RoundRobin interleaving
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),
    }
};

var result = await Interop.ProcessBatchAsync(options);

Sequential Processing

// Process CMS-0057-F files only
var options = new BatchOptions
{
    Domain = "CMS-0057-F",
    OutputFormat = OutputFormat.Cms0057F
};

var result = await Interop.ProcessBatchAsync("./input/x12", options);

Console.WriteLine($"Processed: {result.TotalFiles} files");
Console.WriteLine($"Succeeded: {result.Succeeded}");

See User Guide: Batch Processing for complete documentation.

PDex Provenance

CMS-0057-F bundles automatically include PDex Provenance resources that track the source format of the data. This is required for payer-to-payer data exchange.

Source Format Codes

TransactionPDex Source CodeDescription
837P/I/Dx12837Claims data from X12 837
278x12278Prior authorization from X12 278
835x12otherRemittance from X12 835
270/271US Core ProvenanceEligibility uses US Core (no PDex code)

Provenance Example

{
  "resourceType": "Provenance",
  "meta": {
    "profile": ["http://hl7.org/fhir/us/davinci-pdex/StructureDefinition/pdex-provenance"]
  },
  "target": [{"reference": "Claim/claim-001"}],
  "recorded": "2024-01-15T12:00:00Z",
  "agent": [{
    "type": {
      "coding": [{
        "system": "http://hl7.org/fhir/us/davinci-pdex/CodeSystem/ProvenancePayerDataSource",
        "code": "x12837",
        "display": "X12 837 Claims"
      }]
    }
  }]
}

Validation

All CMS-0057-F bundles are validated offline using the Firely SDK with embedded profile packages. No internet connection required.

Embedded Profile Packages

  • FHIR R4 4.0.1
  • US Core 6.1.0
  • HL7 Terminology 5.5.0
  • CARIN Blue Button 2.1.0
  • Da Vinci PAS 2.0.1
  • Da Vinci PDex 2.1.0
100% Pass Rate

All 100 test files independently verified with HL7 validator_cli.jar (same validation engine as Inferno testing tools).

Examples

278 Prior Authorization Request

// Transform 278 to Da Vinci PAS compliant bundle
var x278 = File.ReadAllText("prior_auth_request.edi");
var result = await Interop.X12ToFhirAsync(x278, OutputFormat.Cms0057F);

// Result includes:
// - Claim (use: preauthorization)
// - Patient
// - Coverage
// - Organization (insurer)
// - Practitioner (requesting provider)
// - PDex Provenance (source: x12278)

837P Professional Claim

// Transform 837P to CARIN Blue Button compliant bundle
var x837 = File.ReadAllText("professional_claim.edi");
var result = await Interop.X12ToFhirAsync(x837, OutputFormat.Cms0057F);

// Result includes:
// - Claim (CARIN C4BB profile)
// - Patient
// - Coverage
// - Organization (billing provider, payer)
// - Practitioner (rendering, referring)
// - PDex Provenance (source: x12837)

835 Remittance Advice

// Transform 835 to CARIN Blue Button EOB
var x835 = File.ReadAllText("remittance_advice.edi");
var result = await Interop.X12ToFhirAsync(x835, OutputFormat.Cms0057F);

// Result includes:
// - ExplanationOfBenefit (CARIN C4BB profile)
// - Patient
// - Coverage
// - Organization (payer)
// - PDex Provenance (source: x12other)