Class: Renalware::Admin::PlaygroundsController
Defined Under Namespace
Classes: Chart, ChartForm
Instance Method Summary
collapse
#patient
Instance Method Details
#chart_params ⇒ Object
40
41
42
43
44
|
# File 'app/controllers/renalware/admin/playgrounds_controller.rb', line 40
def chart_params
return {} unless params.key?(:chart)
params.require(:chart).permit!
end
|
#pathology_chart_data ⇒ Object
Returns test json to display a chart of one obx code over time for a patient
11
12
13
14
15
16
|
# File 'app/controllers/renalware/admin/playgrounds_controller.rb', line 11
def pathology_chart_data
authorize User, :index?
form = ChartForm.new(chart_params)
chart = Chart.new(form)
render json: chart.json
end
|
#show ⇒ Object
5
6
7
8
|
# File 'app/controllers/renalware/admin/playgrounds_controller.rb', line 5
def show
authorize User, :index?
render locals: { form: ChartForm.new(obx_code: "CRE", period: "all") }
end
|