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

# Update Discharge Release Rules

> 
### Overview

This API saves the **discharge release rules** of your workspace. Send each rule's `id` with whether it is `enabled` and `mandatory`.

The saved list **replaces** your previous settings; rules you leave out go back to their defaults (enabled, not mandatory). Unknown rule ids are ignored, and the `discharge-summary` rule is always kept enabled. The response is the full, updated rule list.

Rule ids: `nursing`, `billing`, `pharmacy`, `lab`, `doctor`, `discharge-summary`.



## OpenAPI

````yaml put /ipd/v1/service/admissions/discharge-release-rules
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/discharge-release-rules:
    put:
      tags:
        - IPD API
      summary: Update Discharge Release Rules
      description: >-

        ### Overview


        This API saves the **discharge release rules** of your workspace. Send
        each rule's `id` with whether it is `enabled` and `mandatory`.


        The saved list **replaces** your previous settings; rules you leave out
        go back to their defaults (enabled, not mandatory). Unknown rule ids are
        ignored, and the `discharge-summary` rule is always kept enabled. The
        response is the full, updated rule list.


        Rule ids: `nursing`, `billing`, `pharmacy`, `lab`, `doctor`,
        `discharge-summary`.
      operationId: UpdateIpdDischargeReleaseRules
      parameters:
        - name: auth
          in: header
          required: true
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
      requestBody:
        description: The rule settings.
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - rules
              properties:
                rules:
                  type: array
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - id
                      - enabled
                      - mandatory
                    properties:
                      id:
                        type: string
                        enum:
                          - nursing
                          - billing
                          - pharmacy
                          - lab
                          - doctor
                          - discharge-summary
                        description: Id of the rule.
                      enabled:
                        type: boolean
                        description: Whether the rule applies to discharges.
                      mandatory:
                        type: boolean
                        description: Whether the rule must be cleared before discharge.
            example:
              rules:
                - id: billing
                  enabled: true
                  mandatory: true
                - id: lab
                  enabled: false
                  mandatory: false
      responses:
        '200':
          description: OK — the full, updated rule list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdDischargeReleaseRulesResponse'
        '400':
          description: >-
            Bad Request. Returns `{ message }` when the request body failed
            schema validation (for example a rule is missing `enabled` or
            `mandatory`; the `message` is currently empty), or `{ success:
            false, error }` when the rules could not be saved.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/IpdServiceFailure'
                  - $ref: '#/components/schemas/IpdServiceError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdServiceError'
      deprecated: false
components:
  schemas:
    IpdDischargeReleaseRulesResponse:
      title: IpdDischargeReleaseRulesResponse
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            rules:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    enum:
                      - nursing
                      - billing
                      - pharmacy
                      - lab
                      - doctor
                      - discharge-summary
                    description: Id of the rule.
                  name:
                    type: string
                    description: Display name of the rule.
                  description:
                    type: string
                    description: What the rule checks.
                  enabled:
                    type: boolean
                    description: Whether the rule applies to discharges.
                  mandatory:
                    type: boolean
                    description: Whether the rule must be cleared before discharge.
                  can_disable:
                    type: boolean
                    description: Present and `false` for rules that cannot be turned off.
    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.

````

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