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

# Create your first Recipe

> Build a simple Recipe for active male patients aged 50 or older.

In this guide, you will build a Recipe for:

**Active male patients aged 50 or older.**

It is a simple example, but it introduces the main pattern you will use again and again: choose a field, choose how to compare it, then choose the value.

<Note>
  The screenshots in this guide are cropped to the Recipe area of the dashboard.
  They show the exact choices to make, without showing patient details.
</Note>

## Before you start

Open **Recipes** from the sidebar, then select **New Recipe**.

PracticeMate first asks:

**What kind of Recipe would you like to create?**

You can describe the Recipe in plain English, or select **Open the full editor instead**. This guide uses the full editor so you can see exactly how the Recipe is built.

<img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/new-recipe-start.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=4a80d4015e38106409ac22d3a7e31330" alt="The new Recipe screen asking what kind of Recipe to create, with an option to open the full editor." className="rounded-lg border" width="1000" height="500" data-path="images/recipes/new-recipe-start.jpg" />

<Info>
  New Recipes include **Status is Active** and **Extraction Opt-Out is False**
  by default. Keep both filters for this example.
</Info>

After opening the full editor, you should see the two default patient filters:

<img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/builder-default-filters.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=89c8982771e9a956274dd7ae3ed52825" alt="The Recipe Builder showing the default patient filters: Status is Active and Extraction Opt-Out is False." className="rounded-lg border" width="1120" height="430" data-path="images/recipes/builder-default-filters.jpg" />

## Add the age filter

<Steps>
  <Step title="Select Add Filter">
    In the Patients section, select **Add Filter**. A new blank filter row appears under the default filters.
  </Step>

  <Step title="Choose the field">
    In the first box, type **age**, then select **Age (Years)**.

    <img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/choose-age-field.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=791e88c87880c6db1a5de768a8f7d741" alt="The field chooser filtered to age fields, with Age (Years) selected." className="rounded-lg border" width="900" height="610" data-path="images/recipes/choose-age-field.jpg" />
  </Step>

  <Step title="Choose the operator">
    In the second box, choose **is greater than or equal to**.

    <img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/choose-age-operator.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=ed6024889ebf899841a43723cf349265" alt="The operator chooser showing is greater than or equal to." className="rounded-lg border" width="880" height="370" data-path="images/recipes/choose-age-operator.jpg" />
  </Step>

  <Step title="Enter the value">
    In the value box, enter **50**.

    <img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/age-filter-complete.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=0dc3f2c4a5fcdf41afbf22bf679deabb" alt="The Recipe Builder showing Age (Years) is greater than or equal to 50." className="rounded-lg border" width="1110" height="520" data-path="images/recipes/age-filter-complete.jpg" />
  </Step>
</Steps>

This means PracticeMate will include patients who are 50 or older.

## Add the sex filter

<Steps>
  <Step title="Add another filter">
    Select **Add Filter** again, under the age filter.
  </Step>

  <Step title="Choose the field">
    Select **Sex**.
  </Step>

  <Step title="Choose the operator">
    Choose **is**.
  </Step>

  <Step title="Choose the value">
    Select **Male**.

    <img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/choose-sex-value.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=841189910fc79f3c8f227493b867194d" alt="The value chooser showing Male as the selected Sex value." className="rounded-lg border" width="870" height="310" data-path="images/recipes/choose-sex-value.jpg" />
  </Step>
</Steps>

Your Recipe now reads as a set of patient filters:

<img src="https://mintcdn.com/practicemate-6786ac90/PV9Jkc_3uoV9ywOH/images/recipes/first-recipe-complete.jpg?fit=max&auto=format&n=PV9Jkc_3uoV9ywOH&q=85&s=4d10d7e5c76072d530f709644fb96c39" alt="The Recipe Builder showing active patients who have not opted out, are aged 50 or older, and have Sex set to Male." className="rounded-lg border" width="1110" height="520" data-path="images/recipes/first-recipe-complete.jpg" />

## Why the AND connectors matter

The filters are joined with **AND**, which means a patient must match every line:

* active
* not opted out of extraction
* age 50 or older
* male

If you changed one of these connectors to **OR**, the Recipe would become much broader. For this Recipe, leave the connectors as **AND**.

Read the Recipe back before testing:

> Find active patients who have not opted out of extraction, are aged 50 or older, and have Sex set to Male.

## Test the Recipe

Select **Test** in the top right of the builder.

PracticeMate will check the Recipe and show how many patients match. If the number looks unexpected, review the filters before saving.

<Tip>
  Testing is a quick safety check. It does not change patient records, and it
  does not save the Recipe.
</Tip>

## Save the Recipe

When the test result looks sensible:

<Steps>
  <Step title="Name the Recipe">
    Select the title at the top of the page and enter **Active male patients
    aged 50+**.
  </Step>

  <Step title="Save">Select **Save**.</Step>
</Steps>

<Check>You have built your first PracticeMate Recipe.</Check>

Saving also creates the first version of the Recipe. If you edit and save the Recipe again later, PracticeMate adds another version to its Version history.

You can open **Version history** from the **...** menu on the Recipes page. It lets you look back at earlier saved versions and restore one if your team needs to return to it.

## What you learned

You used:

* the default active-patient filters
* a number field, **Age (Years)**
* a list field, **Sex**
* the **is greater than or equal to** operator
* the **is** operator
* **AND** connectors
* **Test** and **Save**
* **Version history** as a way to return to earlier saved work

Next, you will add an ingredient to find patients with [three or more visits in the last two years](/recipes/frequent-visits).
