X12 EDI-to-JSON API for Healthcare Transactions
We provide API to convert X12 EDI healthcare (HIPAA) transactions into an easy-to-consume JSON or CSV.
For example, for 837 transactions, the API returns a JSON response consisting of business entities such as “claim,” “patient,” “provider,” “diagnosis,” and “service line.”
The API requires no knowledge of X12 EDI. We translate EDI loops, segments, and elements into appropriate business entities.
These business entities can be easily mapped to business objects in your language of choice, be it Java, JavaScript, or .NET.
We follow the naming conventions and terminology established by X12 EDI (and, before that, as part of HCFA-1500 and UB forms), so field names should be easily recognizable by anyone with healthcare IT experience.
Here is an example showing a billing provider and its representation in JSON produced by the API:
HL*1**20*1~
PRV*BI*PXC*103G00000X~
NM1*85*2*Ben Kildare Service*****XX*9876543210~
N3*234 SEAWAY ST~
N4*MIAMI*FL*33111~
REF*EI*587654321~
{
"entityRole" : "BILLING_PROVIDER",
"entityType" : "BUSINESS",
"identificationType" : "NPI",
"identifier" : "9876543210",
"taxId" : "587654321",
"lastNameOrOrgName" : "Ben Kildare Service",
"providerTaxonomy" : {
"type" : "PROVIDER_TAXONOMY",
"subType" : "PROVIDER_TAXONOMY",
"code" : "103G00000X",
"desc" : "Clinical Neuropsychologist (Behavioral Health & Social Service Providers / Clinical Neuropsychologist)",
"categories" : [ {
"type" : "PROVIDER_TAXONOMY",
"subType" : "GROUPING",
"code" : "Behavioral Health & Social Service Providers"
}, {
"type" : "PROVIDER_TAXONOMY",
"subType" : "CLASSIFICATION",
"code" : "Clinical Neuropsychologist"
} ]
},
"address" : {
"line" : "234 SEAWAY ST",
"city" : "MIAMI",
"stateCode" : "FL",
"zipCode" : "33111"
}
}
We decode all the healthcare codes “on the fly” and return descriptions and metadata for every code. The example above shows that the provider’s NUCC taxonomy has been enriched with the description and categories.
The API also decodes CPT codes, diagnoses, and all the other relevant codes. Below is an example of a service line containing descriptions (abbreviated for the sake of the sample) of the CPT procedure.
We also automatically assign RBCS/BETOS taxonomies to CPT codes. You can use optional parameters to suppress adding taxonomies and descriptions to the codes.
LX*1~
SV1*HC:99213*40*UN*1***1~
DTP*472*D8*20061003~
{
"chargeAmount" : 40.00,
"serviceDateFrom" : "2006-10-03",
"unitType" : "UNIT",
"unitCount" : 1,
"procedure" : {
"type" : "PROCEDURE",
"subType" : "CPT",
"code" : "99213",
"desc" : "OFFICE ...",
"fullDesc" : "Office or other ...",
"shortDesc" : "OFFICE O/P ...",
"startDate" : "1993-01-01",
"categories" : [ {
"type" : "RBCS_TAXONOMY",
"subType" : "RBCS_CATEGORY",
"code" : "E",
"desc" : "E & M"
}, {
"type" : "RBCS_TAXONOMY",
"subType" : "RBCS_SUB_CATEGORY",
"code" : "EV",
"desc" : "Office/outpatient services"
} ],
"diags" : [ {
"type" : "DIAGNOSIS",
"subType" : "ICD_10_PRINCIPAL",
"code" : "J020",
"desc" : "Streptococcal pharyngitis"
} ]
}
}
Finally, here is an abbreviated example of claim-level fields. You can view a complete claim example using this link.
{
"id" : "63c1b74604ddda6fbb9d16c0",
"transactionType" : "PROF",
"patientControlNumber" : "26463774",
"chargeAmount" : 100.00,
"dateFrom" : "2006-10-03",
"dateTo" : "2006-10-10",
"serviceDateFrom" : "2006-10-03",
"serviceDateTo" : "2006-10-10",
"clearinghouseTraceNumber" : "17312345600006351",
"subscriber" : {
"relationshipType" : "SELF",
"groupOrPolicyNumber" : "2222-SJ",
"claimFilingIndicatorCode" : "CI",
"payerResponsibilitySequenceNumberCode" : "PRIMARY",
"person" : {
"entityRole" : "SUBSCRIBER",
"entityType" : "INDIVIDUAL",
"identificationType" : "MEMBER_ID",
"identifier" : "JS00111223333",
"lastNameOrOrgName" : "Smith",
"firstName" : "Jane",
"birthDate" : "1943-05-01",
"gender" : "FEMALE"
}
},
"diags" : [ {
"type" : "DIAGNOSIS",
"subType" : "ICD_10_PRINCIPAL",
"code" : "J020",
"desc" : "Streptococcal pharyngitis"
}, {
"type" : "DIAGNOSIS",
"subType" : "ICD_10",
"code" : "Z1159",
"desc" : "Encounter for screening for other viral diseases"
} ],
"principalDiagnosis" : {
"type" : "DIAGNOSIS",
"subType" : "ICD_10_PRINCIPAL",
"code" : "J020",
"desc" : "Streptococcal pharyngitis"
}
// ...
You can also convert 835 transactions into payment objects using the same API endpoint.
You can “post” your EDI in the body of the request and get JSON back as a response, or use the multipart request to upload and convert large files.
For example:
curl -F files=@"../edi_files/837/prof-encounter.dat" -F files=@"../edi_files/837/anesthesia.dat" ${API_URL}/edi/json/upload?splitTran=true&ndjson=true
You can see more examples in our github repo.
Here is the complete API documentation, including the schemas.
Enter your email below to request access to our API and converters: