Class: Renalware::HD::ProtocolsController

Inherits:
BaseController show all
Defined in:
app/controllers/renalware/hd/protocols_controller.rb

Overview

Responsible for rendering an HD Session Form PDF (aka Protocol) which has the patients past 3 sessions on it, and empty rows for their next three sessions.

Direct Known Subclasses

SessionForms::PdfRenderer::MyController

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#showObject

Note that although rendering an individual PDF for a patient here, we use PdfRender which can handles multiple patients, and hence it uses the index.pdf.slim view. The show view is not used.



13
14
15
16
17
18
19
# File 'app/controllers/renalware/hd/protocols_controller.rb', line 13

def show
  authorize Session, :show?
  respond_to do |format|
    format.html { render html: pdf_renderer.call }
    format.pdf { send_pdf_data_as_inline_file }
  end
end