---
title: "PK73101_IMAGE stored procedure documentation"
summary: Analysis of Oracle package/procedure including business rules and operations
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.NHibernate
reference_type: package
source_schema: "WCIS_DBA"
source_name: "PK73101_IMAGE"
source_type: "PACKAGE"
retrieval_status: "found"
retrieval_command: "legends oracle query --name PK73101_IMAGE --output analysis/oracle-source/pk73101-image.sql"
retrieval_date: "2026-09-24"
---


# PK73101_IMAGE

## Overview

| Field | Value |
| --- | --- |
| **Schema** | WCIS_DBA |
| **Type** | Package (procedure overload of function) (database object type: `PACKAGE`) |
| **Database** | Oracle (WCIS) |
| **Calling libraries** | `SAIF.Data.NHibernate` |
| **Calling classes** | PolicyPeriodPayrollAuditRepository |

## Purpose

This package implements: TRACK_IN_REPORT (procedure overload → remote `track_in_report@POLDB`)

> **Scope:** `PK73101_IMAGE` is a large package (7 members). Only the 2 member(s) actually called by SAIF.Data.NHibernate (`track_in_report, track_in_report`) are reproduced below, extracted from the Legends CLI retrieval's per-member `codeItems`; the full package specification/body is not reproduced in this document. This is a deliberate scoping decision for readability, not a retrieval gap — the full source is available at the retrieval path in Sources.

## Procedures / Methods

### track_in_report member (overload 1)

| Field | Value |
| --- | --- |
| **Returns** | scalar/function value* |
| **Called by** | SQL-055 (`PolicyPeriodPayrollAuditRepository.TrackInReport`) |

#### Parameters for track_in_report (overload 1)

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `inpolicynum` | IN | NUMBER | — | Not individually described in the retrieved source* |
| `inauditperiodstartdate` | IN | DATE | — | Not individually described in the retrieved source* |

### track_in_report member (overload 2)

| Field | Value |
| --- | --- |
| **Returns** | cursor/result set |
| **Called by** | SQL-055 (`PolicyPeriodPayrollAuditRepository.TrackInReport`) |

#### Parameters for track_in_report (overload 2)

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `inpolicynum` | IN | NUMBER | — | Not individually described in the retrieved source* |
| `inauditperiodstartdate` | IN | DATE | — | Not individually described in the retrieved source* |

## Business Rules

Rules extracted from this procedure's logic:

| Rule ID | Rule | Condition | Action |
| --- | --- | --- | --- |
| [PROC-RULE-045](../business-rules.md#proc-rule-045-procedure-wrapper-exists-for-nhibernate) | Procedure wrapper exists for NHibernate | NHibernate cannot call a VARCHAR2 function | Call wcis_dba.pk73101_image.track_in_report@POLDB and discard the arrears flag |
| [PROC-RULE-046](../business-rules.md#proc-rule-046-temporary-until-guidewire) | Temporary until Guidewire | Header comment | Wrapper can be removed once Guidewire implements the function |

> These rules are documented in [business-rules.md](../business-rules.md).

## Operations

Operations and processes implemented in this procedure:

| Operation | Description | Trigger |
| --- | --- | --- |
| Track payroll report in | Records report receipt on the remote policy database | SQL-055 (`PolicyPeriodPayrollAuditRepository.TrackInReport`) |

> These operations are also listed in [operations-processes.md](../operations-processes.md).

## Source Code

<details>
<summary>track_in_report (function)</summary>

```sql

   FUNCTION track_in_report (
      inpolicynum              IN   NUMBER,
      inauditperiodstartdate   IN   DATE
   )
      RETURN VARCHAR2
   IS
   BEGIN
     Return wcis_dba.pk73101_image.track_in_report@poldb(inpolicynum, inauditperiodstartdate);
   END;

   /*
   Wrapper for the track_in_report function for use in PolicyAPI's IsArrearsPayrollReport route.
   nHibernate that states that "A function must return a result set. The first parameter of a procedure must be an¿OUT
   that returns a result set. This is done by using a¿SYS_REFCURSOR¿type in Oracle 9i or later."
   The track_in_report function returns a varchar2 rather than a cursor, which prevents it from being called by nHibernate.
   Since the arrears check has been extracted into the route, this wrapper returns nothing while still making the
   call to track_in_report for the insert/update logic. This will no longer be required once Guidewire implements.
   */
```

</details>

<details>
<summary>track_in_report (procedure)</summary>

```sql
   PROCEDURE track_in_report (
      inpolicynum              IN   NUMBER,
      inauditperiodstartdate   IN   DATE
   ) AS
      v_isArrears          VARCHAR2(1);
   BEGIN
     v_isArrears := wcis_dba.pk73101_image.track_in_report@poldb(inpolicynum, inauditperiodstartdate);
   END;

   /*
```

</details>

## Related Documentation
- [Procedure catalog](index.md)
- [Business rules](../business-rules.md)
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)

> **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.

## Sources
- Oracle DBA_SOURCE: `WCIS_DBA.PK73101_IMAGE`
- Legends CLI query executed 2026-09-24: `legends oracle query --name PK73101_IMAGE --output analysis/oracle-source/pk73101-image.sql`
- Calling code: `Data/SAIF.Data.NHibernate/Repositories/PolicyPeriodPayrollAuditRepository.cs`
