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

# Create Referral

> Documentation for the Create Referral action for Healthie

![images/healthie.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/healthie.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=d168a24dbae69f2202ca63dd7aa2e1f3)

# Parameters

**Action** `Parameters`

**parameters**

**Metadata** `Map\<string,dynamic (any)\>`

`ID` `PII`
This field maps to the destination API `metadata` field.

**Referral Reason** `string`

`HI`
This field maps to the destination API `referral_reason` field.

**Referring Physician ID** `string` *required*

`ID`
This field maps to the destination API `referring_physician_id` field.

**Patient ID** `string`

`ID`
This field maps to the destination API `user_id` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "id": "57211",
    "metadata": {
      "priority": "High",
      "referral_department": "Cardiology"
    },
    "patient_id": "67890",
    "referral_reason": "Follow-up care",
    "referring_physician_id": "12345"
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "id": "The unique identifier of the referral",
    "metadata": "Metadata",
    "patient_id": "ID of the referred patient",
    "referral_reason": "The reason the client was referred to the physician",
    "referring_physician_id": "ID of the referring physician"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**Referral** `Fetch Action Response Object`

**fields**

**id** `string` *required*

The unique identifier of the referral

```json CEL theme={null}
$result_object_key.id
```

```json Example theme={null}
"57211"
```

**metadata** `object`

Metadata

```json CEL theme={null}
$result_object_key.metadata
```

```json Example theme={null}
{
"priority": "High",
"referral_department": "Cardiology"
}
```

**referral\_reason** `string`

The reason the client was referred to the physician

```json CEL theme={null}
$result_object_key.referral_reason
```

```json Example theme={null}
"Follow-up care"
```

**referring\_physician\_id** `string`

ID of the referring physician

```json CEL theme={null}
$result_object_key.referring_physician_id
```

```json Example theme={null}
"12345"
```

**patient\_id** `string` *required*

ID of the referred patient

```json CEL theme={null}
$result_object_key.patient_id
```

```json Example theme={null}
"67890"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.