Class: EmrOhspInterface::EmrLimsInterfaceController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/emr_ohsp_interface/emr_lims_interface_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



4
5
6
7
8
9
10
11
# File 'app/controllers/emr_ohsp_interface/emr_lims_interface_controller.rb', line 4

def create
  # lab_details = params.require %i[lab_details]
  # render json: "#{lab_details[0]['firstname']}"
  # render json:
  order_params_list, clinician_id = params.require %i[lab_details clinician_id]

  render json: service.create_lab_order(order_params_list, clinician_id)
end

#get_user_infoObject



17
18
19
# File 'app/controllers/emr_ohsp_interface/emr_lims_interface_controller.rb', line 17

def ()
  render json: service.get_user_details(params[:id])
end

#indexObject



13
14
15
# File 'app/controllers/emr_ohsp_interface/emr_lims_interface_controller.rb', line 13

def index
  render json: service.get_lims_test_results(params[:id],params[:patient_id])
end

#serviceObject



21
22
23
# File 'app/controllers/emr_ohsp_interface/emr_lims_interface_controller.rb', line 21

def service
  EmrOhspInterface::EmrLimsInterfaceService
end