You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: trackings_controller.rb
    path of file: ./repos/vets-api/app/controllers/v0
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module V0
  class TrackingsController < RxController
    # This index action supports various parameters described below, all are optional
    # This comment can be removed once documentation i
    
    def index
      resource = client.get_tracking_history_rx(params[:prescription_id])
      resource = resource.sort(params[:sort])
      resource = resource.paginate(**pagination_params)
      render json: resource.data,
             serializer: CollectionSerializer,
             each_serializer: TrackingSerializer,
             meta: resource.metadata
    end