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

# Update a clinic-visible patient



## OpenAPI

````yaml /openapi-staff.yaml patch /patients/{patient}
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:
  /patients/{patient}:
    patch:
      tags:
        - Staff patients
      summary: Update a clinic-visible patient
      operationId: updateStaffPatient
      parameters:
        - $ref: '#/components/parameters/PatientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/ObjectResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    PatientId:
      name: patient
      in: path
      required: true
      schema:
        type: integer
  schemas:
    PatientUpdateRequest:
      type: object
      description: Partial patient update. clinic_id is not accepted.
      properties:
        first_name:
          type: string
          maxLength: 100
        middle_name:
          type:
            - string
            - 'null'
          maxLength: 100
        last_name:
          type: string
          maxLength: 100
        sex:
          type: string
          enum:
            - female
            - male
            - intersex
            - unknown
        date_of_birth:
          type:
            - string
            - 'null'
          format: date
        identity_type:
          type:
            - string
            - 'null'
          maxLength: 50
        identity_number:
          type:
            - string
            - 'null'
          maxLength: 100
        phone:
          type: string
          maxLength: 50
        secondary_phone:
          type:
            - string
            - 'null'
          maxLength: 50
        email:
          type:
            - string
            - 'null'
          format: email
          maxLength: 255
        address:
          type:
            - string
            - 'null'
          maxLength: 500
        city:
          type:
            - string
            - 'null'
          maxLength: 100
        county:
          type:
            - string
            - 'null'
          maxLength: 100
        country:
          type:
            - string
            - 'null'
          maxLength: 100
        next_of_kin_name:
          type:
            - string
            - 'null'
          maxLength: 255
        next_of_kin_relationship:
          type:
            - string
            - 'null'
          maxLength: 100
        next_of_kin_phone:
          type:
            - string
            - 'null'
          maxLength: 50
        status:
          type: string
          enum:
            - active
            - inactive
            - deceased
    ObjectEnvelope:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
  responses:
    ObjectResponse:
      description: Resource returned.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ObjectEnvelope'
    NotFound:
      description: >-
        Resource is outside the authenticated staff clinic scope or does not
        exist.
    ValidationError:
      description: Request validation or workflow transition failed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum staff token

````