> ## Documentation Index
> Fetch the complete documentation index at: https://developer.eka.care/llms.txt
> Use this file to discover all available pages before exploring further.

# Patient Directory overview

## Overview

The **Patient Directory** provides APIs for managing patient profiles in your system.

## Patient Profile

A **Patient Profile** represents the core demographic and identifier data for a patient, used for managing and retrieving patient details across the system.

> **Profile Details**
>
> | Field | Source | Type | Description |
> | - | - | - | - |
> | `oid` | System Generated | `string` | unique identifier |
> | `wid` | System Generated | `string` | Workspace ID |
> | `ps` | System Generated | `string` | Persona type (allowed-> \["P"]) |
> | `c_ate` | System Generated | `integer` | Creation timestamp (epoch) |
> | `u_ate` | System Generated | `integer` | Last update timestamp (epoch) |
> | `gen` | User Input | `"M" \| "F" \| "O"` | Gender (Refer below) |
> | `dob` | User Input | `date` | Date of birth |
> | `fn` | User Input | `string` | First name (mandatory if fln not provided) |
> | `mn` | User Input | `string` | Middle name |
> | `ln` | User Input | `string` | Last name |
> | `fln` | User Input. | `string` | Full name (If not provided, derived as fn + mn + ln) |
> | `ccd` | User Input | `string` | Country code |
> | `mobile` | User Input | `string` | Mobile number (ccd + mobile -> E.164 format) |
> | `email` | User Input | `string` | Valid email address |
> | `username` | User Input | `string` | Unique user identifier like (UHID) |
> | `s` | User Input | `string` | Salutation (Refer below) |
> | `bg` | User Input | `string` | Blood group (Refer Below) |
> | `abha` | User Input | `string` | ABHA address |
> | `arc` | System Updated | `boolean` | Is profile archived |

> **Gender Enums**
>
> Supported Genders
>
> | Enum | Gender |
> | - | - |
> | F | Female |
> | M | Male |
> | O | Others |

> **Blood Groups**
>
> Supported Blood Groups
>
> * A+
> * A-
> * B+
> * B-
> * AB+
> * AB-
> * O+
> * O-

It enables seamless **CRUD operations** (Create, Read, Update, Archive(Delete)) on patient profiles, allowing you to integrate profile management into your applications with ease.

In addition, it offers **search APIs** to locate patient profiles using:

* **Username** (a unique patient identifier like UHID)
* **Mobile number** (without country code)
* **Name** (prefix-based search)

Search results are limited to a **maximum of 100 records** to ensure performance.

For detailed usage, refer to the following API documentation:

* [Create Patient Profile API](https://developer.eka.care/api-sdk/emr/patient-directory-apis/add-patient.md)
* [Retrieve Single Patient Profile API](https://developer.eka.care/api-sdk/emr/patient-directory-apis/retrieve-patient-details.md)
* [List Workspace Patients API](https://developer.eka.care/api-sdk/emr/patient-directory-apis/patients-list-minified.md)
* [Update Patient Profile API](https://developer.eka.care/api-sdk/emr/patient-directory-apis/update-patient-details.md)
* [Archive Patient Profile API](https://developer.eka.care/api-sdk/emr/patient-directory-apis/delete-patient.md)
* [Search Patients API](https://developer.eka.care/api-sdk/emr/patient-directory-apis/search-patient.md)

These APIs are designed to be **developer-friendly** and quick to adopt. Follow the links above for request/response formats, examples, and error handling guidelines.

## Usage Notes

* Ensure that all required fields are provided when adding or editing patient information.
* Use appropriate search criteria to narrow down patient records effectively.
* Handle sensitive patient data with care and comply with relevant privacy regulations.
* Currently, a patient can only be added in reference to a workspace. This automatically adds the patient profile to the workspace directory and allows searching at the workspace level.


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