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

# Open an outpatient visit



## OpenAPI

````yaml /openapi-staff.yaml post /outpatient-visits
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:
    post:
      tags:
        - Staff outpatient visits
      summary: Open an outpatient visit
      operationId: createStaffOutpatientVisit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VisitCreateRequest'
      responses:
        '201':
          $ref: '#/components/responses/ObjectResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    VisitCreateRequest:
      type: object
      required:
        - patient_id
        - clinic_id
        - visit_purpose
      properties:
        patient_id:
          type: integer
        clinic_id:
          type: integer
        patient_coverage_id:
          type:
            - integer
            - 'null'
        visit_purpose:
          type: string
          enum:
            - consultation
            - pharmacy
            - diagnostics
    ObjectEnvelope:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
  responses:
    ObjectResponse:
      description: Resource returned.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ObjectEnvelope'
    ValidationError:
      description: Request validation or workflow transition failed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum staff token

````