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

# Look up a laboratory worklist

> Returns active mapped tests for a dispatched specimen and instrument. Requires `laboratory:worklists:read`. Rate limited to 120 requests per minute per authenticated user and IP.



## OpenAPI

````yaml /openapi.yaml get /laboratory/integration/worklist
openapi: 3.1.0
info:
  title: HMIS API
  version: 1.0.0
  description: >-
    Versioned API for HMIS foundation resources and laboratory/radiology
    integrations. All operations use Laravel Sanctum bearer tokens with a
    dedicated ability per operation.
servers:
  - url: https://jaliprohmis.derrickmugabwa.dev/api/v1
    description: HMIS staging API
security:
  - bearerAuth: []
tags:
  - name: Foundation
    description: Authenticated HMIS context and reference data.
  - name: Laboratory integration
    description: Analyzer worklists and result ingestion.
  - name: Radiology integration
    description: PACS worklists and study ingestion.
paths:
  /laboratory/integration/worklist:
    get:
      tags:
        - Laboratory integration
      summary: Look up a laboratory worklist
      description: >-
        Returns active mapped tests for a dispatched specimen and instrument.
        Requires `laboratory:worklists:read`. Rate limited to 120 requests per
        minute per authenticated user and IP.
      operationId: getLaboratoryWorklist
      parameters:
        - name: instrument_code
          in: query
          required: true
          schema:
            type: string
            maxLength: 64
          example: HEM_01
        - name: specimen_number
          in: query
          required: true
          schema:
            type: string
            maxLength: 32
          example: SP000001
      responses:
        '200':
          description: Worklist available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaboratoryWorklistAvailableResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Instrument or specimen worklist unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorklistUnavailableResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    LaboratoryWorklistAvailableResponse:
      type: object
      properties:
        status:
          const: available
        worklist:
          $ref: '#/components/schemas/LaboratoryWorklist'
    WorklistUnavailableResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - not_available
            - instrument_unavailable
            - pacs_unavailable
        worklist:
          type: object
          additionalProperties: true
    LaboratoryWorklist:
      type: object
      properties:
        instrument_code:
          type: string
        specimen:
          type: object
          additionalProperties: true
        patient:
          $ref: '#/components/schemas/WorklistPatient'
        requisitions:
          type: array
          items:
            type: object
            additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: Unauthenticated.
      additionalProperties: true
    ValidationErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      additionalProperties: true
    WorklistPatient:
      type: object
      properties:
        identifier:
          type: string
        name:
          type: string
        sex:
          type:
            - string
            - 'null'
        date_of_birth:
          type:
            - string
            - 'null'
          format: date
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Bearer token is valid but lacks the required ability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    RateLimited:
      description: >-
        Integration endpoints are limited to 120 requests per minute per
        authenticated user and IP.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum personal access token
      description: >-
        Paste a Sanctum personal access token generated by a HMIS super
        administrator. Use only a token with the ability required by the
        selected operation.

````