---
# System prepended metadata

title: Kafka Consumer Workflow for creating Claim Review Records (HLR/Supplemental Claims) within Caseflow

---

<h1>Kafka Consumer Workflow for creating Claim Review Records (HLR/Supplemental Claims) within Caseflow</h1>

## Acceptance Criteria

1. Documentation exists that identifies all **datapoints needed from Decision Review Created Kafka Event** for caseflow to create an HLR or Supplemental Claim record.
2. Documentation exists that outlines the **conversion of datapoints from Decision Review Created Kafka Event message into Caseflow** ingestible datapoints.
3. Documentation exists that outlines irreconcilable issues and **risks between caseflow workflow** of creating and completing an HLR or Supplemental Claim record **and VBMS workflow of Decision Review** Created event.

## DecisionReviewCreated avro
```
{
  ""name"": ""DecisionReviewCreated"",
  ""type"": ""record"",
  ""namespace"": ""gov.va.bip.cest.decisionreview.avro"",
  ""doc"": ""An event that represents a new Decision Review created in the VBMS system"",
  ""fields"": [
    {
      ""name"": ""claimId"",
      ""type"": ""long"",
      ""doc"": ""The ID of the claim created to work this decision review""
    },
    {
      ""name"": ""decisionReviewType"",
      ""type"": [
        ""null"",
        ""string""
      ],
      ""default"": null,
      ""doc"": ""The type of decision review (higher level review, supplemental)""
    },
    {
      ""name"": ""veteranParticipantId"",
      ""type"": ""string"",
      ""doc"": ""The Participant ID of the Veteran""
    },
    {
      ""name"": ""claimantParticipantId"",
      ""type"": ""string"",
      ""doc"": ""The Participant ID of the claimant filing the Decision Review""
    },
    {
      ""name"": ""epCode"",
      ""type"": ""string"",
      ""doc"": ""The type of decision review that was created""
    },
    {
      ""name"": ""claimReceivedDate"",
      ""type"": {
        ""type"": ""int"",
        ""connect.version"": 1,
        ""connect.name"": ""org.apache.kafka.connect.data.Date"",
        ""logicalType"": ""date""
      },
      ""doc"": ""The date that this decision review application was received""
    },
    {
      ""name"": ""informalConferenceRequested"",
      ""type"": ""boolean"",
      ""doc"": ""Whether an informal conference was requested by the claimant""
    },
    {
      ""name"": ""sameStationReviewRequested"",
      ""type"": ""boolean"",
      ""doc"": ""Whether the claimant requested that this decision review be performed at the same station that handled the original claim""
    },
    {
      ""name"": ""intakeCreationTime"",
      ""type"": {
        ""type"": ""long"",
        ""connect.version"": 1,
        ""connect.name"": ""org.apache.kafka.connect.data.Timestamp"",
        ""logicalType"": ""timestamp-millis""
      },
      ""doc"": ""The time at which this decision review intake was created""
    },
    {
      ""name"": ""claimCreationTime"",
      ""type"": {
        ""type"": ""long"",
        ""connect.version"": 1,
        ""connect.name"": ""org.apache.kafka.connect.data.Timestamp"",
        ""logicalType"": ""timestamp-millis""
      },
      ""doc"": ""The time at which this decision review claim was created""
    },
    {
      ""name"": ""createdByUsername"",
      ""type"": ""string"",
      ""doc"": ""The user who created this decision review in the system""
    },
    {
      ""name"": ""createdByStation"",
      ""type"": ""string"",
      ""doc"": ""The station number of the user who created the decision review""
    },
    {
      ""name"": ""createdByApplication"",
      ""type"": ""string"",
      ""doc"": ""The application that the user used to create this decision review""
    },
    {
      ""name"": ""decisionReviewIssues"",
      ""type"": {
        ""type"": ""array"",
        ""items"": {
          ""name"": ""DecisionReviewIssue"",
          ""type"": ""record"",
          ""fields"": [
            {
              ""name"": ""contentionId"",
              ""type"": [
                ""null"",
                ""long""
              ],
              ""doc"": ""The ID of the contention created to track this issue. Will be null for ineligible issues""
            },
            {
              ""name"": ""associatedRequestIssueId"",
              ""type"": [
                ""null"",
                ""long""
              ],
              ""default"": null,
              ""doc"": ""The ID of the associated request issue from Caseflow. This corresponds to RequestIssue.id in Caseflow.""
            },
            {
              ""name"": ""unidentified"",
              ""type"": ""boolean"",
              ""doc"": ""Indicates whether this issue was unidentified. If true, both PriorRatingDecisionId and PriorNonRatingDecisionId will be null.""
            },
            {
              ""name"": ""priorRatingDecisionId"",
              ""type"": [
                ""null"",
                ""long""
              ],
              ""default"": null,
              ""doc"": ""The identifier of the prior rating decision that this issue is appealing. This is associated with RequestIssue.contested_rating_decision_reference_id in Caseflow. This value will be null if the issue is unidentified or is a non-rating issue.""
            },
            {
              ""name"": ""priorNonRatingDecisionId"",
              ""type"": [
                ""null"",
                ""long""
              ],
              ""default"": null,
              ""doc"": ""The identifier of the prior non-rating decision that this issue is appealing. This is associated with RequestIssue.nonrating_issue_bgs_id in Caseflow. This value will be null if the issue is unidentified or is a rating issue.""
            },
            {
              ""name"": ""priorDecisionText"",
              ""type"": ""string"",
              ""doc"": ""The description of the prior decision that is being reviewed by this issue.""
            },
            {
              ""name"": ""priorDecisionType"",
              ""type"": [
                ""null"",
                ""string""
              ],
              ""default"": null,
              ""doc"": ""The type of decision that this issue is appealing""
            },
            {
              ""name"": ""priorDecisionNotificationDate"",
              ""type"": {
                ""type"": ""int"",
                ""connect.version"": 1,
                ""connect.name"": ""org.apache.kafka.connect.data.Date"",
                ""logicalType"": ""date""
              },
              ""doc"": ""The date at which the claimant was notified of the prior decision. If its a rating issue, its the promulgation date plus one day. If its a non-rating issue, its the authorization date. If its an unidentified issue, its the user provided date.""
            },
            {
              ""name"": ""priorDecisionDiagnosticCode"",
              ""type"": [
                ""null"",
                ""string""
              ],
              ""default"": null,
              ""doc"": ""The diagnostic code(s) of the prior decision that is being reviewed by this issue""
            },
            {
              ""name"": ""priorDecisionRatingPercentage"",
              ""type"": [
                ""null"",
                ""string""
              ],
              ""default"": null,
              ""doc"": ""The rating percentage of the prior decision that is being reviewed by this issue""
            },
            {
              ""name"": ""eligible"",
              ""type"": ""boolean"",
              ""doc"": ""Indicates whether this issue was eligible for appeal. If true, a contention was created for it. Otherwise, false.""
            },
            {
              ""name"": ""eligibilityResult"",
              ""type"": {
                ""type"": ""enum"",
                ""name"": ""EligibilityResultEnum"",
                ""symbols"": [
                  ""ELIGIBLE"",
                  ""ELIGIBLE_LEGACY"",
                  ""TIME_RESTRICTION"",
                  ""PENDING_LEGACY_APPEAL"",
                  ""LEGACY_TIME_RESTRICTION"",
                  ""NO_SOC_SSOC"",
                  ""CONTESTED"",
                  ""PENDING_HLR"",
                  ""COMPLETED_HLR"",
                  ""PENDING_BOARD"",
                  ""COMPLETED_BOARD"",
                  ""PENDING_SUPPLEMENTAL""
                ]
              },
              ""doc"": ""The specific reason why this issue is eligible or ineligible""
            },
            {
              ""name"": ""timeOverride"",
              ""type"": [
                ""null"",
                ""boolean""
              ],
              ""default"": null,
              ""doc"": ""Whether this issue was ineligible due to the time restriction but that restriction was overridden""
            },
            {
              ""name"": ""timeOverrideReason"",
              ""type"": [
                ""null"",
                ""string""
              ],
              ""default"": null,
              ""doc"": ""Optional reason why the user granted the time restriction override to the claimant""
            },
            {
              ""name"": ""contested"",
              ""type"": [
                ""null"",
                ""boolean""
              ],
              ""default"": null,
              ""doc"": ""Whether or not this issue is being contested by another claimant. Only relevant for certain Prior Decision types""
            },
            {
              ""name"": ""socOptIn"",
              ""type"": [
                ""null"",
                ""boolean""
              ],
              ""default"": null,
              ""doc"": ""Whether or not the claimant is opting in from the legacy appeals system""
            },
            {
              ""name"": ""legacyAppealId"",
              ""type"": [
                ""null"",
                ""long""
              ],
              ""default"": null,
              ""doc"": ""The ID of the legacy VACOLS appeal that is being opted-in from. This is associated with VacolsIssue.vacols_id in Caseflow. ""
            },
            {
              ""name"": ""legacyAppealIssueId"",
              ""type"": [
                ""null"",
                ""long""
              ],
              ""default"": null,
              ""doc"": ""The ID of the legacy VACOLS issue that is being opted-in from. This is associated with VacolsIssue.vacols_sequence_id in Caseflow. This issue should be closed out in VACOLS""
            }
          ]
        }
      }
    }
  ]
}
```


# Caseflow Tables
* bold text indicates Caseflow factory default fields
* italicized text indicates table indexes
## Caseflow Higher Level Reviews (HLR)

| name                            | datatype | cannot be null | populated upon creation |               VBMS payload equivalent                |
|:------------------------------- |:-------- |:--------------:|:-----------------------:|:----------------------------------------------------:|
| **benefit_type**                | string   |                |         &check;         |                       ep_code?                       |
| created_at                      | datetime |                |         &check;         |                  claimCreationTime?                  |
| establishment_attempted_at      | datetime |                |         &check;         |                                                      |
| establishment_canceled_at       | datetime |                |                         |                                                      |
| establishment_error             | string   |                |                         |                                                      |
| establishment_last_submitted_at | datetime |                |         &check;         |                                                      |
| establishment_processed_at      | datetime |                |         &check;         |                                                      |
| establishment_submitted_at      | datetime |                |         &check;         |                                                      |
| filed_by_va_gov                 | boolean  |                |                         |                          ?                           |
| informal_conference             | boolean  |                |                         |             informalConferenceRequested              |
| legacy_opt_in_approved          | boolean  |                |                         |                       socOptIn                       |
| **receipt_date**                | date     |                |         &check;         |                  claimReceivedDate                   |
| same_office                     | boolean  |                |                         |              sameStationReviewRequested              |
| ***updated_at***                | datetime |                |         &check;         |                                                      |
| ***uuid***                      | uuid     |    &check;     |         &check;         |                                                      |
| ***veteran_file_number***       | string   |    &check;     |         &check;         |          veteranFileNumber (will be added)           |
| veteran_is_not_claimant         | boolean  |                |                         | compare veteranParticipantId & claimantParticipantId |




## Caseflow Supplemental Claims

| name                                | datatype | cannot be null | populated upon creation |               VBMS payload equivalent                |
| ----------------------------------- |:-------- |:--------------:|:-----------------------:|:----------------------------------------------------:|
| **benefit_type**                    | string   |                |         &check;         |                       ep_code?                       |
| created_at                          | datetime |                |         &check;         |                  claimCreationTime?                  |
| decision_review_remanded_id         | bigint   |                |                         |                                                      |
| ***decision_review_remanded_type*** | string   |                |                         |                                                      |
| establishment_attempted_at          | datetime |                |         &check;         |                                                      |
| establishment_canceled_at           | datetime |                |                         |                                                      |
| establishment_error                 | string   |                |                         |                                                      |
| establishment_last_submitted_at     | datetime |                |         &check;         |                                                      |
| establishment_processed_at          | datetime |                |         &check;         |                                                      |
| establishment_submitted_at          | datetime |                |         &check;         |                                                      |
| filed_by_va_gov                     | boolean  |                |                         |                          ?                           |
| legacy_opt_in_approved              | boolean  |                |                         |                       socOptIn                       |
| **receipt_date**                    | date     |                |         &check;         |                  claimReceivedDate                   |
| ***updated_at***                    | datetime |                |         &check;         |                                                      |
| ***uuid***                          | uuid     |    &check;     |         &check;         |                                                      |
| ***veteran_file_number***           | string   |    &check;     |         &check;         |          veteranFileNumber (will be added)           |
| veteran_is_not_claimant             | boolean  |                |                         | compare veteranParticipantId & claimantParticipantId |
