---
schema_version: "1"
id: d2e55d9e652502c842e3734d3e0d8032818e91ece5b19cf98f79fba06db03772
title: Recalculate Patient Risk Scores as Needed
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/admin_apex_run_recalculate_job.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.admin_apex_run_recalculate_job.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 70cd7c1e7bea89f4bb821949225fc1592b1963a3976fade8ed35e30a31ae3954
description: Recalculate Medicare and Medicaid patient risk scores in Health Cloud as needed with a batch Apex job.
products:
  - Health
release: "264"
---
# Recalculate Patient Risk Scores as Needed

Recalculate Medicare and Medicaid patient risk scores in Health Cloud as needed with a batch Apex job.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available in: Lightning Experience</p>
              <p style="margin-bottom:0;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions with Health
                Cloud</p>
            </td>

          </tr>
        </tbody>
      </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d105346e66">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d105346e66 ">To execute Apex classes:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d105346e66 ">Author Apex</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d105346e66 ">To invoke the class:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d105346e66 ">Author Apex AND View All Data</td>

          </tr>
        </tbody>
      </table>

Invoke the `HcCMSRiskScoringScheduledJob` class in your Apex job.

1. Open the Developer Console.
2. Select **Debug | Open Execute Anonymous Window**.
3. In the Enter Apex Code window, enter this text.
    
    `HealthcloudGA.HcCMSRiskScoringScheduledJob s = new HealthcloudGA.HcCMSRiskScoringScheduledJob (year); s.execute(null);`
    
    - Enter the year as a four-digit number, for example, 2017.
    - The batch size is optional. If you don’t specify a batch size, the job processes up to 200 records.
    - Optionally, set a value to ignore the recalculate flag and run the algorithm for all active patients.
4. Click **Execute**.