sp82348_claim_authorization¶
Overview¶
| Field | Value |
|---|---|
| Schema | WCIS_DBA |
| Type | Standalone procedure |
| Database | Oracle |
| Calling libraries | SAIF.Business |
| Calling classes | ClaimServices |
Purpose¶
Claim-authorization procedure that counts qualifying authorization-limit rows for a requesting employee and amount.
Procedures / Methods¶
sp82348_claim_authorization¶
| Field | Value |
|---|---|
| Returns | The procedure returns the count of qualifying authorization rows through outCount. |
| Called by | ClaimServices.HasAuthorization |
Description: Counts claim-authorization limit rows that match the employee, business process, purpose, function, and requested amount.
Parameters¶
| Parameter | Direction | Type | Default | Description |
|---|---|---|---|---|
inMailId |
IN | varchar2 |
— | Employee mail ID to authorize. |
inBusProcess |
IN | varchar2 |
— | Claim business-process code to authorize. |
inAuthPurpose |
IN | varchar2 |
— | Claim authorization-purpose code to authorize. |
inFunction |
IN | varchar2 |
— | Claim business-function code to authorize. |
inAmount |
IN | number |
— | Requested amount checked against MAX_AMOUNT. |
outCount |
IN OUT | number |
— | Returned count of qualifying authorization rows. |
Business Rules¶
Rules extracted from this procedure's verified logic:
| Rule ID | Rule | Condition | Action |
|---|---|---|---|
| PROC-RULE-033 | Claim authorization exists only when the employee has a matching business-process/function-limit row with a sufficient maximum amount. | A joined ADP_EMPLOYEE and CL_CLAIM_EMP_BUS_FUNC_LIMIT row matches inMailId, inBusProcess, inAuthPurpose, inFunction, and inAmount <= MAX_AMOUNT. |
Return the number of qualifying rows through outCount. |
These rules are documented in business-rules.md.
Operations¶
Operations and processes implemented in this procedure:
| Operation | Description | Trigger |
|---|---|---|
| OP-024 | Counts authorization-limit rows matching the employee, business process, authorization purpose, function code, and requested amount. | ClaimServices.HasAuthorization invokes the procedure. |
These operations are also listed in operations-processes.md.
Source Code¶
PL/SQL procedure signature
PL/SQL package/procedure body
PROCEDURE sp82348_claim_authorization
(inMailId IN varchar2,
inBusProcess IN varchar2,
inAuthPurpose IN varchar2,
inFunction in varchar2,
inAmount in number,
outCount in OUT number)
/****************************************************************
* This is determines if the user is authorized to release or approve a payment or reserve
*Function Title : Determine if user is authorized
*Name : sp82348_claim_authorization
*Called by .claimservices
*****************************************************************
*PROGRAMMER ANALYST DATE MOD #
*MELHIL 01/23/2008
*Description: Process determines if the user is authorized to make a payment or reserve
* Business Process: Reserves or payments
* Auth Purpose: Iniate and release or Approve and release
* Function: awards (PPD, PTD, FATAL) or TD
******************************************************************/
As
BEGIN
SELECT COUNT(*)
INTO outCount
from adp_employee a, cl_claim_emp_bus_func_limit l
where a.USER_ID = inMailId
and a.EMPLID = l.EMPLOYEE_EMPLID
and l.CLAIM_BUS_PROCESS_CODE = inBusProcess
and l.CLAIM_AUTH_PURPOSE_CODE = inAuthPurpose
and l.CLAIM_BUS_FUNCTION_CODE = inFunction
and inAmount <= l.MAX_AMOUNT;
END sp82348_claim_authorization;
Related Documentation¶
Sources¶
Business\SAIF.Business\ClaimServices.vb