> For the complete documentation index, see [llms.txt](https://formdr.gitbook.io/formdr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://formdr.gitbook.io/formdr/documentation/find-patient.md).

# Find Patient

## Get a list of all patient submissions

<mark style="color:blue;">`GET`</mark> `https://api.formdr.com/api/v1/practice/{practiceId}`

#### Path Parameters

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| practiceId | String | Practice ID |

#### Query Parameters

| Name                                        | Type   | Description        |
| ------------------------------------------- | ------ | ------------------ |
| firstName<mark style="color:red;">\*</mark> | String | Patient First Name |
| lastName<mark style="color:red;">\*</mark>  | String | Patient Last Name  |

{% tabs %}
{% tab title="200: OK " %}

```javascript
[{
    submissionId: number,
    practiceId: number,
    formUuid: string,
    recordId: number,
    demographics: {
        firstName: string,
        middleName: string,
        lastName: string,
        preferredName: string,
        sex: string,
        birthday: string,
        email: string,
        primaryPhone: string,
        cellPhone: string,
        address: {
            address: string,
            address2: string,
            city: string,
            state: string,
            zip: string
        }
    }
}]
```

{% endtab %}

{% tab title="401: Unauthorized If you use a different practice ID, you will receive an unauthorized error." %}

```javascript
{
    "Not authorized"
}
```

{% endtab %}

{% tab title="404: Not Found When a record is not found" %}

```javascript
{
    name: "Error",
    message: "No Record Found",
    "errors": []
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you are seeing multiple patient records of the same name, ensure that you form has a DOB field named "birthday". In order to match patient records and ensure submissions are going to the same patient record, firstName, lastName and birthday are the matchers.
{% endhint %}

#### Get a list of all submissions by Record ID

<mark style="color:blue;">`GET`</mark> `https://api.formdr.com/api/v1/practice/{practiceId}`

#### Query Parameters

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| recordId<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK " %}

```javascript
[{
    submissionId: number,
    practiceId: number,
    formUuid: string,
    recordId: number,
    demographics: {
        firstName: string,
        middleName: string,
        lastName: string,
        preferredName: string,
        sex: string,
        birthday: string,
        email: string,
        primaryPhone: string,
        cellPhone: string,
        address: {
            address: string,
            address2: string,
            city: string,
            state: string,
            zip: string
        }
    }
}]
```

{% endtab %}
{% endtabs %}

### Testing

For additional security, when you are testing using the test access tokens, you will not be able to retrieve any PHI data. The only data that will return is the firstName and lastName variables. The remaining variables with simply return a string of the key name.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://formdr.gitbook.io/formdr/documentation/find-patient.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
