---
title: Provider registration validation
summary: Validates medical-provider self-registration input before an external-user account is created.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.External.Users
reference_type: package
operation_id: OP-EU-09
trigger: `clsNewUserArgs` validates a Medical Provider registration or a caller directly invokes `IsValidProviderRegistration`.
---

# Provider registration validation

This operation is the medical-provider branch of `clsNewUserArgs` registration validation. It confirms that the supplied provider identity resolves correctly, checks the claim-and-bill credentials through an Oracle function, applies provider eligibility gating, and finally checks the self-registration deny list.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-EU-09 |
| **Trigger** | Medical-provider self-registration validation |
| **Inputs** | Provider tax ID or provider ID, bill ID, claim number, user-type context |
| **Outputs** | Boolean validation result and caller-facing error message |
| **Primary components** | `clsNewUserArgs.ValidateMedicalProviderRegistration`, `clsNewUserArgs.IsValidProviderRegistration` |
| **Entry point** | `Business\SAIF.Business.External.Users\clsNewUserArgs.vb` |

## Steps

1. **Translate the provider-facing source-system input into a provider ID.** During `clsNewUserArgs` construction, Medical Provider registration stores the incoming tax ID in `CustID`, loads the provider object, and sets `SourceSystemID` to the resolved provider ID when the tax ID matches the provider's formatted primary tax ID.
2. **Confirm that the provider identity resolved successfully.** `ValidateMedicalProviderRegistration` fails immediately when `SourceSystemID` is empty or the loaded provider's ID does not match it.
3. **Parse the credential set into bill and claim identifiers.** The validator requires `Credentials(1)` to be numeric for the bill ID and treats `Credentials(0)` as the SAIF claim number.
4. **Call the Oracle function that validates the provider, bill, and claim combination.** `IsValidProviderRegistration` executes the `SELECT ... FROM DUAL` call and returns `True` only when the scalar result is greater than zero ([SQL-014](../sql/SQL-014-saif-business-external-users.md), [DUAL](../database-tables.md#dual)).
5. **Check whether the provider type allows self-registration.** After the Oracle validation passes, the validator inspects `Provider.PrimaryLocation.ProviderType.IsSelfRegistrationAllowed` and blocks providers that are not eligible for self-registration.
6. **Check the self-registration deny list for the provider ID.** The validator loads deny-list rows for the Medical Provider type code and the provider ID string; any matching row blocks the registration ([BR-EU-02](../business-rules.md#br-eu-02-deny-self-registration-block-list), [EXT_USER_DENY_SELF_REG](../database-tables.md#ext_user_deny_self_reg)).
7. **Return the final validation result to the caller.** A `True` result allows user-account creation to proceed; a `False` result leaves the relevant error message on the `clsNewUserArgs` rule context.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
    Start([Medical-provider registration]) --> Resolve[Resolve provider ID from tax ID]
    Resolve --> ProviderOk{Provider matches?}
    ProviderOk -->|No| Fail([Validation fails])
    ProviderOk -->|Yes| Parse[Parse bill and claim credentials]
    Parse --> Oracle[Call provider-registration Oracle function]
    Oracle --> Eligible{Function and provider rules pass?}
    Eligible -->|No| Fail
    Eligible -->|Yes| Deny[Check deny list]
    Deny --> Block{Blocked?}
    Block -->|Yes| Fail
    Block -->|No| Done([Registration may continue])
```

## Failure and edge-case behavior

- Non-numeric bill IDs fail before the Oracle call is attempted.
- A provider that resolves correctly can still be blocked by `IsSelfRegistrationAllowed` or by a deny-list row.
- The Oracle package body behind the validation function is not present in this repository, so only the call shape and boolean interpretation are directly traceable here.**

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `Business\SAIF.Business.External.Users\clsNewUserArgs.vb`
