Skip to main content
Version: v0.0.2

Interface: Build837EntitySpec

NM1 entity used throughout the 837 - submitter (41), receiver (40), billing provider (85), subscriber (IL), payer (PR), patient (QC), and the 2310x / 2420x provider roles. Mirrors "./types.js".X12ClaimEntity.

Note: when used as a claim-level (2310x) or service-line (2420x) provider, only the NM1 fields round-trip through get837Claims; an attached address / contacts / references is emitted but the read side does not re-surface it on the provider (a documented Phase 5 read limitation).

Example

import type { Build837EntitySpec } from "@cosyte/x12";
const billing: Build837EntitySpec = {
entityIdentifierCode: "85", entityTypeQualifier: "2",
name: "BILLING CLINIC INC", idQualifier: "XX", idCode: "1234567890",
address: { lines: ["123 BILLING WAY"], city: "CLEVELAND", state: "OH", postalCode: "44113" },
references: [{ qualifier: "EI", value: "987654321" }],
};

Properties

address?

readonly optional address?: Build837AddressSpec

N3 + N4 address block.


contacts?

readonly optional contacts?: readonly Build837ContactSpec[]

PER contacts.


entityIdentifierCode

readonly entityIdentifierCode: string

NM1-01 - entity identifier code.


entityTypeQualifier

readonly entityTypeQualifier: string

NM1-02 - entity type qualifier (1 person, 2 non-person).


firstName?

readonly optional firstName?: string

NM1-04 - first name (person).


idCode?

readonly optional idCode?: string

NM1-09 - identification code.


idQualifier?

readonly optional idQualifier?: string

NM1-08 - identification code qualifier (XX NPI, MI member id, …).


middleName?

readonly optional middleName?: string

NM1-05 - middle name (person).


name

readonly name: string

NM1-03 - last name / organization name.


references?

readonly optional references?: readonly Build837ReferenceSpec[]

REF additional identifiers.


suffix?

readonly optional suffix?: string

NM1-07 - name suffix (person).