renalware-core 2.0.0.pre.rc13 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/renalware/base/_variables.scss +3 -3
  3. data/app/assets/stylesheets/renalware/modules/_clinical.scss +107 -4
  4. data/app/assets/stylesheets/renalware/modules/_patients.scss +0 -77
  5. data/app/assets/stylesheets/renalware/partials/_layout.scss +67 -7
  6. data/app/assets/stylesheets/renalware/partials/_navigation.scss +2 -7
  7. data/app/assets/stylesheets/renalware/partials/_tables.scss +1 -1
  8. data/app/controllers/renalware/base_controller.rb +5 -0
  9. data/app/controllers/renalware/clinics/visits_controller.rb +1 -1
  10. data/app/controllers/renalware/concerns/pdf_renderable.rb +2 -1
  11. data/app/controllers/renalware/devise/sessions_controller.rb +5 -0
  12. data/app/controllers/renalware/letters/pdf_letter_cache_controller.rb +13 -0
  13. data/app/controllers/renalware/pd/regimes_controller.rb +1 -1
  14. data/app/controllers/renalware/renal/aki_alerts_controller.rb +20 -3
  15. data/app/controllers/renalware/research/studies_controller.rb +3 -1
  16. data/app/controllers/renalware/session_timeout_controller.rb +1 -1
  17. data/app/models/renalware/letters/html_renderer.rb +2 -1
  18. data/app/models/renalware/letters/pdf_letter_cache.rb +4 -1
  19. data/app/models/renalware/letters/pdf_renderer.rb +2 -1
  20. data/app/models/renalware/pathology/create_observations_grouped_by_date_table.rb +0 -3
  21. data/app/models/renalware/pathology/observations_grouped_by_date_query.rb +7 -1
  22. data/app/models/renalware/pd/apd_regime.rb +6 -0
  23. data/app/models/renalware/renal/aki_alert.rb +1 -0
  24. data/app/models/renalware/renal/aki_alert_query.rb +32 -0
  25. data/app/models/renalware/renal/aki_alert_search_form.rb +31 -0
  26. data/app/models/renalware/system/event.rb +12 -0
  27. data/app/models/renalware/system/user_feedback.rb +3 -1
  28. data/app/models/renalware/system/visit.rb +11 -0
  29. data/app/presenters/renalware/events/summary_part.rb +3 -1
  30. data/app/presenters/renalware/letters/summary_part.rb +1 -1
  31. data/app/presenters/renalware/mdm_presenter.rb +4 -1
  32. data/app/presenters/renalware/medications/summary_part.rb +2 -0
  33. data/app/presenters/renalware/problems/summary_part.rb +4 -2
  34. data/app/presenters/renalware/summary_part.rb +4 -0
  35. data/app/views/renalware/accesses/procedures/_list.html.slim +7 -5
  36. data/app/views/renalware/accesses/profiles/_list.html.slim +5 -5
  37. data/app/views/renalware/admin/cache/show.html.slim +26 -2
  38. data/app/views/renalware/devise/sessions/_warning.html.slim +7 -0
  39. data/app/views/renalware/devise/sessions/new.html.slim +15 -21
  40. data/app/views/renalware/events/events/_summary_part.html.slim +1 -1
  41. data/app/views/renalware/events/events/cell/_investigation.html.slim +0 -2
  42. data/app/views/renalware/events/events/toggled_cell/_biopsy.html.slim +1 -1
  43. data/app/views/renalware/events/events/toggled_cell/_investigation.html.slim +1 -1
  44. data/app/views/renalware/events/events/toggled_cell/_simple.html.slim +1 -1
  45. data/app/views/renalware/events/events/toggled_cell/_swab.html.slim +1 -1
  46. data/app/views/renalware/hd/cannulation_types/_form.html.slim +7 -10
  47. data/app/views/renalware/hd/cannulation_types/edit.html.slim +2 -1
  48. data/app/views/renalware/hd/cannulation_types/index.html.slim +4 -3
  49. data/app/views/renalware/hd/cannulation_types/new.html.slim +2 -1
  50. data/app/views/renalware/hd/dialysers/_form.html.slim +8 -11
  51. data/app/views/renalware/hd/dialysers/edit.html.slim +2 -1
  52. data/app/views/renalware/hd/dialysers/index.html.slim +4 -3
  53. data/app/views/renalware/hd/dialysers/new.html.slim +2 -1
  54. data/app/views/renalware/layouts/_non_patient.html.slim +14 -13
  55. data/app/views/renalware/layouts/_patient.html.slim +5 -5
  56. data/app/views/renalware/letters/_summary_part.html.slim +1 -1
  57. data/app/views/renalware/letters/letters/show.html.slim +16 -15
  58. data/app/views/renalware/medications/_summary_part.html.slim +18 -17
  59. data/app/views/renalware/modalities/reasons/index.html.slim +1 -3
  60. data/app/views/renalware/navigation/_footer.html.slim +2 -2
  61. data/app/views/renalware/navigation/_help_items.html.slim +1 -0
  62. data/app/views/renalware/navigation/_more_help_items.html.slim +1 -0
  63. data/app/views/renalware/navigation/_user.html.slim +4 -0
  64. data/app/views/renalware/pathology/requests/requests/index.html.slim +40 -42
  65. data/app/views/renalware/pathology/requests/rules/index.html.slim +15 -18
  66. data/app/views/renalware/patients/_side_menu.html.slim +0 -1
  67. data/app/views/renalware/patients/alerts/_alert.html.slim +7 -7
  68. data/app/views/renalware/patients/alerts/_list.html.slim +1 -3
  69. data/app/views/renalware/patients/alerts/create.js.erb +1 -1
  70. data/app/views/renalware/patients/alerts/destroy.js.erb +1 -1
  71. data/app/views/renalware/patients/primary_care_physicians/_form.html.slim +22 -25
  72. data/app/views/renalware/patients/primary_care_physicians/edit.html.slim +2 -1
  73. data/app/views/renalware/patients/primary_care_physicians/index.html.slim +4 -3
  74. data/app/views/renalware/patients/primary_care_physicians/new.html.slim +2 -1
  75. data/app/views/renalware/patients/side_menu/_general.html.slim +1 -1
  76. data/app/views/renalware/pd/_apd_regimes.html.slim +4 -38
  77. data/app/views/renalware/pd/_capd_regimes.html.slim +4 -45
  78. data/app/views/renalware/pd/_regimes.html.slim +32 -0
  79. data/app/views/renalware/pd/assessments/_form.html.slim +8 -5
  80. data/app/views/renalware/pd/regimes/_apd_fields.html.slim +1 -0
  81. data/app/views/renalware/pd/regimes/_apd_regime_show.html.slim +2 -0
  82. data/app/views/renalware/pd/regimes/_current_apd_regime.html.slim +3 -0
  83. data/app/views/renalware/problems/problems/_summary_part.html.slim +1 -1
  84. data/app/views/renalware/renal/aki_alerts/_filters.html.slim +25 -0
  85. data/app/views/renalware/renal/aki_alerts/index.html.slim +18 -14
  86. data/app/views/renalware/research/_alert.html.slim +6 -0
  87. data/app/views/renalware/research/_alerts.html.slim +6 -0
  88. data/app/views/renalware/research/studies/index.html.slim +2 -0
  89. data/app/views/renalware/system/email_templates/index.html.slim +7 -8
  90. data/app/views/renalware/system/user_feedback/new.html.slim +3 -7
  91. data/app/views/renalware/transplants/mdm/_pathology_cmvdna.html.slim +0 -1
  92. data/app/views/renalware/virology/vaccinations/_toggled_cell.html.slim +1 -1
  93. data/config/initializers/ahoy.rb +14 -0
  94. data/config/locales/renalware/events/investigation.en.yml +8 -0
  95. data/config/locales/renalware/patients/side_menu.en.yml +1 -1
  96. data/config/routes.rb +1 -0
  97. data/db/migrate/20180307191650_add_dwell_time_to_pd_regime.rb +5 -0
  98. data/db/migrate/20180307223111_create_system_visits_and_events.rb +44 -0
  99. data/db/migrate/20180309140316_add_unique_constraint_to_obr_requestor.rb +5 -0
  100. data/db/migrate/20180311071146_update_patient_summaries_to_version6.rb +5 -0
  101. data/db/views/patient_summaries_v06.sql +16 -0
  102. data/lib/renalware/configuration.rb +3 -0
  103. data/lib/renalware/engine.rb +1 -1
  104. data/lib/renalware/version.rb +1 -1
  105. data/spec/factories/pathology/observation_requests.rb +3 -1
  106. metadata +34 -8
  107. data/app/assets/stylesheets/renalware/patient_pages.scss +0 -43
  108. data/app/views/renalware/hd/cannulation_types/_header.html.slim +0 -5
  109. data/app/views/renalware/hd/dialysers/_header.html.slim +0 -5
  110. data/app/views/renalware/patients/primary_care_physicians/_header.html.slim +0 -5
@@ -1,20 +1,17 @@
1
- .row
2
- h1 Pathology Request Form Algorithm
1
+ = within_admin_layout(title: "Pathology Request Form Algorithm") do
2
+ table
3
+ thead
4
+ tr
5
+ th Request Description
6
+ - clinics.each do |clinic|
7
+ th = clinic.name
3
8
 
4
- .row
5
- table
6
- thead
9
+ tbody
10
+ - rules_table.rows.each do |row|
7
11
  tr
8
- th Request Description
9
- - clinics.each do |clinic|
10
- th = clinic.name
11
-
12
- tbody
13
- - rules_table.rows.each do |row|
14
- tr
15
- td = row.request_description.name
16
- - row.columns.each do |column|
17
- td data-clinic="#{column.clinic.id}" data-request="#{row.request_description.id}"
18
- ul
19
- - column.rule_sets.each do |rule_set|
20
- li = rule_set.to_s
12
+ td = row.request_description.name
13
+ - row.columns.each do |column|
14
+ td data-clinic="#{column.clinic.id}" data-request="#{row.request_description.id}"
15
+ ul
16
+ - column.rule_sets.each do |rule_set|
17
+ li = rule_set.to_s
@@ -5,4 +5,3 @@ ul.side-nav
5
5
  = render "renalware/patients/side_menu/transplants", patient: patient
6
6
  = render "renalware/patients/side_menu/actions", patient: patient
7
7
  = render "renalware/patients/side_menu/site_specific_actions", patient: patient
8
- br
@@ -1,10 +1,10 @@
1
- tr.alerts--alert(class=("urgent" if alert.urgent) id="alert-#{alert.id}")
2
- td.icon
3
- td.notes
4
- span(title=alert.notes)= alert.notes
5
- td.author= alert.created_by.username
6
- td.col-width-date= l(alert.created_at.to_date)
7
- td.actions
1
+ li.patient-alert(class=("urgent" if alert.urgent) id="alert-#{alert.id}")
2
+ i.fa.fa-warning
3
+ span.title Alert:
4
+ span.body= alert.notes
5
+ span.author= alert.created_by.username
6
+ span.date= l(alert.created_at.to_date)
7
+ span.actions
8
8
  = link_to(patient_alert_path(alert.patient, alert),
9
9
  remote: true,
10
10
  method: :delete,
@@ -1,3 +1 @@
1
- table.alerts
2
- tbody
3
- = render patient.alerts
1
+ = render patient.alerts
@@ -1,3 +1,3 @@
1
1
  <%= refresh(".flash-message", partial: "renalware/shared/flash_messages", locals: local_assigns) %>
2
- $(".alerts").append("<%= j(render alert, format: :html) %>");
2
+ $(".patient-alerts ul").append("<%= j(render alert, format: :html) %>");
3
3
  $("#create-alert-modal").foundation('reveal', 'close');
@@ -1,2 +1,2 @@
1
1
  // Remove the deleted alert
2
- $("#alert-<%= alert.id %>", ".alerts").fadeOut(300, function(){ $(this).remove();})
2
+ $("#alert-<%= alert.id %>", ".patient-alerts").fadeOut(300, function(){ $(this).remove();})
@@ -1,30 +1,27 @@
1
- .row
2
- = render "header"
3
- = render "renalware/shared/errors", model: @primary_care_physician
1
+ = render "renalware/shared/errors", model: @primary_care_physician
4
2
 
5
- .row
6
- .large-6.columns
7
- = simple_form_for @primary_care_physician, html: { autocomplete: "off" } do |f|
8
- = f.input :name, placeholder: "e.g. SMITH J"
9
- = f.input :telephone
10
- = f.input :code
11
- = f.input :practitioner_type, collection: ["GP", "Other"]
12
- = label_tag "patients_primary_care_physician[practice_ids]", "Practices"
13
- = select_tag "patients_primary_care_physician[practice_ids]",
14
- practices_options_for_select(f.object),
15
- { include_hidden: false, multiple: true }
3
+ .large-6.columns
4
+ = simple_form_for @primary_care_physician, html: { autocomplete: "off" } do |f|
5
+ = f.input :name, placeholder: "e.g. SMITH J"
6
+ = f.input :telephone
7
+ = f.input :code
8
+ = f.input :practitioner_type, collection: ["GP", "Other"]
9
+ = label_tag "patients_primary_care_physician[practice_ids]", "Practices"
10
+ = select_tag "patients_primary_care_physician[practice_ids]",
11
+ practices_options_for_select(f.object),
12
+ { include_hidden: false, multiple: true }
16
13
 
17
- hr
14
+ hr
18
15
 
19
- a#address-form-toggle href="#address-form" class="button tiny" Alternative address
16
+ a#address-form-toggle href="#address-form" class="button tiny" Alternative address
20
17
 
21
- .row
22
- .large-12.columns
23
- fieldset#address-form style="display:none"
24
- = f.simple_fields_for @alternative_address do |a|
25
- = a.input :id, as: :hidden
26
- = render "renalware/addresses/form", a: a
18
+ .row
19
+ .large-12.columns
20
+ fieldset#address-form style="display:none"
21
+ = f.simple_fields_for @alternative_address do |a|
22
+ = a.input :id, as: :hidden
23
+ = render "renalware/addresses/form", a: a
27
24
 
28
- = f.button :submit
29
- span= " or "
30
- = link_to "cancel", patients_primary_care_physicians_path
25
+ = f.button :submit
26
+ span= " or "
27
+ = link_to "cancel", patients_primary_care_physicians_path
@@ -1 +1,2 @@
1
- = render "form"
1
+ = within_admin_layout(title: "Edit Primary Care Physician") do
2
+ = render "form"
@@ -1,7 +1,8 @@
1
- .row
2
- = render "header"
1
+ = within_admin_layout(title: "Primary Care Physicians") do
2
+ dl.sub-nav
3
+ dd= link_to "List", patients_primary_care_physicians_path
4
+ dd= link_to "Add Primary Care Physician", new_patients_primary_care_physician_path
3
5
 
4
- .row
5
6
  table.primary-care-physicians
6
7
  thead
7
8
  tr
@@ -1 +1,2 @@
1
- = render "form"
1
+ = within_admin_layout(title: "New Primary Care Physician") do
2
+ = render "form"
@@ -54,7 +54,7 @@ li.heading= t(".heading")
54
54
  path: patient_letters_letters_path(patient),
55
55
  active_when_controller_matches: %r{renalware/letters((?!\/contacts))}
56
56
 
57
- = patient_menu_item title: t(".access_profiles", count: summary.access_profiles_count),
57
+ = patient_menu_item title: t(".access_profiles"),
58
58
  path: patient_accesses_dashboard_path(patient),
59
59
  active_when_controller_matches: %r{renalware/accesses}
60
60
 
@@ -1,38 +1,4 @@
1
- table.apd-regimes
2
- thead
3
- tr
4
- th.col-width-9
5
- th.col-width-date Started on
6
- th.col-width-date Ended on
7
- th.col-width-13 Treatment
8
- th= t("glucose_volume_low_strength", scope: "renalware.pd.regimes")
9
- th= t("glucose_volume_medium_strength", scope: "renalware.pd.regimes")
10
- th= t("glucose_volume_high_strength", scope: "renalware.pd.regimes")
11
- th.column-6-date Updated on
12
-
13
- tbody
14
- - apd_regimes.each do |r|
15
- tr valign="top" data-regime-id=r.id
16
- td
17
- - if r.current? && !current_user.has_role?(:read_only)
18
- = link_to "Update",
19
- edit_patient_pd_regime_path(patient, r.id),
20
- class: "update-pd-regime"
21
- = pipe_separator
22
- = link_to "View",
23
- patient_pd_regime_path(patient, r.id),
24
- class: "view-pd-regime"
25
- td valign="top"
26
- = l r.start_date
27
- td valign="top"
28
- = default_for_blank_date(r.end_date, "Pending")
29
- td valign="top"
30
- = r.treatment
31
- td valign="top"
32
- = "#{default_daily_glucose_average(r.glucose_volume_low_strength)} ml"
33
- td valign="top"
34
- = "#{default_daily_glucose_average(r.glucose_volume_medium_strength)} ml"
35
- td valign="top"
36
- = "#{default_daily_glucose_average(r.glucose_volume_high_strength)} ml"
37
- td
38
- = r.updated_at.to_date
1
+ = render "renalware/pd/regimes",
2
+ regimes: apd_regimes,
3
+ patient: patient,
4
+ table_class: "apd-regimes"
@@ -1,45 +1,4 @@
1
- table.capd-regimes
2
- thead
3
- tr
4
- th.col-width-9
5
- th.col-width-date Started on
6
- th.col-width-date Ended on
7
- th.col-width-13 Treatment
8
- th= t("glucose_volume_low_strength", scope: "renalware.pd.regimes")
9
- th= t("glucose_volume_medium_strength", scope: "renalware.pd.regimes")
10
- th= t("glucose_volume_high_strength", scope: "renalware.pd.regimes")
11
- th.column-width-date Updated on
12
-
13
- tbody
14
- - capd_regimes.each do |r|
15
- tr valign="top" data-regime-id=r.id
16
- td
17
- - if r.current? && !current_user.has_role?(:read_only)
18
- = link_to "Update",
19
- edit_patient_pd_regime_path(patient, r.id),
20
- class: "update-pd-regime"
21
- = pipe_separator
22
- = link_to "View",
23
- patient_pd_regime_path(patient, r.id),
24
- class: "view-pd-regime"
25
-
26
- td valign="top"
27
- = l r.start_date
28
-
29
- td valign="top"
30
- = default_for_blank_date(r.end_date, "Pending")
31
-
32
- td valign="top"
33
- = r.treatment
34
-
35
- td valign="top"
36
- = "#{default_daily_glucose_average(r.glucose_volume_low_strength)} ml"
37
-
38
- td valign="top"
39
- = "#{default_daily_glucose_average(r.glucose_volume_medium_strength)} ml"
40
-
41
- td valign="top"
42
- = "#{default_daily_glucose_average(r.glucose_volume_high_strength)} ml"
43
-
44
- td
45
- = r.updated_at.to_date
1
+ = render "renalware/pd/regimes",
2
+ regimes: capd_regimes,
3
+ patient: patient,
4
+ table_class: "capd-regimes"
@@ -0,0 +1,32 @@
1
+ table(class=table_class)
2
+ thead
3
+ tr
4
+ th.col-width-small
5
+ th.col-width-date Started on
6
+ th.col-width-date Ended on
7
+ th Treatment
8
+ th.col-width-small= t("glucose_volume_low_strength", scope: "renalware.pd.regimes")
9
+ th.col-width-small= t("glucose_volume_medium_strength", scope: "renalware.pd.regimes")
10
+ th.col-width-small= t("glucose_volume_high_strength", scope: "renalware.pd.regimes")
11
+ th.col-width-date Updated on
12
+
13
+ tbody
14
+ - regimes.each do |r|
15
+ tr(data-regime-id=r.id)
16
+ td
17
+ / TODO: Use a policy
18
+ - if r.current? && !current_user.has_role?(:read_only)
19
+ = link_to "Update",
20
+ edit_patient_pd_regime_path(patient, r.id),
21
+ class: "update-pd-regime"
22
+ = pipe_separator
23
+ = link_to "View",
24
+ patient_pd_regime_path(patient, r.id),
25
+ class: "view-pd-regime"
26
+ td= l r.start_date
27
+ td= default_for_blank_date(r.end_date, "Pending")
28
+ td= r.treatment
29
+ td= "#{default_daily_glucose_average(r.glucose_volume_low_strength)} ml"
30
+ td= "#{default_daily_glucose_average(r.glucose_volume_medium_strength)} ml"
31
+ td= "#{default_daily_glucose_average(r.glucose_volume_high_strength)} ml"
32
+ td= l(r.updated_at.to_date)
@@ -14,7 +14,7 @@
14
14
  = fdoc.input :had_home_visit, as: :inline_radio_buttons, wrapper: :horizontal_medium
15
15
  = fdoc.input :home_visit_on, as: :date_picker, wrapper: :horizontal_datepicker
16
16
  = fdoc.input :housing_type, as: :inline_radio_buttons, wrapper: :horizontal_medium
17
- = fdoc.input :occupant_notes, as: :text, input_html: { rows: 5 }
17
+ = fdoc.input :occupant_notes, as: :text, input_html: { rows: 5 }, wrapper: :horizontal_large
18
18
  = fdoc.input :exchange_area, wrapper: :horizontal_medium
19
19
  = fdoc.input :handwashing, wrapper: :horizontal_medium
20
20
  = fdoc.input :fluid_storage, wrapper: :horizontal_medium
@@ -23,7 +23,7 @@
23
23
  collection: Renalware::PD::DeliveryIntervalPresenter.dropdown_options,
24
24
  wrapper: :horizontal_small
25
25
  = fdoc.input :needs_rehousing, as: :inline_radio_buttons, wrapper: :horizontal_medium
26
- = fdoc.input :rehousing_notes, as: :text, input_html: { rows: 5 }
26
+ = fdoc.input :rehousing_notes, as: :text, input_html: { rows: 5 }, wrapper: :horizontal_large
27
27
  = fdoc.input :social_worker, as: :inline_radio_buttons, wrapper: :horizontal_medium
28
28
  = fdoc.input :seen_video, as: :inline_radio_buttons, wrapper: :horizontal_medium
29
29
  = fdoc.input :can_open_bag, as: :inline_radio_buttons, wrapper: :horizontal_medium
@@ -33,7 +33,7 @@
33
33
  = fdoc.input :dexterity, wrapper: :horizontal_medium
34
34
  = fdoc.input :motivation, wrapper: :horizontal_medium
35
35
  = fdoc.input :language, wrapper: :horizontal_medium
36
- = fdoc.input :other_notes, as: :text, input_html: { rows: 5 }
36
+ = fdoc.input :other_notes, as: :text, input_html: { rows: 5 }, wrapper: :horizontal_large
37
37
  = fdoc.input :suitable_for_pd, as: :inline_radio_buttons, wrapper: :horizontal_medium
38
38
  = fdoc.input :system_choice, as: :inline_radio_buttons, wrapper: :horizontal_medium
39
39
  = fdoc.input :insertion_discussed, as: :inline_radio_buttons, wrapper: :horizontal_medium
@@ -42,8 +42,11 @@
42
42
  = fdoc.input :access_clinic_on, as: :date_picker, wrapper: :horizontal_datepicker
43
43
  = fdoc.input :abdo_assessor, wrapper: :horizontal_medium
44
44
  = fdoc.input :bowel_disease, as: :inline_radio_buttons, wrapper: :horizontal_medium
45
- = fdoc.input :bowel_disease_notes, as: :text, input_html: { rows: 5 }
46
- = fdoc.input :added_comments, as: :text, input_html: { rows: 5 }
45
+ = fdoc.input :bowel_disease_notes,
46
+ as: :text,
47
+ input_html: { rows: 5 },
48
+ wrapper: :horizontal_large
49
+ = fdoc.input :added_comments, as: :text, input_html: { rows: 5 }, wrapper: :horizontal_large
47
50
 
48
51
  = f.submit "Save", class: "button"
49
52
  span= " or "
@@ -22,6 +22,7 @@
22
22
 
23
23
  = field_set_tag t(".fieldset_titles.additional_info") do
24
24
  = f.input :fill_volume, wrapper: :horizontal_small
25
+ = f.input :dwell_time, wrapper: :horizontal_small
25
26
  = f.input :therapy_time,
26
27
  collection: therapy_times,
27
28
  include_blank: t("collection.blank_option"),
@@ -14,6 +14,8 @@
14
14
  dd = "#{regime.last_fill_volume} ml"
15
15
  dt Add'l man exchange volume:
16
16
  dd = "#{regime.additional_manual_exchange_volume} ml"
17
+ dt Dwell time:
18
+ dd= regime.dwell_time
17
19
  dt Therapy time:
18
20
  dd= Renalware::Duration.from_minutes(regime.therapy_time).to_s
19
21
  dt Cycles per session:
@@ -17,6 +17,9 @@ dl.columns.medium-6.dl-horizontal.xlarge.apd-regime-details
17
17
  dt Add'l man exchange volume:
18
18
  dd = "#{regime.additional_manual_exchange_volume} ml"
19
19
 
20
+ dt Dwell time:
21
+ dd= regime.dwell_time
22
+
20
23
  dt Therapy time:
21
24
  dd= Renalware::Duration.from_minutes(regime.therapy_time).to_s
22
25
 
@@ -9,7 +9,7 @@
9
9
  / renalware/problems/problems/...86-6-20180218160613719105/1ff2cfc1505d571ac18a3d1d3708ebb4
10
10
  /
11
11
  / Note you can get the partial digest value using `cache_fragment_name[0]`
12
- - cache(summary_part) do
12
+ - cache_if(summary_part.cache?, summary_part) do
13
13
  .summary-part--problems
14
14
  article
15
15
  header
@@ -0,0 +1,25 @@
1
+ .search-form.filters
2
+ = simple_form_for form,
3
+ as: :q,
4
+ url: renal_aki_alerts_path,
5
+ method: :get do |f|
6
+
7
+ .row
8
+ .columns.medium-2.large-3
9
+ = f.input :term
10
+ .columns.medium-1.large-1
11
+ = f.input :on_hotlist,
12
+ collection: [["Yes",true],["No",false]]
13
+ .columns.medium-2.large-2
14
+ = f.input :action,
15
+ collection: Renalware::Renal::AKIAlertAction.pluck(:name, :id)
16
+ .columns.medium-3.large-2
17
+ = f.input :hospital_unit_id,
18
+ collection: Renalware::Hospitals::Unit.pluck(:name, :id)
19
+ .columns.medium-2.large-2
20
+ = f.input :hospital_ward_id,
21
+ collection: Renalware::Hospitals::Ward.pluck(:name, :id)
22
+ .columns.medium-2.large-2.actions.end
23
+ = f.submit "Filter", class: "button"
24
+ span= " or "
25
+ = link_to t("helpers.reset"), renal_aki_alerts_path
@@ -1,36 +1,40 @@
1
1
  = within_admin_layout(title: "AKI Alerts") do
2
+ = render "filters", form: form
2
3
  table.aki-alerts
3
4
  thead
4
5
  th
5
- th Patient
6
- th.col-width-nhs-no NHS No.
7
- th.col-width-reference Hosp. No.
6
+ th.col-width-large Patient
7
+ /th.col-width-nhs-no NHS No.
8
+ th.col-width-reference-no Hosp. No.
8
9
  th.col-width-tiny Sex
9
10
  th.col-width-tiny Age
10
- th.col-width-date Born on
11
- th Action
12
- th Ward
13
- th Hotlist
14
- th Max CRE
15
- th.col-width-date CRE Date
16
- th Max AKI
17
- th.col-width-date AKI Date
11
+ /th.col-width-date= sort_link(search, :patient_born_on, "Born on")
12
+ th= sort_link(search, :action_name, "Action")
13
+ th.col-width-medium Ward
14
+ th= sort_link(search, :hotlist, "Hotlist")
15
+ th= sort_link(search, :max_cre, "Max CRE")
16
+ th.col-width-date.col-width-date= sort_link(search, :cre_date, "CRE Date")
17
+ th= sort_link(search, :max_aki, "Max AKI")
18
+ th.col-width-date= sort_link(search, :aki_date, "AKI Date")
18
19
  th Decided by
19
20
  tbody
20
21
  - alerts.each do |alert|
21
22
  tr
22
23
  td= link_to("Edit", edit_renal_aki_alert_path(alert))
23
24
  td= default_patient_link(alert.patient)
24
- td= alert.patient.nhs_number
25
+ /td= alert.patient.nhs_number
25
26
  td= alert.patient.hospital_identifiers
26
27
  td= alert.patient.sex
27
28
  td= alert.patient.age
28
- td= alert.patient.born_on
29
+ /td= alert.patient.born_on
29
30
  td= alert.action
30
- td= alert.hospital_ward
31
+ td= [alert.hospital_ward, alert.hospital_ward&.hospital_unit&.unit_code]\
32
+ .compact.join(" - ")
31
33
  td= yes_no alert.hotlist?
32
34
  td= alert.max_cre
33
35
  td= l(alert.cre_date)
34
36
  td= alert.max_aki
35
37
  td= l(alert.aki_date)
36
38
  td= alert.decided_by
39
+
40
+ = paginate alerts