# 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.                |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.covestlabs.com/covest-insaas-protocol/insaas-smart-contracts/governance-board/claim-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
