pophealth/popHealth — Issue #15: NoMethodError in Patients#manage
Author: kclaes
Created: 2012-03-06 09:33:54+00:00
State: open

Error when clicking "manage patients" in the manage->providers screen (any patient)

---8<---8<---8<---8<---8<---8<---8<---8<---8<---
NoMethodError in Patients#manage

Showing C:/_work/pophealth/popHealth/app/views/patients/_provider_patients.html.erb where line #16 raised:

undefined method `by_provider' for #
Extracted source (around line #16):

13:	<%= record.medical_record_number %>
14:	<%= record.last %>
15:	<%= record.first %>
16:	<% perfs = record.provider_performances.by_provider(@provider) %>
17:
18:	<% perfs.each do |perf| %>
19:	<%= text_field_tag "records[#{record.id}][start_date]", Time.at(perf.start_date).strftime("%m/%d/%y") if perf.start_date %>
Trace of template inclusion: app/views/patients/manage.html.erb

Rails.root: C:/_work/pophealth/popHealth

Application Trace | Framework Trace | Full Trace
app/views/patients/_provider_patients.html.erb:16:in `block (2 levels) in _app_views_patients__provider_patients_html_erb___561547690_29424816'
app/views/patients/_provider_patients.html.erb:11:in `block in _app_views_patients__provider_patients_html_erb___561547690_29424816'
app/views/patients/_provider_patients.html.erb:1:in `_app_views_patients__provider_patients_html_erb___561547690_29424816'
app/views/patients/manage.html.erb:21:in `block in _app_views_patients_manage_html_erb__552378752_29550084'
app/views/patients/manage.html.erb:17:in `_app_views_patients_manage_html_erb__552378752_29550084'
Request

Parameters:

{"provider_id"=>"4f54d732a4f3d31fd800002e"}
Show session dump

_csrf_token: "loMKR9N0E5Wz2DI4zL5Rfc3bcYbtsiVElt9qofehvmQ="
session_id: "4dbc1e81c977896638e277003c7edd90"
warden.user.user.key: ["User", [BSON::ObjectId('4f4e2e6aa4f3d31f88000006')], "$2a$10$Dj.TXkL1Bz0qnMZy.agknO"]
Show env dump

GATEWAY_INTERFACE: "CGI/1.1"
HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_CHARSET: "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
HTTP_ACCEPT_ENCODING: "gzip,deflate,sdch"
HTTP_ACCEPT_LANGUAGE: "en-US,en;q=0.8"
REMOTE_ADDR: "127.0.0.1"
REMOTE_HOST: "localhost"
SERVER_NAME: "localhost"
SERVER_PROTOCOL: "HTTP/1.1"
Response

Headers:

None
---8<---8<---8<---8<---8<---8<---8<---8<---8<---