Libraries and Scripts
Described below are the tabs and the corresponding libraries and scripts are used for the Core Claims Admin solution.
Payment
The following scripts and libraries are used for the Payment tab:
The following script is used for the Payment Tab:
This script calls the function claimPaid from the “FTOS_CLAIM_ClaimPaid” (server automation script library).
The following scripts are used:
This script contains the following functions:
claimPaid();: This function performs different validations, updates, inserts or businessStatus changes based on claimId and uses “FTOS.Claim” and “FTOS_INS_Utils” (server automation script libraries) as helpers.
Input parameters:
-
claimId - (string) - the claim ID.
-
claimPaidLibrary - (string) - DifferentValues(not used).
Output parameters:
-
N/A.
changePaymentStatus();: This function performs a fetch based on the claimId and updates or changes the businessStatus based on the returned results of the fetch.
Input parameters:
-
claimId - (string) - The claim ID.
Output parameters:
-
N/A.
getRiskClaimedId();: This function performs a fetch based on the insuranceProductItemId and claimId to retrieve the RiskClaimedId.
Input parameters:
-
insuranceProductItemId - (string) - the insurance product item ID.
-
claimId - (string) - the claim ID.
Output parameters:
-
riskClaimedId or null.
Rejection
The following scripts are used for the Rejection tab:
The following script is used for the Rejection tab:
This script is called on the Rejection step of the FTOS_CLAIM_Claim → Claim form and receives an object (context.Data) with the following data:
-
claimId = context.Data.claimId;
-
btn = context.Data.btn;
-
remainingReserveAmount = context.Data.remainingReserveAmount;
Based on the received data, the script runs an update, a fetch and some validations for an object creation in order to run the function setData to set data for the FTOS_Claim_DecliningProposal → DecliningProposals view.
Script update
If remainingReserveAmount is 0, the update for FTOS_CLAIM_Claim entity is triggered and changes the claimCloseDate attribute with the current date for the current claimId.
Script fetch
paymentList – This is a fetch for FTOS_CLAIM_Payment entity to get the attributes FTOS_CLAIM_Paymentid, businessStatusId and expenseTypeId based on the current claimId.
This script changes the businessStatus of “FTOS_CLAIM_Payment” based on different conditions.
This script performs different validations, businessStatus changes, inserts and updates and uses “FTOS.Claim” and “FTOS_INS_Utils” (server automation script libraries) as helpers.
Third Party
The following scripts and libraries are used for the Third Party tab:
The following scripts are used for the Third Party tab.
This script performs different fetches, inserts, updates and validations to insert LossValue for a new claim, based on the claimId. Also, this script uses the FTOS_INS_Exchange and the FTOS.Claim libraries.
This script performs a fetch, different validations, an update to FTOS_CLAIM_LossValue, businessStatus changes and an insert to FTOS_CLAIM_Reserve. Also, this script uses the FTOS_INS_Utils and the FTOS.Claim libraries.
This script performs different fetches, updates on FTOS_CLAIM_Claim and validations, based on the claimId, reserveTypeId, reserveAmount and currencyId.
The following scripts are used:
This script library holds the following functions:
getAccountByPhoneNumber();: This function returns the client account data based on the phone number.
Input parameters:
-
phoneNumber - (string) - The client phone number
Output parameters:
-
An array with the client account info or null if there is no client with the queried phone number.
getPoliciesByAccountId();: This function returns the polices of a client.
Input parameters:
-
accountId - (string) - The client account ID.
-
type - (string) - The client type (i.e. “Contractant”)
-
policyType - (string) - Policy type.
Output parameters:
-
An array with the client policies.
getPolicyByNumber();: This function returns the policy by the policy number
Input parameters:
-
policyNumber - (string) - The policy number.
Output parameters:
-
An array with the policy data or null if there is no policy with queried number.
updateClaimedRisk();: This function updates the “FTOS_CLAIM_RiskClaimed” entity based on the FNOL ID.
Input parameters:
-
FNOLId - (string) - The FNOL ID.
-
updateData - (object) - An object with data.
Output parameters:
-
N/A
getFNOLDocuments();: This function returns the FNOL documents based on the FNOL ID.
Input parameters:
-
FNOLId - (string) - The FNOL ID.
Output parameters:
-
An array with the FNOL documents data or an empty array if there are no documents uploaded for the queried FNOL ID.
getClaimedRisksByFNOL();: This function returns the Claimed risks based on the FNOL ID.
Input parameters:
-
FNOLId - (string) - The FNOL ID.
Output parameters:
-
An array with the Claimed risks data.
getDataForClaimedType();: This function returns different data for the Claimed type based on the FNOL ID.
Input parameters:
-
FNOLId - (string) - The FNOL id.
Output parameters:
-
An array with the Claimed type data.
getClaimSettingsByCode();: This function returns a flow parameter based on the flow parameter code.
Input parameters:
-
code - (string) - The flow parameter code.
Output parameters:
-
An array with the flow parameter or null if nothing found.
getDaysSinceLastFNOL();: This function returns the number of days since the last FNOL(if any).
Input parameters:
-
policyId- (string) - The policy id.
-
riskId - (string) - The risk id.
Output parameters:
-
The number of days or 0 if nothing found.
getDaysBetweenEventAndPolicy();: This function returns the number of days between event and policy start date.
Input parameters:
-
FNOLId - (string) - The FNOL ID.
Output parameters:
-
The number of days or 0 if nothing found.
getClaimedAmountPercent();: This function calls the getClaimedRisksByFNOL(); function described above and does some calculation to return the claimed amount percent.
Input parameters:
-
FNOLId - (string) - The FNOL ID.
Output parameters:
-
The claimed percent amount 0 if nothing found.
getFNOLbyClaimId();: This function returns the FNOL based on the claimed id.
Input parameters:
-
claimId - (string) - The claimed ID.
Output parameters:
-
An array with the FNOL or an empty array if nothing found.
getPolicyByClaimId();: This function returns the policy based on the claimed id.
Input parameters:
-
claimId - (string) - The claimed ID.
Output parameters:
-
An array with the policy or an empty array if nothing found.
getFirstNotificationByEventReportId();: This function returns the first notification based on the event report ID.
Input parameters:
-
eventReportId - (string) - The event report ID.
Output parameters:
-
An array with the first notification or an empty array if nothing found.
getPolicyAddress();: This function returns an object with the address for the queried policy based on the policy id.
Input parameters:
-
policyId - (string) - The policy ID.
Output parameters:
-
An object with the policy address.
getInsuredItems();: This function returns the insured items based on the policy id.
Input parameters:
-
policyId - (string) - The policy ID.
Output parameters:
-
An object with the insured items.
This script library contains a main function called ClaimReserve that contains the following functions:
getReserve();: This function returns the following attributes from the FTOS_CLAIM_Reserve entity based on the reserve id:
FTOS_CLAIM_Reserveid
-
reserveAmount
-
currencyId
-
reserveValueTypeId
-
reserveDate
-
claimId
Input parameters:
-
reserveId - (string) - The reserve ID.
Output parameters:
-
An an object with the queried data.
getClaimPolicy();: This function returns the following attributes from the FTOS_CLAIM_Claim entity based on the claim ID:
-
FTOS_CLAIM_Claimid
-
policyId
-
claimNo
-
claimOpenDate
-
Input parameters:
-
claimId - (string) - The claim ID
Output parameters:
-
An an object with the queried data.
getLastReserveId();: This function returns the last reserve ID with the Constituted business status from the FTOS_CLAIM_Reserve entity based on the claim ID:
Input parameters:
-
claimId - (string) - The claim ID
Output parameters:
-
The reserve ID or null.
getReserveDetail();: This function returns an array with the reserve details from the FTOS_CLAIM_ReserveDetail entity based on the reserve ID:
Input parameters:
-
reserveId - (string) - The reserve id
Output parameters: an array with the following data:
-
insuranceProductItemId
-
lossValue
-
expertCostsValue
-
legalExpensesValue
-
previousReserveId
-
paymentValue
getReserveType();: This function returns the reserve type and reserve value type from the FTOS_CLAIM_Reserve entity based on the reserve ID:
Input parameters:
-
reserveId - (string) - The reserve ID
Output parameters:
-
An object with the reserve type and reserve type value or an empty object if nothing found.
reserve_GL_Operation();: This function inserts a new transaction with the functions presented above and with the help of other functions, based on the reserveId and collected data from the previously presented functions.
Input parameters:
-
reserveId - (string) - The reserve ID.
-
operationTransactionName - (string) - Not used.
Output parameters:
-
N/A
getReserveDetailTotal();: This function calculates the sum of the loss value from the reserve detail
Input parameters:
-
reserveDetail - (array) - An array with all the reserve details.
Output parameters:
-
sum - (numeric) - The sum of the loss value.
ClaimReserve();: This function returns an object with the results of the functions presented above, except reserve_GL_Operation, which is not used anymore:
Input parameters:
-
N/A
Output parameters: an object with the following data:
-
getReserve
-
getReserveDetail
-
getLastReserveId
-
getReserveDetailTotal
-
getReserveType
The following scripts are used for Core Claims Admin:
This script opens the First Notification of Loss for a given ID.
Input parameters:
-
firstNotificationId - the ID of the
FTOS_CLAIM_FirstNotificationentity.
Output parameters:
-
N/A.
This script opens the Claim associated to the Policy with given policy ID.
Input parameters:
-
policyId - the ID of the
FTOS_INSPA_Policyentity.
Output parameters:
-
N/A.
This script alculates and updates the value for the indemnity amount on each risk claimed of the claim taking in consideration certain attribute values of the claim.
Input parameters:
-
claimId - the ID of the
FTOS_CLAIM_Claimentity.
Output parameters:
-
N/A.
This script changes the status of the claim and then adjusts the reserve, risks claimed and loss values according to the type of status transition.
Input parameters:
-
claimId - the ID of the
FTOS_CLAIM_Claimentity. -
newBusinessStatusName – the name of the status in which the claim will be changed to.
Output parameters:
-
N/A.
This script modifies the values of the risks claimed taking into consideration the claim details and the insurance risk.
Input parameters:
-
claimId - the ID of the
FTOS_CLAIM_Claimentity. -
policyId – the ID of the
FTOS_INSPA_Policyentity. -
fnolId – the ID of the
FTOS_CLAIM_FirstNotificationentity. -
insuranceRisk – the ID of the
FTOS_IP_InsuranceRiskentity.
Output parameters:
-
N/A.
This script cancels the declining proposals for the given ID claim.
Input parameters:
-
claimId - the ID of the
FTOS_CLAIM_Claimentity. -
newBusinessStatusName – name of the status in which the claim will be changed to.
Output parameters:
-
N/A.