#controller
  def index
    @ordered_medications = @visit.pds_prescriptions.ordered_medications.order(:label)
    @prn_medications = @visit.pds_prescriptions.prn.order('start_datetime DESC')
    #raise params[:print].inspect
    #raise get_report_model(params[:print] == 'active').inspect
    report_model = get_report_model(params[:print] == 'active')
    respond_with :report_model => report_model, :visit => @visit, :print => params[:print]
  end

#spec
  it "get_report_model should hide inactive meds on request" do
    controller.should_receive(:get_report_model).with(false)
    get 'index', :visit_id => @visit.id
  end