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

# Register a patient



## OpenAPI

````yaml /openapi-staff.yaml post /patients
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:
    post:
      tags:
        - Staff patients
      summary: Register a patient
      operationId: registerPatient
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientCreateRequest'
      responses:
        '201':
          $ref: '#/components/responses/ObjectResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    PatientCreateRequest:
      type: object
      required:
        - clinic_id
        - first_name
        - last_name
        - sex
        - phone
      properties:
        clinic_id:
          type: integer
        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'
        identity_number:
          type:
            - string
            - 'null'
        phone:
          type: string
          maxLength: 50
        secondary_phone:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
          format: email
        address:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        county:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        next_of_kin_name:
          type:
            - string
            - 'null'
        next_of_kin_relationship:
          type:
            - string
            - 'null'
        next_of_kin_phone:
          type:
            - string
            - 'null'
        status:
          type:
            - string
            - 'null'
          enum:
            - active
            - inactive
            - deceased
            - null
    ObjectEnvelope:
      type: object
      properties:
        data:
          type: object
          additionalProperties: true
  responses:
    ObjectResponse:
      description: Resource returned.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ObjectEnvelope'
    Unauthenticated:
      description: Missing or invalid bearer token.
    Forbidden:
      description: Token lacks the required ability or staff policy permission.
    ValidationError:
      description: Request validation or workflow transition failed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum staff token

````