Construct the ISA/GS interchange and group envelopes with your clearinghouse-assigned sender ID and the payer receiver ID; use transaction set ID 837 and implementation convention reference 005010X223A2 for institutional claims
Build the 2000A (billing provider) and 2000B (subscriber) HL loops; for institutional claims the 2000B loop carries the subscriber and the 2000C loop carries the patient if different from the subscriber
Populate the CLM segment with the total claim charge, facility type code, and claim frequency type code; for inpatient claims the facility type is typically 11 (hospital inpatient) combined with appropriate bill type
Add the 2300 claim information loop including diagnosis codes in the HI segment using ICD-10-CM codes for principal and secondary diagnoses, and the principal procedure code in the HI segment using ICD-10-PCS codes for inpatient procedures
Include date ranges for the admission and discharge in DTP segments, and add condition codes, occurrence codes, and value codes in the appropriate HI segments as required by the payer's companion guide
Add 2400 service line loops for each revenue code line, specifying the revenue code in SV2-1, line charges, and service dates; close all loops and envelope segments with correct segment counts and control numbers
Known gotchas
Institutional (837I) and professional (837P) claims use different claim segments — 837I uses SV2 for service lines while 837P uses SV1; do not reuse 837P service line logic for institutional claims
UB-04 form locators map to specific segments and elements in the 837I; payer companion guides reference UB-04 field numbers so understanding this mapping is essential for interpreting edit rejections
Coordination of benefits (COB) for secondary institutional claims requires the 2430 COB loop with amounts paid by the primary payer; omitting COB information on secondary claims causes payer rejections
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp