> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Policy

> Event payload details and trigger documentation for Policy data from Healthie

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/healthie.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=d168a24dbae69f2202ca63dd7aa2e1f3" alt="images/healthie.svg" width="40" height="40" data-path="images/healthie.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Policy event payload from Healthie.

* `Healthie Policy Created`
* `Healthie Policy Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "benefits": [
      {
        "coinsurance": "15",
        "copay": "50",
        "deductible_calendar_year": "2000",
        "deductible_year_to_date": "1500"
      }
    ],
    "effective_end": "2024-07-04",
    "group_num": "331256",
    "id": "202402",
    "insurance_card_back_id": "123452",
    "insurance_card_front_id": "123451",
    "insurance_plan": {
      "id": "611231",
      "name_and_id": "Blue Cross Blue Shield - 629913",
      "payer_id": "629913",
      "payer_name": "Blue Cross Blue Shield"
    },
    "insurance_type": "Medicaid",
    "notes": "Policy is active",
    "num": "1912310",
    "patient_id": "100121",
    "priority_type": "Primary",
    "updated_at": "2024-07-01T11:29:19+00:00"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "benefits": {
      "coinsurance": "Coinsurance percentage due",
      "copay": "Copay amount due",
      "deductible_calendar_year": "Deductible amount for the calendar year",
      "deductible_year_to_date": "Deductible amount for the year to-date"
    },
    "effective_end": "Date the policy coverage expires",
    "group_num": "Group number",
    "id": "ID for the policy",
    "insurance_card_back_id": "ID of the insurance card back image object",
    "insurance_card_front_id": "ID of the insurance card front image object",
    "insurance_plan": {
      "id": "ID of the insurance plan",
      "name_and_id": "Name of the payer and id of payer",
      "payer_id": "ID of the insurance payer",
      "payer_name": "Name of the insurance payer"
    },
    "insurance_type": "The type of insurance: `type_string`",
    "notes": "Notes about the policy",
    "num": "Policy number",
    "patient_id": "ID of the patient associated with the policy",
    "priority_type": "The priority type of insurance: `priority_type`",
    "updated_at": "Last time the Policy was updated"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Policy" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="insurance_plan" type="object">
      Insurance plan details

      ```json CEL theme={null}
      insurance_plan
      ```

      ```json Example theme={null}
      {
      "id": "611231",
      "name_and_id": "Blue Cross Blue Shield - 629913",
      "payer_id": "629913",
      "payer_name": "Blue Cross Blue Shield"
      }
      ```
    </ResponseField>

    <ResponseField name="insurance_plan.payer_id" type="string">
      ID of the insurance payer

      ```json CEL theme={null}
      insurance_plan.payer_id
      ```

      ```json Example theme={null}
      "629913"
      ```
    </ResponseField>

    <ResponseField name="insurance_plan.payer_name" type="string">
      Name of the insurance payer

      ```json CEL theme={null}
      insurance_plan.payer_name
      ```

      ```json Example theme={null}
      "Blue Cross Blue Shield"
      ```
    </ResponseField>

    <ResponseField name="insurance_plan.id" type="string">
      ID of the insurance plan

      ```json CEL theme={null}
      insurance_plan.id
      ```

      ```json Example theme={null}
      "611231"
      ```
    </ResponseField>

    <ResponseField name="insurance_plan.name_and_id" type="string">
      Name of the payer and id of payer

      ```json CEL theme={null}
      insurance_plan.name_and_id
      ```

      ```json Example theme={null}
      "Blue Cross Blue Shield - 629913"
      ```
    </ResponseField>

    <ResponseField name="num" type="string">
      `PII` Policy number

      ```json CEL theme={null}
      num
      ```

      ```json Example theme={null}
      "1912310"
      ```
    </ResponseField>

    <ResponseField name="group_num" type="string">
      Group number

      ```json CEL theme={null}
      group_num
      ```

      ```json Example theme={null}
      "331256"
      ```
    </ResponseField>

    <ResponseField name="notes" type="string">
      Notes about the policy

      ```json CEL theme={null}
      notes
      ```

      ```json Example theme={null}
      "Policy is active"
      ```
    </ResponseField>

    <ResponseField name="effective_end" type="values.v1.Date">
      Date the policy coverage expires

      ```json CEL theme={null}
      effective_end
      ```

      ```json Example theme={null}
      "2024-07-04"
      ```
    </ResponseField>

    <ResponseField name="id" type="string" required>
      ID for the policy

      ```json CEL theme={null}
      id
      ```

      ```json Example theme={null}
      "202402"
      ```
    </ResponseField>

    <ResponseField name="patient_id" type="string" required>
      `ID` `PII` ID of the patient associated with the policy

      ```json CEL theme={null}
      patient_id
      ```

      ```json Example theme={null}
      "100121"
      ```
    </ResponseField>

    <ResponseField name="insurance_card_front_id" type="string">
      `HI` `ID` `PII` ID of the insurance card front image object

      ```json CEL theme={null}
      insurance_card_front_id
      ```

      ```json Example theme={null}
      "123451"
      ```
    </ResponseField>

    <ResponseField name="insurance_card_back_id" type="string">
      `HI` `ID` `PII` ID of the insurance card back image object

      ```json CEL theme={null}
      insurance_card_back_id
      ```

      ```json Example theme={null}
      "123452"
      ```
    </ResponseField>

    <ResponseField name="updated_at" type="timing.v1.Timestamp" required>
      Last time the Policy was updated

      ```json CEL theme={null}
      updated_at
      ```

      ```json Example theme={null}
      "2024-07-01T11:29:19+00:00"
      ```
    </ResponseField>

    <ResponseField name="insurance_type" type="string">
      The type of insurance: `type_string`

      ```json CEL theme={null}
      insurance_type
      ```

      ```json Example theme={null}
      "Medicaid"
      ```
    </ResponseField>

    <ResponseField name="priority_type" type="string">
      The priority type of insurance: `priority_type`

      ```json CEL theme={null}
      priority_type
      ```

      ```json Example theme={null}
      "Primary"
      ```
    </ResponseField>

    <ResponseField name="benefits" type="[]object" required>
      Insurance plan details

      ```json CEL theme={null}
      benefits
      ```

      ```json Example theme={null}
      [
      {
      "coinsurance": "15",
      "copay": "50",
      "deductible_calendar_year": "2000",
      "deductible_year_to_date": "1500"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="benefits.map(x, x.coinsurance)" type="[]string" required>
      Mapped array of: Coinsurance percentage due

      ```json CEL theme={null}
      benefits.map(x, x.coinsurance)
      ```

      ```json Example theme={null}
      [
      "15"
      ]
      ```
    </ResponseField>

    <ResponseField name="benefits.map(x, x.copay)" type="[]string" required>
      Mapped array of: Copay amount due

      ```json CEL theme={null}
      benefits.map(x, x.copay)
      ```

      ```json Example theme={null}
      [
      "50"
      ]
      ```
    </ResponseField>

    <ResponseField name="benefits.map(x, x.deductible_calendar_year)" type="[]string" required>
      Mapped array of: Deductible amount for the calendar year

      ```json CEL theme={null}
      benefits.map(x, x.deductible_calendar_year)
      ```

      ```json Example theme={null}
      [
      "2000"
      ]
      ```
    </ResponseField>

    <ResponseField name="benefits.map(x, x.deductible_year_to_date)" type="[]string" required>
      Mapped array of: Deductible amount for the year to-date

      ```json CEL theme={null}
      benefits.map(x, x.deductible_year_to_date)
      ```

      ```json Example theme={null}
      [
      "1500"
      ]
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
