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

# Get Admission with Visits

> 
### Overview

This API returns an **IPD admission** of your workspace (same as [Get Admission](/api-reference/doc-tool/ipd-api/admissions/get-admission)) together with the **prescriptions of the visits** linked to the admission.

Each prescribed medication and injection gets a `prescribe_dose_id` (`<prescription id>-<medication id>`, with `-<index>` added for each tapering dose), so a dose can be referred to uniquely — for example when recording medicine administration.

Returns `400` with `Admission not found` when the admission does not exist in your workspace.



## OpenAPI

````yaml get /ipd/v1/service/admissions/{admission_id}/visits
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:
  /ipd/v1/service/admissions/{admission_id}/visits:
    get:
      tags:
        - IPD API
      summary: Get Admission with Visits
      description: >-

        ### Overview


        This API returns an **IPD admission** of your workspace (same as [Get
        Admission](/api-reference/doc-tool/ipd-api/admissions/get-admission))
        together with the **prescriptions of the visits** linked to the
        admission.


        Each prescribed medication and injection gets a `prescribe_dose_id`
        (`<prescription id>-<medication id>`, with `-<index>` added for each
        tapering dose), so a dose can be referred to uniquely — for example when
        recording medicine administration.


        Returns `400` with `Admission not found` when the admission does not
        exist in your workspace.
      operationId: GetIpdAdmissionVisits
      parameters:
        - name: auth
          in: header
          required: true
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
        - name: admission_id
          in: path
          description: Id of the IPD admission.
          required: true
          style: simple
          schema:
            type: string
          example: a1b2c3d4-5678-90ab-cdef-1234567890ab
      responses:
        '200':
          description: OK — the admission and its visits' prescriptions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      admission:
                        $ref: '#/components/schemas/IpdAdmission'
                      visits:
                        type: array
                        description: Prescriptions of the visits linked to the admission.
                        items:
                          type: object
                          additionalProperties: true
              example:
                success: true
                data:
                  admission:
                    id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                    ipid: IPD1043
                    stage: AD
                    status: UNDER_CARE
                  visits:
                    - id: rx-55501
                      tool:
                        medications:
                          - id: m1
                            name: Paracetamol 500mg Tablet
                            prescribe_dose_id: rx-55501-m1
        '400':
          description: >-
            Bad Request — the admission was not found or the visits could not be
            loaded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdServiceFailure'
              example:
                success: false
                error: Admission not found
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdServiceError'
      deprecated: false
components:
  schemas:
    IpdAdmission:
      title: IpdAdmission
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: Admission id.
        bid:
          type: string
          description: Workspace id.
        ipid:
          type: string
          description: Patient IPD case number.
        pid:
          type: string
          description: Id of the patient.
        stage:
          type: string
          enum:
            - IN
            - AD
            - DC
          description: 'Lifecycle stage: `IN` advised, `AD` admitted, `DC` discharged.'
        status:
          type: string
          description: >-
            Detailed status within the stage, for example `BED_ASSIGNED`,
            `UNDER_CARE` or `DISCHARGED`.
        admission_date:
          type: string
          description: Admission date-time as an ISO-8601 string.
        discharge_date:
          type: string
          description: Discharge date-time as an ISO-8601 string. Present once discharged.
        patient:
          type: object
          additionalProperties: true
          description: Patient details.
        attendee:
          type: object
          additionalProperties: true
          description: Attendee (relative) details.
        insurance:
          type: object
          additionalProperties: true
          description: Insurance details.
        procedures:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Planned procedures.
        doc:
          $ref: '#/components/schemas/IpdNamedRef'
        refer:
          $ref: '#/components/schemas/IpdNamedRef'
        department:
          $ref: '#/components/schemas/IpdNamedRef'
        category:
          $ref: '#/components/schemas/IpdNamedRef'
        facility:
          $ref: '#/components/schemas/IpdNamedRef'
        bed:
          type: string
          description: Bed of the admission (usually a bed id).
        bedDetails:
          $ref: '#/components/schemas/IpdBed'
        rateplan:
          type: object
          additionalProperties: true
          description: Rate plan with its inclusions.
        duration:
          type: object
          properties:
            value:
              type: number
            unit:
              type: string
          description: Expected length of stay.
        notes:
          type: string
          description: Admission notes.
        medico_legal_case:
          type: boolean
          description: Whether this is a medico-legal case.
        totalbilled:
          type: number
          description: Total billed so far.
        totalpaid:
          type: number
          description: Total paid so far.
        created_at:
          type: string
          description: Created date-time as an ISO-8601 string.
        updated_at:
          type: string
          description: Last-updated date-time as an ISO-8601 string.
    IpdServiceFailure:
      title: IpdServiceFailure
      type: object
      properties:
        success:
          type: boolean
          description: Always `false`.
        error:
          type: string
          description: Human-readable error message.
    IpdServiceError:
      title: IpdServiceError
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.
    IpdNamedRef:
      title: IpdNamedRef
      type: object
      properties:
        id:
          type: string
        name:
          type: string
    IpdBed:
      title: IpdBed
      type: object
      properties:
        id:
          type: string
          description: Bed id.
        name:
          type: string
          description: Display name of the bed.
        room:
          type: string
          description: Id of the room the bed belongs to. Absent when not set.
        updatedAt:
          type: string
          description: Last-updated date-time as an ISO-8601 string.

````

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