---
title: "SQL-001: INSERT PROVIDER_EOB_INTERFACE"
summary: INSERT PROVIDER_EOB_INTERFACE
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Provider.PaymentPreference
reference_type: package
---

# SQL-001: INSERT PROVIDER_EOB_INTERFACE

INSERT PROVIDER_EOB_INTERFACE.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-001 |
| **Operation type** | Create |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | Unqualified in SQL text |
| **Command type** | Text |
| **Business object** | `clsProviderEOB` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:ProviderSeqNum` | Input | Decimal | N/A | Provider key persisted to PROVIDER_EOB_INTERFACE.PROVIDER_SEQ_NUM. |
| `:ProviderLocationSeqNum` | Input | Decimal | N/A | Provider-location key persisted to PROVIDER_EOB_INTERFACE.PROVIDER_LOCATION_SEQ_NUM. |
| `:ExtUserTypeSeqNum` | Input | clsSmartDecimal | N/A | External user type; empty/zero forces paperless flag logic in BeforeInsert. |
| `:PaperlessEOBFlag` | Input | String | 5 | 'Y' when an ext user type exists; otherwise 'N'. |
| `:DefaultPrimaryFlag` | Input | String | 5 | Always initialized to 'N' by the caller. |
| `:UpdateDate` | Input | Date | N/A | Audit timestamp written by BeforeInsert. |
| `:UpdateUser` | Input | String | 30 | BOF user ID from DataPortalInfo.UserID. |
| `:UpdateNum` | Input | Decimal | N/A | Starts at 1 on insert. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PROVIDER_EOB_INTERFACE](../database-tables.md#provider_eob_interface) | CREATE | See sample SQL. |

## Sample SQL

```sql
INSERT INTO PROVIDER_EOB_INTERFACE (
    PROVIDER_SEQ_NUM,
    PROVIDER_LOCATION_SEQ_NUM,
    EXT_USER_TYPE_SEQ_NUM,
    PAPERLESS_EOB_FLAG,
    DEFAULT_TO_PRIMARY_FLAG,
    UPDATE_DATE,
    UPDATE_USER,
    UPDATE_NUM
) VALUES (
    :ProviderSeqNum,
    :ProviderLocationSeqNum,
    :ExtUserTypeSeqNum,
    :PaperlessEOBFlag,
    :DefaultPrimaryFlag,
    :UpdateDate,
    :UpdateUser,
    :UpdateNum
)
```

## Operations and processes
- [EOB preference management](../operations/eob-preference-management.md)

## Business rules
- [BR-01: PaperlessEOBFlag is set to Y only when ExtUserTypeSeqNum is populated.](../business-rules.md#br-01-paperlesseobflag-is-set-to-y-only-when-extusertypeseqnum-is-non-zero-and-non-empty-at-insert-time-otherwise-defaults-to-n)
- [BR-02: DefaultPrimaryFlag is initialized to N on new EOB creation.](../business-rules.md#br-02-defaultprimaryflag-is-always-initialized-to-n-on-new-eob-creation)
- [BR-03: EOB insert must affect exactly one row.](../business-rules.md#br-03-insert-contention-check-if-rowsaffected-1-after-insert-an-inserterror-error-message-is-added-and-the-record-is-not-marked-old)

## Sources
- `Business\SAIF.Business.Provider.PaymentPreference\clsProviderEOB.vb`


