Class: Radiology::RadiologyController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Radiology::RadiologyController
- Defined in:
- app/controllers/radiology/radiology_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/radiology/radiology_controller.rb', line 5 def create patient_details, physician_details, radiology_orders = params.require %i[patient_details physician_details radiology_orders] radiology_orders = service.generate_msi(patient_details,physician_details, radiology_orders) render json: radiology_orders, status: :created end |
#index ⇒ Object
14 15 16 |
# File 'app/controllers/radiology/radiology_controller.rb', line 14 def index render json: service.get_previous_orders(params[:patient_id]) end |
#print_order_label ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/controllers/radiology/radiology_controller.rb', line 18 def print_order_label label = service.(params[:accession_number],params[:patient_national_id], params[:patient_name], params[:radio_order], params[:date_created]) send_data(label, type: 'application/label; charset=utf-8', stream: false, filename: "#{SecureRandom.hex(24)}.lbl", disposition: 'inline') end |
#service ⇒ Object
25 26 27 |
# File 'app/controllers/radiology/radiology_controller.rb', line 25 def service Radiology::RadiologyService end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/radiology/radiology_controller.rb', line 10 def show render json: service.get_radiology_orders(params[:id]) end |