Class: Renalware::Admin::PlaygroundsController

Inherits:
BaseController show all
Defined in:
app/controllers/renalware/admin/playgrounds_controller.rb

Defined Under Namespace

Classes: Chart, ChartForm

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#chart_paramsObject



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_dataObject

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

#showObject



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