> ## Documentation Index
> Fetch the complete documentation index at: https://hmis-docs.derrickmugabwa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create visit clinical orders



## OpenAPI

````yaml /openapi-staff.yaml post /outpatient-visits/{outpatientVisit}/orders
openapi: 3.1.0
info:
  title: HMIS Staff Workflow API
  version: 1.0.0
  description: >-
    Clinic-scoped patient registration, appointments, outpatient visits, and
    clinical workspace operations.
servers:
  - url: https://jaliprohmis.derrickmugabwa.dev/api/v1
    description: HMIS staging API
security:
  - bearerAuth: []
tags:
  - name: Staff patients
  - name: Staff appointments
  - name: Staff outpatient visits
  - name: Staff clinical workspace
paths:
  /outpatient-visits/{outpatientVisit}/orders:
    post:
      tags:
        - Staff clinical workspace
      summary: Create visit clinical orders
      operationId: createStaffClinicalOrders
      parameters:
        - $ref: '#/components/parameters/VisitId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClinicalOrdersRequest'
      responses:
        '201':
          $ref: '#/components/responses/CollectionResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    VisitId:
      name: outpatientVisit
      in: path
      required: true
      schema:
        type: integer
  schemas:
    ClinicalOrdersRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          minItems: 1
          maxItems: 50
          items:
            type: object
            required:
              - service_id
            properties:
              service_id:
                type: integer
              quantity:
                type:
                  - number
                  - 'null'
                exclusiveMinimum: 0
                maximum: 999
              order_notes:
                type:
                  - string
                  - 'null'
                maxLength: 1000
    CollectionEnvelope:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    CollectionResponse:
      description: Resource collection returned.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CollectionEnvelope'
    ValidationError:
      description: Request validation or workflow transition failed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum staff token

````