pk80001_LegalNet¶
Overview¶
| Field | Value |
|---|---|
| Schema | WCIS_DBA |
| Type | Package |
| Database | Oracle |
| Calling libraries | SAIF.Business |
| Calling classes | ImageServices |
Purpose¶
Legal-alert package that determines whether a claim has at least one legal case flagged for image alerts.
Procedures / Methods¶
alertlegalcase¶
| Field | Value |
|---|---|
| Returns | The procedure returns Y through outAlertFlag when at least one flagged legal case exists; otherwise it returns N. |
| Called by | ImageServices.AlertLegalonClaim |
Description: Counts flagged legal cases for a claim and returns a Y/N image-alert flag.
Parameters¶
| Parameter | Direction | Type | Default | Description |
|---|---|---|---|---|
inClaimId |
IN | NUMBER | — | Claim identifier used by the package. |
OutAlertFlag |
OUT | VARCHAR2 | — | Returned Y/N flag indicating whether image alerts are enabled. |
Business Rules¶
Rules extracted from this procedure's verified logic:
| Rule ID | Rule | Condition | Action |
|---|---|---|---|
| PROC-RULE-004 | Claim image alerting is enabled only when at least one flagged legal case exists for the claim. | v_cases > 0 after counting LEGAL_CASE rows with claim_image_alerts_flag = 'Y'. |
Set outAlertFlag to Y; otherwise leave it as N. |
These rules are documented in business-rules.md.
Operations¶
Operations and processes implemented in this procedure:
| Operation | Description | Trigger |
|---|---|---|
| OP-004 | Counts legal cases for the claim where image alerts are enabled. | ImageServices.AlertLegalonClaim invokes the procedure. |
These operations are also listed in operations-processes.md.
Source Code¶
PL/SQL package specification
PL/SQL package/procedure body
PROCEDURE alertlegalcase(
inClaimId IN NUMBER
, outAlertFlag OUT VARCHAR2)
IS
v_cases NUMBER := 0;
v_return VARCHAR2(1) := 'N';
CURSOR check_legal_cases
IS
SELECT COUNT(*)
FROM LEGAL_CASE lc
WHERE lc.claim_image_alerts_flag = 'Y'
AND lc.claim_id = inClaimId;
BEGIN
IF NOT check_legal_cases%ISOPEN THEN
OPEN check_legal_cases;
END IF;
FETCH check_legal_cases
INTO v_cases;
IF check_legal_cases%FOUND THEN
IF v_cases > 0 THEN
v_return := 'Y';
END IF;
END IF;
IF check_legal_cases%ISOPEN THEN
CLOSE check_legal_cases;
END IF;
outAlertFlag := v_return;
END alertlegalcase;
Related Documentation¶
Sources¶
Business\SAIF.Business\ImageServices.vb