Convert - X12 to FHIR (R4)

This operation converts an X12 document into a FHIR R4 bundle.

Guides

See the Programming Guide for general principles that apply to all Convert API operations.

Endpoint

POST /convert/v1/x12tofhirr4

Input

The input is a standard X12 document for a single patient.

Supported Message Types

The Convert API supports version 5010 of the following message types:

  • 835 (Electronic Remittance Advice)
  • 837P (Health Claims, Professional)
  • 837I (Health Claims, Institutional)

Query Parameters

patientId string

Optional resource ID for the Patient. See programming guide for details.

patientIdentifier string

Optional business identifier for the Patient resource. If specified, patientIdentifierSystem must also be present. See programming guide for details.

patientIdentifierSystem string

System that provided the patientIdentifier. If specified, patientIdentifier must also be present. See programming guide for details.

Request Headers

Header Value
x-api-key YOUR_API_KEY, obtained from the Developer Portal
content-type text/plain
accept application/fhir+json or application/xml

Output

The output is a FHIR R4 Bundle containing the data parsed from the input, along with an OperationOutcome resource detailing the results (including warnings or errors) of the conversion process. See Output FHIR R4 Bundles for details.

Details

The following sections provide additional details about the message handling.

Standardization and Uplift

The Convert API standardizes and enhances the output into a consistent format suitable for downstream processing. See Understanding Uplift for details.

Processing Notes

  • Message delimiters are specified in the ISA segment. These delimiters can be any printable ASCII symbol (not letters, numbers, or spaces). Common delimiters include *, :, ~, and ^.
  • If more than one claim is included in the input X12 document, they should represent data about the same individual.
  • Unsupported document types will result in an operation outcome error.

Example

Try It
Try out the operations, with examples, in the Developer Portal Sandbox.

X12 documents and FHIR bundles are lengthy, so this just shows a small sample to illustrate how the data is structured. For a more complete example, try out the API in the Developer Portal Sandbox.

Sample Input
ISA*00*          *00*          *ZZ*SUBMITTERID    *ZZ*RECEIVERID     *230616*1145*^*00501*000000001*0*T*:~
GS*HC*SENDERCODE*RECEIVERCODE*20230627*11301505*123456789*X*005010X222A1~
ST*837*0001*005010X222A1~
NM1*85*2*SAMPLE BILLING PROVIDER*****XX*0123456789~
N3*123 BILLING PROVIDER STREET~
N4*BILLING PROVIDER CITY*MI*55555~
HL*2*1*22*0~
NM1*IL*1*PATIENT LAST NAME*PATIENT FIRST NAME****MI*ID54321~
...
Sample Output
{
  "resourceType": "Bundle",
  "type": "searchset",
  "entry": [
    {
      "resource": {
        "resourceType": "Patient",
        ... (patient fields)
      }
    },
    {
      "resource": {
        "resourceType": "Claim",
        ... (claim fields)
      }
    },
    ...
    {
      "resource": {
        "resourceType": "OperationOutcome",
        "issue": [
          ... (any processing issues)
      }
    }
  ]
}