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?
readonlyoptionaladdress?:Build837AddressSpec
N3 + N4 address block.
contacts?
readonlyoptionalcontacts?: readonlyBuild837ContactSpec[]
PER contacts.
entityIdentifierCode
readonlyentityIdentifierCode:string
NM1-01 - entity identifier code.
entityTypeQualifier
readonlyentityTypeQualifier:string
NM1-02 - entity type qualifier (1 person, 2 non-person).
firstName?
readonlyoptionalfirstName?:string
NM1-04 - first name (person).
idCode?
readonlyoptionalidCode?:string
NM1-09 - identification code.
idQualifier?
readonlyoptionalidQualifier?:string
NM1-08 - identification code qualifier (XX NPI, MI member id, …).
middleName?
readonlyoptionalmiddleName?:string
NM1-05 - middle name (person).
name
readonlyname:string
NM1-03 - last name / organization name.
references?
readonlyoptionalreferences?: readonlyBuild837ReferenceSpec[]
REF additional identifiers.
suffix?
readonlyoptionalsuffix?:string
NM1-07 - name suffix (person).