Healthcare and Medical Codes in X12 EDI

Please refer to our intro to medical codes if you’re new to this area. You can also browse actual codes using our code lookup.

Diagnosis Codes and Health Information (HI) Segments

Diagnosis codes are specified using HI segment:

Our EDI/Claim Explorer always shows a tooltip with the code’s description when you mouse over a code. You can also click on the code to see more information.

Institutional claims (837I transaction set), that is, claims submitted by hospitals, can have multiple diagnosis code segments:

HI segment can contain fields besides just the code, e.g., “Present on Admission Indicator”.

HI segment can also be used to specify procedure codes (for institutional claims), and various other healthcare codes, such as condition-related information.

Procedure and Service Codes (SV1, SV2, SVC)

Procedure and service codes are specified using service line segments called Professional Service Line (SV1) and Institutional Service Line (SV2). These segments also contain charges, number of units and other key elements. A claim always have one or more lines; institutional claims can have dozens of lines depending on the complexity of the encounter.

There are also SV segments used on dental claims but here we are focusing on more widely used professional and institutional claim types.

Here are professional claims examples:

The second line is from an anesthesia claim. In this case “units” are expressed in minutes.

Also note that 00142 code has “modifiers” next to it. These modifiers provide additional information about the service code, and they could affect the charges. That is, certain modifiers allow providers to charge more for the same procedure code.

Institutional claim services are similar:

In addition to (or instead of) procedure codes, institutional claims have “revenue codes”. This is essentially a service category, a more generic way of specifying a type of service.

Drug Codes

Drug-related claims (so-called “pharmacy” claims) are usually submitted separately from medical claims. These claims are not encoded in X12 EDI, instead there is a different format called NCPDP. We will cover pharmacy claims elsewhere.

Professional and institutional claims, however, very often contain information about drugs administered in the course of a treatment. This information, expressed on LIN segments complementing line-level elements from SV segments.

Here is an example:

The drug code is called NDC. It is assigned by the Food and Drug Administration to all drugs in the US.

NDC codes on claims are formatted using 5-4-2 format (labeler-product-packaging) which is a normalized form of the format used by FDA (4-4-2, 5-3-2, 5-4-1) with added leading zeros.

Other Hospital Billing Codes

There are various other codes used for hospital (institutional) billing. They are usually called “UB-04” (Uniformed Billing) codes because of the UB-04 (CMS-1450) form that was used to submit hospital claims. These codes are managed by NUBC (National Uniform Billing Committee).

The revenue code that we mentioned earlier is one of the UB-04 codes.

Other UB-04 code types include “Frequency”, “Facility type”, “Occurrence”, “Admission Type”, “Patient Status” and others.

Frequency code is used for re-submitted claims, and it distinguishes the original claims from a resubmitted one. This is the :1 or :7 in the snippet below.
14 is the facility code. The facility code and the frequency code combined are also known as the “Type of Bill” code.

Here is an example of occurrence/occurrence span codes:

Our EDI/Claim Explorer comes with a lookup for all UB-04 codes. Please request access to try it.