Class: Lab::SpecimenTypesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lab/specimen_types_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/lab/specimen_types_controller.rb', line 5

def index
  filters = params.permit(%w[name test_type])

  specimen_types = ConceptsService.specimen_types(name: filters['name'],
                                                  test_type: filters['test_type'])
                                  .as_json(only: %w[concept_id name])

  render json: specimen_types
end