> For the complete documentation index, see [llms.txt](https://docs.evitalrx.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.evitalrx.in/api-for-patient-app/patients/add-patient.md).

# Add Patient

### &#x20;<img src="https://static.vecteezy.com/system/resources/thumbnails/018/930/572/small/youtube-logo-youtube-icon-transparent-free-png.png" alt="" data-size="line"> [Learn How to Add a Patient or Family Member](https://youtu.be/voc4bcyhZ_8?si=Nf_SpvsQX9vVo26v)

### Add Patient

<mark style="color:green;">`POST`</mark> [`{{apiUrl}}patient/patients/add`](https://api.evitalrx.in/v1/patient/patients/add)

#### Request Body

| Name                                          | Type   | Description                                                                                                                               |
| --------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| apikey<mark style="color:red;">\*</mark>      | String | Authentication token                                                                                                                      |
| zipcode                                       | Number | Zip code of the Patient                                                                                                                   |
| mobile<mark style="color:red;">\*</mark>      | String | Mobile number of Patient                                                                                                                  |
| first\_name<mark style="color:red;">\*</mark> | String | First name of Patient                                                                                                                     |
| last\_name                                    | String | Last name of Patient                                                                                                                      |
| dob                                           | String | <p>Date of Birth of the Patient</p><p>Format: YYYY-MM-DD</p>                                                                              |
| gender                                        | String | <p>Gender of the Patient.</p><p>Must be one of <strong>male, female, other</strong>.</p>                                                  |
| blood\_group                                  | String | Blood Group of the Patient                                                                                                                |
| custom\_fields                                | Object | <p>Key value pairs of attribute\_key and it's value.<br>For ex:<br>{"patient\_ipd\_id": "IPD1234", "patient\_mapped\_id": "PMID9876"}</p> |

{% tabs %}
{% tab title="200 Patient added successfully." %}

```json
{
    "status_code": "1",
    "status_message": "Patient registered successfully.",
    "datetime": "2022-12-06 18:07:04",
    "data": {
        "patient_id": "qAj4hhwefVxwuZX9nFxHkQ==" // Unique Patient ID
    }
}
```

{% endtab %}

{% tab title="200: OK Patient added Failed" %}

```
{
    "status_code": "0",
    "status_message": "This Mobile is already exist.",
    "datetime": "2022-12-07 12:23:41",
    "data": {
        "patient_id": "qAj4hhwefVxwuZX9nFxHkQ=="
    }
}
```

{% endtab %}

{% tab title="200: OK Validation Error" %}

```json
{
    "status_code": "0",
    "status_message": "Please enter valid zipcode",
    "datetime": "2022-12-06 18:09:55",
    "data": null
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.evitalrx.in/api-for-patient-app/patients/add-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.
