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

# Add Patient to Directory

> This functionality enables the addition of new patient records to a business' directory. Users can provide necessary details such as personal information, contact details, and medical history to create a new patient profile.

> _In case the patient is already registered with Eka care, then passing the patient eka id will be enough_



## OpenAPI

````yaml post /dr/v1/patient
openapi: 3.0.0
info:
  title: Ekacare API & Webhook Documentation
  contact: {}
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /dr/v1/patient:
    post:
      tags:
        - Patient Registration API
      summary: Add Patient to Directory
      description: >-
        This functionality enables the addition of new patient records to a
        business' directory. Users can provide necessary details such as
        personal information, contact details, and medical history to create a
        new patient profile.


        > _In case the patient is already registered with Eka care, then passing
        the patient eka id will be enough_
      operationId: AddPatienttoDirectory
      parameters:
        - name: auth
          in: header
          required: true
          description: >-
            The auth token of business_id. It is used to authenticate the
            business. The token can be fetched from the auth api.
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
      requestBody:
        description: Request body for adding a patient to the directory
        content:
          application/json:
            schema:
              type: object
              required:
                - first_name
                - dob
                - gender
              properties:
                designation:
                  type: string
                  enum:
                    - Mr.
                    - Ms.
                    - Mrs.
                    - Miss.
                    - Kumar.
                    - Shri.
                    - Smt.
                    - Dr.
                    - Master.
                    - Baby.
                    - Mohd.
                    - B/O
                  example: Mr.
                  description: Title or designation of the patient
                first_name:
                  type: string
                  example: Test
                  description: First name of the patient
                partner_patient_id:
                  type: string
                  example: '6742984'
                  description: Identifier for the partner’s patient.
                middle_name:
                  type: string
                  example: ''
                  description: Middle name of the patient (if any)
                last_name:
                  type: string
                  example: Patient
                  description: Last name of the patient
                mobile:
                  type: string
                  example: '+919999999999'
                  description: Mobile number of the patient, including country code
                gender:
                  type: string
                  example: M
                  description: >-
                    Gender of the patient (e.g., 'M' for male, 'F' for female,
                    'O' for others)
                  enum:
                    - M
                    - F
                    - O
                address:
                  type: object
                  properties:
                    city:
                      type: string
                      example: Bangalore
                    pincode:
                      type: integer
                      example: 560049
                  description: Address details of the patient
              oneOf:
                - title: DOB
                  properties:
                    dob:
                      type: string
                      format: date
                      example: '1987-01-06'
                      description: Date of birth of the patient (YYYY-MM-DD)
                  required:
                    - dob
                - title: AGE
                  properties:
                    age:
                      type: integer
                      example: 24
                      description: Age in years
                  required:
                    - age
      responses:
        '201':
          description: OK
          headers:
            Date:
              schema:
                type: string
                example: Tue, 24 Mar 2020 06:26:06 GMT
            Content-Length:
              schema:
                type: string
                example: '380'
            Connection:
              schema:
                type: string
                example: keep-alive
            Server:
              schema:
                type: string
                example: nginx/1.10.3 (Ubuntu)
            Vary:
              schema:
                type: string
                example: Cookie, Accept-Encoding
            Content-Encoding:
              schema:
                type: string
                example: gzip
            Strict-Transport-Security:
              schema:
                type: string
                example: max-age=15768000
          content:
            application/json:
              schema:
                type: object
                properties:
                  patient_id:
                    type: string
                    example: '123456789'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403ForbiddenFinal'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                  status_code:
                    type: integer
                  success:
                    type: boolean
              example:
                error:
                  code: PATIENT_ALREADY_EXISTS
                  message: 'Patient already exists with the same partner_patient_id: abc'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500InternalServerFinal'
      deprecated: false
components:
  schemas:
    403ForbiddenFinal:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_ALLOWED
            message:
              type: string
              example: You are not allowed to add resource
    500InternalServerFinal:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INTERNAL_SERVER_ERROR
            message:
              type: string
              example: Internal server error

````