> For the complete documentation index, see [llms.txt](https://docs.covestlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.covestlabs.com/covest-insaas-protocol/insaas-smart-contracts/governance-board/claim-manager.md).

# Claim Manager

### finalizeAssessment

```solidity
function finalizeAssessment(uint256 _claimId_, bool _isAccepted_) external returns (bool)
```

"The `finalizeAssessment` function allows the governance board to finalize the assessment for an insurance claim. The function takes two parameters: the claim ID and a boolean flag indicating whether the claim is accepted or rejected.

{% hint style="info" %}
The function can only be called after the claim has expired and has not yet reached consensus.
{% endhint %}

Upon successful finalization of the assessment, the function emits the `ClaimAssessmentConsensusReached` event, indicating that the claim assessment process is complete, and the payout to the policy holder can be initiated. Additionally, the function will emit the `ClaimAssessmentPointIncreased` event, signifying that the validator's point will be increased.

The function returns a boolean value, with `true` indicating that the assessment has been finalized successfully."

Requirements:

* `nonReentrant` - The function must not be reentrant.
* `whenNotPaused` - The function must not be paused.
* `msg.sender` - The caller must have the role of `GOVERNANCE_BOARD_LEVEL`.

Events:

* `ClaimAssessmentConsensusReached` - Emitted when the assessment is finalized successfully.
* `ClaimAssessmentPointIncreased` - Emitted when the consensus on the assessment of a claim is reached. This event signifies that the claim assessment process is complete and the point will increased to the validator of the claim.

| Name         | Type    | Description                                                                                        |
| ------------ | ------- | -------------------------------------------------------------------------------------------------- |
| *claimId*    | uint256 | The claim id.                                                                                      |
| *isAccepted* | bool    | The governance board will flag that indicates whether the submitted claim is accepted or rejected. |

| Name | Type | Description                                       |
| ---- | ---- | ------------------------------------------------- |
| \[0] | bool | True if the assessment is finalized successfully. |

#### ClaimAssessmentConsensusReached

```solidity
event ClaimAssessmentConsensusReached(uint256 claimId, ClaimStatus status)
```

This event is emitted when the claim is consensus.

| Name    | Type                                                                                           | Description       |
| ------- | ---------------------------------------------------------------------------------------------- | ----------------- |
| claimId | uint256                                                                                        | The claim id.     |
| status  | [ClaimStatus](/covest-insaas-protocol/insaas-smart-contracts/claim-case-states.md#claimstatus) | The claim status. |

#### ClaimAssessmentPointIncreased

```solidity
event ClaimAssessmentPointIncreased(uint256 claimId, address validator, uint256 point)
```

This event is emitted when the claim is consensus.

| Name      | Type    | Description                                                  |
| --------- | ------- | ------------------------------------------------------------ |
| claimId   | uint256 | The claim id.                                                |
| validator | address | The validator address who selected from the submitted claim. |
| point     | uint256 | The point amount that given to the validator.                |
