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

# Create an IPD admission

> Creates an IPD admission in your workspace. The admission id is server-generated and the authenticated user is recorded as the actor.



## OpenAPI

````yaml api-reference/doc-tool/ipd-api/ipd-sdk-openapi.json post /ipd/v1/sdk/admissions
openapi: 3.1.0
info:
  title: Eka IPD Admission API
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /ipd/v1/sdk/admissions:
    post:
      tags:
        - IPD API
      summary: Create an IPD admission
      description: >-
        Creates an IPD admission in your workspace. The admission id is
        server-generated and the authenticated user is recorded as the actor.
      operationId: IpdSdkCreateAnIpdAdmission
      parameters:
        - name: auth
          in: header
          required: true
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              required:
                - ipid
                - patient
                - attendee
                - doc
                - facility
                - bed
                - duration
                - rateplan
                - pid
                - refer
                - docid
                - category
                - department
                - facilityid
              properties:
                ipid:
                  minLength: 1
                  description: Patient IPD case number.
                  type: string
                patient:
                  additionalProperties: true
                  type: object
                  required:
                    - id
                    - uuid
                    - poid
                    - formData
                    - profile
                  properties:
                    id:
                      type: string
                    uuid:
                      type: string
                    poid:
                      type: string
                    formData:
                      type: array
                      items:
                        additionalProperties: true
                        type: object
                        required:
                          - label
                          - type
                          - key
                          - value
                        properties:
                          label:
                            type: string
                          type:
                            type: string
                          key:
                            type: string
                          value:
                            anyOf:
                              - type: string
                              - type: number
                              - type: array
                                items:
                                  type: string
                    profile:
                      additionalProperties: true
                      type: object
                      required:
                        - personal
                      properties:
                        personal:
                          additionalProperties: true
                          type: object
                          required:
                            - gender
                            - name
                          properties:
                            gender:
                              type: string
                            name:
                              type: string
                            phone:
                              additionalProperties: true
                              type: object
                              properties:
                                c:
                                  type: string
                                'n':
                                  type: string
                            age:
                              additionalProperties: true
                              type: object
                              properties:
                                dob:
                                  type: string
                                value:
                                  type: string
                                month:
                                  type: string
                attendee:
                  additionalProperties: true
                  type: object
                  required:
                    - id
                    - name
                    - phone
                    - relation
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    phone:
                      additionalProperties: true
                      type: object
                      required:
                        - c
                        - 'n'
                      properties:
                        c:
                          type: string
                        'n':
                          minLength: 1
                          description: Attendee mobile number.
                          type: string
                    relation:
                      additionalProperties: true
                      type: object
                      required:
                        - id
                        - label
                      properties:
                        id:
                          type: string
                        label:
                          type: string
                doc:
                  type: object
                  required:
                    - id
                    - name
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                facility:
                  type: object
                  required:
                    - id
                    - name
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                bed:
                  type: string
                duration:
                  additionalProperties: true
                  type: object
                  required:
                    - value
                    - unit
                  properties:
                    value:
                      type: number
                    unit:
                      type: string
                rateplan:
                  additionalProperties: true
                  type: object
                  required:
                    - id
                    - name
                    - inclusions
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    inclusions:
                      type: array
                      items:
                        additionalProperties: true
                        type: object
                        required:
                          - id
                          - name
                          - rate
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          rate:
                            type: number
                pid:
                  minLength: 1
                  type: string
                insurance:
                  additionalProperties: true
                  type: object
                  properties:
                    pre_approved_id:
                      type: string
                    pre_approved_amount:
                      type: number
                    pre_approved:
                      type: boolean
                    number:
                      type: string
                    type:
                      type: string
                    payment_type:
                      type: string
                    insurance_provider:
                      type: string
                    insurance_name:
                      type: string
                    policy_id_picture:
                      type: string
                    medical_claim:
                      type: string
                    coverage_type:
                      type: array
                      items:
                        type: string
                    sum_insured:
                      type: string
                    tpa:
                      type: string
                procedures:
                  type: array
                  items:
                    additionalProperties: true
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      date:
                        type: string
                      notes:
                        type: string
                refer:
                  type: object
                  required:
                    - id
                    - name
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                docid:
                  type: string
                category:
                  type: object
                  required:
                    - id
                    - name
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                department:
                  type: object
                  required:
                    - id
                    - name
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                facilityid:
                  type: string
                notes:
                  type: string
                medico_legal_case:
                  type: boolean
                custom_attributes:
                  type: object
                  additionalProperties:
                    type: array
                    items:
                      type: string
                stage:
                  description: >-
                    Lifecycle stage; defaults to the active inpatient stage
                    (`AD`).
                  anyOf:
                    - type: string
                      enum:
                        - IN
                    - type: string
                      enum:
                        - AD
                    - type: string
                      enum:
                        - DC
                status:
                  description: Granular lifecycle status; defaults to `BED_ASSIGNED`.
                  anyOf:
                    - type: string
                      enum:
                        - ADMISSION_RECOMMENDED
                    - type: string
                      enum:
                        - ADMISSION_ON_HOLD
                    - type: string
                      enum:
                        - ADMISSION_CONFIRMED
                    - type: string
                      enum:
                        - ADMISSION_CANCELLED
                    - type: string
                      enum:
                        - BED_ASSIGNED
                    - type: string
                      enum:
                        - UNDER_CARE
                    - type: string
                      enum:
                        - NOT_RECEIVED
                    - type: string
                      enum:
                        - FIT_FOR_DISCHARGE
                    - type: string
                      enum:
                        - DISCHARGE_INITIATED
                    - type: string
                      enum:
                        - REFERRAL_INITIATED
                    - type: string
                      enum:
                        - LAMA_IN_PROGRESS
                    - type: string
                      enum:
                        - DAMA_IN_PROGRESS
                    - type: string
                      enum:
                        - DEATH_BEING_RECORDED
                    - type: string
                      enum:
                        - PATIENT_MISSING
                    - type: string
                      enum:
                        - DISCHARGED
                    - type: string
                      enum:
                        - LAMA_COMPLETED
                    - type: string
                      enum:
                        - DAMA_COMPLETED
                    - type: string
                      enum:
                        - REFERRED
                    - type: string
                      enum:
                        - DECEASED
                    - type: string
                      enum:
                        - ABSCONDED
                admission_date:
                  description: ISO date-time; defaults to the server now.
                  type: string
                date:
                  description: ISO date-time; defaults to the server now.
                  type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                required:
                  - id
                  - bid
                  - admission_date
                  - ipid
                  - attendee
                  - patient
                  - refer
                  - doc
                  - stage
                  - status
                  - duration
                  - bed
                  - rateplan
                  - docid
                  - category
                  - date
                  - department
                  - pid
                  - created_at
                  - updated_at
                  - facility
                  - facilityid
                  - totalbilled
                  - totalpaid
                  - totalbilled_updated_at
                  - totalpaid_updated_at
                properties:
                  id:
                    type: string
                  bid:
                    type: string
                  admission_date:
                    description: ISO date-time.
                    type: string
                  discharge_date:
                    type: string
                  ipid:
                    description: Patient IPD case number.
                    type: string
                  attendee:
                    additionalProperties: true
                    type: object
                    required:
                      - id
                      - name
                      - phone
                      - relation
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      phone:
                        additionalProperties: true
                        type: object
                        properties:
                          c:
                            type: string
                          'n':
                            type: string
                      relation:
                        additionalProperties: true
                        type: object
                        required:
                          - id
                          - label
                        properties:
                          id:
                            type: string
                          label:
                            type: string
                  patient:
                    additionalProperties: true
                    type: object
                    required:
                      - id
                      - uuid
                      - poid
                      - formData
                      - profile
                    properties:
                      id:
                        type: string
                      uuid:
                        type: string
                      poid:
                        type: string
                      formData:
                        type: array
                        items:
                          additionalProperties: true
                          type: object
                          required:
                            - label
                            - type
                            - key
                            - value
                          properties:
                            label:
                              type: string
                            type:
                              type: string
                            key:
                              type: string
                            value:
                              anyOf:
                                - type: string
                                - type: number
                                - type: array
                                  items:
                                    type: string
                      profile:
                        additionalProperties: true
                        type: object
                        required:
                          - personal
                        properties:
                          personal:
                            additionalProperties: true
                            type: object
                            required:
                              - gender
                              - name
                            properties:
                              gender:
                                type: string
                              name:
                                type: string
                              phone:
                                additionalProperties: true
                                type: object
                                properties:
                                  c:
                                    type: string
                                  'n':
                                    type: string
                              age:
                                additionalProperties: true
                                type: object
                                properties:
                                  dob:
                                    type: string
                                  value:
                                    type: string
                                  month:
                                    type: string
                  procedures:
                    type: array
                    items:
                      additionalProperties: true
                      type: object
                      required:
                        - id
                        - name
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        date:
                          type: string
                        notes:
                          type: string
                  refer:
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                  doc:
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                  notes:
                    type: string
                  medico_legal_case:
                    type: boolean
                  stage:
                    description: >-
                      Coarse lifecycle stage (`IN`/`AD`/`DC`) — replaced the
                      legacy coarse `status`.
                    anyOf:
                      - type: string
                        enum:
                          - IN
                      - type: string
                        enum:
                          - AD
                      - type: string
                        enum:
                          - DC
                  status:
                    description: Granular lifecycle status within the current `stage`.
                    anyOf:
                      - type: string
                        enum:
                          - ADMISSION_RECOMMENDED
                      - type: string
                        enum:
                          - ADMISSION_ON_HOLD
                      - type: string
                        enum:
                          - ADMISSION_CONFIRMED
                      - type: string
                        enum:
                          - ADMISSION_CANCELLED
                      - type: string
                        enum:
                          - BED_ASSIGNED
                      - type: string
                        enum:
                          - UNDER_CARE
                      - type: string
                        enum:
                          - NOT_RECEIVED
                      - type: string
                        enum:
                          - FIT_FOR_DISCHARGE
                      - type: string
                        enum:
                          - DISCHARGE_INITIATED
                      - type: string
                        enum:
                          - REFERRAL_INITIATED
                      - type: string
                        enum:
                          - LAMA_IN_PROGRESS
                      - type: string
                        enum:
                          - DAMA_IN_PROGRESS
                      - type: string
                        enum:
                          - DEATH_BEING_RECORDED
                      - type: string
                        enum:
                          - PATIENT_MISSING
                      - type: string
                        enum:
                          - DISCHARGED
                      - type: string
                        enum:
                          - LAMA_COMPLETED
                      - type: string
                        enum:
                          - DAMA_COMPLETED
                      - type: string
                        enum:
                          - REFERRED
                      - type: string
                        enum:
                          - DECEASED
                      - type: string
                        enum:
                          - ABSCONDED
                  duration:
                    additionalProperties: true
                    type: object
                    required:
                      - value
                      - unit
                    properties:
                      value:
                        type: number
                      unit:
                        type: string
                  bed:
                    type: string
                  rateplan:
                    additionalProperties: true
                    type: object
                    required:
                      - id
                      - name
                      - inclusions
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      inclusions:
                        type: array
                        items:
                          additionalProperties: true
                          type: object
                          required:
                            - id
                            - name
                            - rate
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rate:
                              type: number
                  docid:
                    type: string
                  category:
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                  date:
                    type: string
                  department:
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                  pid:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  facility:
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                  facilityid:
                    type: string
                  totalbilled:
                    type: number
                  totalpaid:
                    type: number
                  totalbilled_updated_at:
                    type: string
                  totalpaid_updated_at:
                    type: string
                  custom_attributes:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  clearances_summary:
                    additionalProperties: true
                    type: object
                    required:
                      - statuses
                      - completed_count
                      - total
                      - all_complete
                    properties:
                      statuses:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              enum:
                                - PENDING
                            - type: string
                              enum:
                                - COMPLETED
                      completed_count:
                        type: number
                      total:
                        type: number
                      all_complete:
                        type: boolean
                  archived:
                    type: boolean
                  actor_oid:
                    type: string
        '400':
          description: Bad Request — the request failed validation or was rejected.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string

````

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