Latest premium history set id¶
Returns the current (highest) premium-history set id for a policy period.
| Field | Value |
|---|---|
| Operation ID | op-08-max-prem-hist-set-id |
| Trigger | Caller invokes MaxPremiumHistorySetId |
| Inputs | IDataPortalInfo, policy number, period effective date |
| Outputs | Decimal |
| Primary components | PolicyInformation.MaxPremiumHistorySetId |
| Entry point | SAIF.Business.Policy/PolicyInformation.vb |
Steps¶
inDPI.NewPortalRequest()→ scalar text request with inline SQL (SQL-007):MAX(prem_hist_set_id)from PREM_HIST_SUMMARY filtered toprem_hist_type_code IN ('1','3')(BR-POL-007).- Bind
PolicyNumber,PolicyPeriodEffectiveDate. DPI.ProcessPortalRequest; if the result is notDBNullreturnCDec(...), else return0(BR-POL-007).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["Caller invokes<br>MaxPremiumHistorySetId"]) --> Request["NewPortalRequest — scalar<br>text request with inline SQL"]
Request --> Bind["Bind PolicyNumber,<br>PolicyPeriodEffectiveDate"]
Bind --> Process["ProcessPortalRequest"]
Process --> Check{Result is DBNull?}
Check -->|No| ReturnDec(["Return CDec(Result)"])
Check -->|Yes| ReturnZero(["Return 0"])
Failure and edge-case behavior¶
- A
NULLresult is normalized to0via an explicitIsDBNullguard rather than throwing.
Related documentation¶
Sources¶
SAIF.Business.Policy/PolicyInformation.vb