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

# Prescription

> Event payload details and trigger documentation for Prescription 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 Prescription event payload from Healthie.

* `Healthie Prescription Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "date_inactive": "2024-07-15",
    "date_written": "2024-01-15",
    "days_supply": 30,
    "directions": "Take 1 tablet by mouth twice daily with food",
    "dosage": "200 mg",
    "dose_form": "Tablet",
    "effective_date": "2024-01-15",
    "id": "838581231",
    "last_fill_date": "2024-02-14",
    "patient_id": "121250",
    "pharmacy": {
      "city": "San Francisco",
      "id": "212012",
      "line1": "123 Main Street",
      "line2": "Suite 100",
      "phone_number": "+15551234123",
      "state": "CA",
      "zip": "94117"
    },
    "prescriber_name": "Dr. Sarah Johnson",
    "product_name": "Ibuprofen 200 mg tablet",
    "quantity": "60",
    "refills": "5",
    "rx_reference_number": "RX123456789",
    "rxcui": "5640",
    "status": "eRxSent",
    "unit": "tablet"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "date_inactive": "Date when prescription became ineffective",
    "date_written": "Date prescription was written",
    "days_supply": "Number of days supplied prescription should last",
    "directions": "Direction provided to patient when taking prescription. Entered by provider",
    "dosage": "The dosage (strength) of the prescription",
    "dose_form": "The form of the prescription. Example: tablet, capsule, teaspoon",
    "effective_date": "Date when prescription became effective",
    "id": "The unique identifier of the prescription",
    "last_fill_date": "Date prescription was last refilled",
    "patient_id": "Patient's ID",
    "pharmacy": {
      "city": "City",
      "id": "ID for the pharmacy",
      "line1": "First line of the address",
      "line2": "Second line of the address",
      "phone_number": "Phone number of the prescription-fulfullinng pharmacy",
      "state": "State",
      "zip": "Zip code"
    },
    "prescriber_name": "The name of the prescriber",
    "product_name": "Name and dosage of the prescription. Example: ibuprofen 200 mg tablet",
    "quantity": "Quantity of medication per refill",
    "refills": "Number of refills prescribed",
    "rx_reference_number": "The prescription reference number",
    "rxcui": "The prescription RxCUI",
    "status": "Status of prescription. Example: Entered, Printed, Sending, eRxSent, Deleted",
    "unit": "Unit of medication. Example: tablet, capsule, teaspoon"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Prescription" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      The unique identifier of the prescription

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

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

    <ResponseField name="patient_id" type="string" required>
      `ID` Patient's ID

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

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

    <ResponseField name="pharmacy" type="object">
      *Description coming soon*

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

      ```json Example theme={null}
      {
      "city": "San Francisco",
      "id": "212012",
      "line1": "123 Main Street",
      "line2": "Suite 100",
      "phone_number": "+15551234123",
      "state": "CA",
      "zip": "94117"
      }
      ```
    </ResponseField>

    <ResponseField name="pharmacy.id" type="string">
      ID for the pharmacy

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

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

    <ResponseField name="pharmacy.line1" type="string">
      First line of the address

      ```json CEL theme={null}
      pharmacy.line1
      ```

      ```json Example theme={null}
      "123 Main Street"
      ```
    </ResponseField>

    <ResponseField name="pharmacy.line2" type="string">
      Second line of the address

      ```json CEL theme={null}
      pharmacy.line2
      ```

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

    <ResponseField name="pharmacy.city" type="string">
      City

      ```json CEL theme={null}
      pharmacy.city
      ```

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

    <ResponseField name="pharmacy.state" type="string">
      State

      ```json CEL theme={null}
      pharmacy.state
      ```

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

    <ResponseField name="pharmacy.zip" type="string">
      Zip code

      ```json CEL theme={null}
      pharmacy.zip
      ```

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

    <ResponseField name="pharmacy.phone_number" type="string">
      `PII` Phone number of the prescription-fulfullinng pharmacy

      ```json CEL theme={null}
      pharmacy.phone_number
      ```

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

    <ResponseField name="dosage" type="string">
      The dosage (strength) of the prescription

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

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

    <ResponseField name="unit" type="string">
      Unit of medication. Example: tablet, capsule, teaspoon

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

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

    <ResponseField name="directions" type="string">
      Direction provided to patient when taking prescription. Entered by provider

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

      ```json Example theme={null}
      "Take 1 tablet by mouth twice daily with food"
      ```
    </ResponseField>

    <ResponseField name="days_supply" type="int64">
      Number of days supplied prescription should last

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

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

    <ResponseField name="date_written" type="values.v1.Date">
      Date prescription was written

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

      ```json Example theme={null}
      "2024-01-15"
      ```
    </ResponseField>

    <ResponseField name="effective_date" type="values.v1.Date">
      Date when prescription became effective

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

      ```json Example theme={null}
      "2024-01-15"
      ```
    </ResponseField>

    <ResponseField name="date_inactive" type="values.v1.Date">
      Date when prescription became ineffective

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

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

    <ResponseField name="last_fill_date" type="values.v1.Date">
      Date prescription was last refilled

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

      ```json Example theme={null}
      "2024-02-14"
      ```
    </ResponseField>

    <ResponseField name="prescriber_name" type="string">
      `HI` The name of the prescriber

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

      ```json Example theme={null}
      "Dr. Sarah Johnson"
      ```
    </ResponseField>

    <ResponseField name="product_name" type="string">
      `HI` Name and dosage of the prescription. Example: ibuprofen 200 mg tablet

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

      ```json Example theme={null}
      "Ibuprofen 200 mg tablet"
      ```
    </ResponseField>

    <ResponseField name="quantity" type="string">
      Quantity of medication per refill

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

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

    <ResponseField name="refills" type="string">
      Number of refills prescribed

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

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

    <ResponseField name="rx_reference_number" type="string">
      `HI` The prescription reference number

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

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

    <ResponseField name="rxcui" type="string">
      The prescription RxCUI

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

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

    <ResponseField name="status" type="string">
      Status of prescription. Example: Entered, Printed, Sending, eRxSent, Deleted

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

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

    <ResponseField name="dose_form" type="string">
      The form of the prescription. Example: tablet, capsule, teaspoon

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

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