renalware-core 2.0.123 → 2.0.124

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -6
  3. data/app/assets/config/renalware/core/manifest.js +5 -0
  4. data/app/assets/images/renalware/icons/chevron-down.svg +1 -0
  5. data/app/assets/images/renalware/icons/chevron-up.svg +1 -0
  6. data/app/assets/images/renalware/icons/chevrons-down.svg +1 -0
  7. data/app/assets/images/renalware/icons/chevrons-up.svg +1 -0
  8. data/app/assets/javascripts/renalware/README.md +9 -0
  9. data/app/assets/javascripts/renalware/{charting/charting.js.erb → charting.js} +0 -2
  10. data/app/assets/javascripts/renalware/{ajax_errors.js → components/ajax_errors.js} +0 -0
  11. data/app/assets/javascripts/renalware/{aki_alerts.js → components/aki_alerts.js} +0 -0
  12. data/app/assets/javascripts/renalware/{appointments.js → components/appointments.js} +0 -0
  13. data/app/assets/javascripts/renalware/{behaviours.js → components/behaviours.js} +0 -0
  14. data/app/assets/javascripts/renalware/components/bla.es6 +1 -0
  15. data/app/assets/javascripts/renalware/{clipboard_setup.js → components/clipboard_setup.js} +0 -0
  16. data/app/assets/javascripts/renalware/components/clockpicker.js +742 -0
  17. data/app/assets/javascripts/renalware/{contacts.js → components/contacts.js} +0 -0
  18. data/app/assets/javascripts/renalware/{dialogs.js.erb → components/dialogs.js.erb} +0 -0
  19. data/app/assets/javascripts/renalware/{drugs.js → components/drugs.js} +0 -0
  20. data/app/assets/javascripts/renalware/{events.js → components/events.js} +0 -0
  21. data/app/assets/javascripts/renalware/{feed_only_inputs.js.erb → components/feed_only_inputs.js.erb} +0 -0
  22. data/app/assets/javascripts/renalware/{feeds.js → components/feeds.js} +0 -0
  23. data/app/assets/javascripts/renalware/{forms.js → components/forms.js} +0 -0
  24. data/app/assets/javascripts/renalware/{full_screen.js → components/full_screen.js} +0 -0
  25. data/app/assets/javascripts/renalware/{hd.js → components/hd.js} +0 -0
  26. data/app/assets/javascripts/renalware/{iframe.js → components/iframe.js} +0 -0
  27. data/app/assets/javascripts/renalware/{keyboard_shortcuts.js → components/keyboard_shortcuts.js} +0 -0
  28. data/app/assets/javascripts/renalware/{layout.js → components/layout.js} +0 -0
  29. data/app/assets/javascripts/renalware/{letters.js → components/letters.js} +0 -0
  30. data/app/assets/javascripts/renalware/{masonry.run.js → components/masonry.run.js} +0 -0
  31. data/app/assets/javascripts/renalware/{messaging.js → components/messaging.js} +0 -0
  32. data/app/assets/javascripts/renalware/{modality_codes.js → components/modality_codes.js} +0 -0
  33. data/app/assets/javascripts/renalware/{modality_reasons.js → components/modality_reasons.js} +0 -0
  34. data/app/assets/javascripts/renalware/{navigation.js → components/navigation.js} +0 -0
  35. data/app/assets/javascripts/renalware/{patient_ajax_search.js → components/patient_ajax_search.js} +0 -0
  36. data/app/assets/javascripts/renalware/{patient_menu.js → components/patient_menu.js} +0 -0
  37. data/app/assets/javascripts/renalware/{pd.js → components/pd.js} +0 -0
  38. data/app/assets/javascripts/renalware/{pdf.js → components/pdf.js} +0 -0
  39. data/app/assets/javascripts/renalware/{person_ajax_search.js → components/person_ajax_search.js} +0 -0
  40. data/app/assets/javascripts/renalware/{primary_care_physician_search.js → components/primary_care_physician_search.js} +0 -0
  41. data/app/assets/javascripts/renalware/{primary_care_physicians.js → components/primary_care_physicians.js} +0 -0
  42. data/app/assets/javascripts/renalware/{problems.js → components/problems.js} +0 -0
  43. data/app/assets/javascripts/renalware/{renal.js → components/renal.js} +0 -0
  44. data/app/assets/javascripts/renalware/{reporting.js.erb → components/reporting.js.erb} +0 -0
  45. data/app/assets/javascripts/renalware/{searchables.js → components/searchables.js} +0 -0
  46. data/app/assets/javascripts/renalware/{select2-ajax-search.js → components/select2-ajax-search.js} +0 -0
  47. data/app/assets/javascripts/renalware/{session_timeout_redirect.js.erb → components/session_timeout_redirect.js.erb} +0 -0
  48. data/app/assets/javascripts/renalware/{sortable.js → components/sortable.js} +0 -0
  49. data/app/assets/javascripts/renalware/{table.js → components/table.js} +0 -0
  50. data/app/assets/javascripts/renalware/{tabs.js → components/tabs.js} +0 -0
  51. data/app/assets/javascripts/renalware/components/toggler.js +64 -0
  52. data/app/assets/javascripts/renalware/{transplants.js → components/transplants.js} +0 -0
  53. data/app/assets/javascripts/renalware/{application.js.erb → core.js.erb} +1 -2
  54. data/app/assets/stylesheets/renalware/README.md +16 -0
  55. data/app/assets/stylesheets/renalware/base/_variables.scss +1 -0
  56. data/app/assets/stylesheets/renalware/{application.scss → core.scss} +0 -0
  57. data/app/assets/stylesheets/renalware/lib/_clockpicker.css +98 -98
  58. data/app/assets/stylesheets/renalware/partials/_button.scss +49 -0
  59. data/app/assets/stylesheets/renalware/{clipboard.scss → partials/_clipboard.scss} +0 -0
  60. data/app/assets/stylesheets/renalware/partials/_tables.scss +63 -1
  61. data/app/assets/stylesheets/renalware/partials/_toggling.scss +38 -0
  62. data/app/assets/stylesheets/renalware/{print/pathology_request_forms.scss → pathology_request_forms.scss} +0 -0
  63. data/app/controllers/renalware/letters/letters_controller.rb +1 -1
  64. data/app/controllers/renalware/problems/notes_controller.rb +6 -0
  65. data/app/helpers/renalware/application_helper.rb +0 -7
  66. data/app/helpers/renalware/link_helper.rb +13 -0
  67. data/app/helpers/renalware/mdm_helper.rb +2 -1
  68. data/app/helpers/renalware/toggle_helper.rb +22 -0
  69. data/app/javascript/controllers/{clipboard_controller.js → clipboard_controller.js.dead} +0 -0
  70. data/app/models/concerns/renalware/transaction_retry.rb +38 -0
  71. data/app/models/renalware/accesses/patient.rb +1 -1
  72. data/app/models/renalware/hd/session.rb +1 -0
  73. data/app/models/renalware/letters/letter.rb +1 -0
  74. data/app/models/renalware/modalities/modality.rb +1 -1
  75. data/app/models/renalware/patient.rb +9 -4
  76. data/app/models/renalware/patients/ingestion/commands/add_or_update_patient.rb +6 -0
  77. data/app/views/renalware/clinical/body_compositions/_table.html.slim +9 -2
  78. data/app/views/renalware/clinics/clinic_visits/_table.html.slim +2 -1
  79. data/app/views/renalware/clinics/clinic_visits/_table_row.html.slim +3 -8
  80. data/app/views/renalware/clinics/visits/_table.html.slim +6 -5
  81. data/app/views/renalware/clinics/visits/_table_row.html.slim +34 -12
  82. data/app/views/renalware/dashboard/letters/_letter.html.slim +0 -2
  83. data/app/views/renalware/events/events/_event.html.slim +6 -9
  84. data/app/views/renalware/events/events/_table.html.slim +3 -1
  85. data/app/views/renalware/hd/sessions/_row.html.slim +2 -6
  86. data/app/views/renalware/hd/sessions/_thead.html.slim +1 -0
  87. data/app/views/renalware/hd/sessions/dna/_row.html.slim +3 -6
  88. data/app/views/renalware/hospitals/units/index.html.slim +0 -2
  89. data/app/views/renalware/layouts/error.html.slim +1 -1
  90. data/app/views/renalware/letters/electronic_receipts/_table.html.slim +0 -1
  91. data/app/views/renalware/letters/electronic_receipts/sent.html.slim +0 -1
  92. data/app/views/renalware/letters/letters/_letter.html.slim +4 -7
  93. data/app/views/renalware/letters/letters/_table.html.slim +2 -1
  94. data/app/views/renalware/letters/lists/_letter.html.slim +8 -12
  95. data/app/views/renalware/letters/lists/_table.html.slim +4 -3
  96. data/app/views/renalware/mdm/_clinic_visits.html.slim +5 -0
  97. data/app/views/renalware/pathology/requests/requests/create.pdf.slim +1 -1
  98. data/app/views/renalware/pathology/requests/requests/new.html.slim +2 -19
  99. data/app/views/renalware/pathology/requests/requests/show.pdf.slim +1 -1
  100. data/app/views/renalware/problems/notes/_table.html.slim +12 -3
  101. data/app/views/renalware/snippets/snippets/_row.html.slim +0 -2
  102. data/app/views/renalware/surveys/_eq5d_summary_part.html.slim +1 -1
  103. data/app/views/renalware/surveys/_pos_s_summary_part.html.slim +1 -1
  104. data/config/routes/patients.rb +1 -1
  105. data/lib/renalware.rb +0 -13
  106. data/lib/renalware/engine.rb +3 -60
  107. data/lib/renalware/version.rb +1 -1
  108. data/lib/tasks/renalware.rake +3 -100
  109. metadata +63 -58
  110. data/app/assets/javascripts/renalware/clockpicker.js +0 -742
  111. data/app/assets/javascripts/renalware/toggler.js +0 -41
  112. data/app/javascript/packs/renalware_core.js +0 -20
  113. data/config/webpack/development.js +0 -5
  114. data/config/webpack/environment.js +0 -3
  115. data/config/webpack/production.js +0 -5
  116. data/config/webpack/test.js +0 -5
  117. data/config/webpacker.yml +0 -103
@@ -1,26 +1,48 @@
1
+ - patient = clinic_visit.patient
1
2
  tr(class="#{'dna' if clinic_visit.did_not_attend?}")
2
- td.no-print
3
- = link_to("Edit", edit_patient_clinic_visit_path(clinic_visit.patient, clinic_visit))
4
- = pipe_separator
5
- = link_to("Toggle",
6
- "#clinic_visit-quick-preview-#{clinic_visit.id}",
7
- data: { behaviour: "toggler" })
8
- = pipe_separator
9
- = link_to_clinic_visit_letter(clinic_visit.patient, clinic_visit)
3
+ td= toggler("#clinic_visit-quick-preview-#{clinic_visit.id}")
4
+ td.actions.no-print
5
+ / - uid = "visit-#{clinic_visit.id}-options"
6
+ / a.button.actions.dropdown.with-icon(href="#"
7
+ / data-dropdown=uid
8
+ / aria-controls=uid
9
+ / aria-expanded="false")
10
+
11
+ / ul.actions-dropdown.f-dropdown.f-dropdown-no-arrow(id="#{uid}" data-dropdown-content aria-hidden="true")
12
+ / li= link_to_if_allowed policy(clinic_visit).edit?,
13
+ / "Edit",
14
+ / edit_patient_clinic_visit_path(patient, clinic_visit)
15
+ / li= link_to_if_allowed policy(clinic_visit).destroy?,
16
+ / "Delete",
17
+ / patient_clinic_visit_path(patient, clinic_visit),
18
+ / method: :delete,
19
+ / data: { confirm: I18n.t("prompts.confirm_delete") }
20
+ / li.separator
21
+ / li= link_to_clinic_visit_letter(patient, clinic_visit)
22
+
23
+ = link_to_if_allowed policy(clinic_visit).edit?,
24
+ "Edit", edit_patient_clinic_visit_path(patient, clinic_visit)
25
+ = link_to_if_allowed policy(clinic_visit).destroy?,
26
+ "Delete",
27
+ patient_clinic_visit_path(patient, clinic_visit),
28
+ method: :delete,
29
+ data: { confirm: I18n.t("prompts.confirm_delete") }
30
+ = link_to_clinic_visit_letter(patient, clinic_visit)
10
31
  td.date-time= l clinic_visit.date
11
32
  td= yes_no(clinic_visit.did_not_attend)
12
33
  td= default_patient_link(clinic_visit.patient)
13
34
  td= clinic_visit.patient.nhs_number
14
35
  td= clinic_visit.patient.sex
15
36
  td= clinic_visit.patient.age
16
- td= clinic_visit.patient.current_modality&.description&.name
17
- td.clinic-type= clinic_visit.clinic
37
+ td.at-least.col-width-medium-with-ellipsis= clinic_visit.patient.current_modality&.description&.name
38
+ td.at-least.col-width-medium-with-ellipsis.clinic-type= clinic_visit.clinic
18
39
  td.bmi= clinic_visit.bmi
19
40
  td.bp= clinic_visit.bp
20
41
  td.no-print= link_to_mdm(clinic_visit.patient)
21
- td.created-by= clinic_visit.created_by
42
+ td.col-width-medium-with-ellipsis.created-by= clinic_visit.created_by
43
+
22
44
  = content_tag(:tr, id: "clinic_visit-quick-preview-#{clinic_visit.id}", style: "display: none")
23
- td(colspan=13)
45
+ td(colspan=14)
24
46
  .quick-preview
25
47
  = definition_list_for(clinic_visit, size: :large) do |list|
26
48
  = list.definition(:notes){ |value| simple_format(value) }
@@ -7,10 +7,8 @@ tr(class=letter.state.dasherize)
7
7
  td= letter.description
8
8
  td.actions
9
9
  = link_to "Toggle", "#quick-preview-#{letter.id}", data: { behaviour: "toggler" }
10
- = pipe_separator
11
10
  = link_to letter.view_label, patient_letters_letter_path(letter.patient, letter)
12
11
  - if policy(letter).update?
13
- = pipe_separator
14
12
  = link_to "Edit", edit_patient_letters_letter_path(letter.patient, letter)
15
13
  = content_tag(:tr, id: "quick-preview-#{letter.id}", style: "display: none")
16
14
  td
@@ -1,11 +1,8 @@
1
+ - row_id = "#{toggle_prefix}-quick-preview-#{event.id}"
1
2
  tr
2
- td
3
- = link_to("Toggle",
4
- "##{toggle_prefix}-quick-preview-#{event.id}",
5
- data: { behaviour: "toggler" })
6
-
7
- - if local_assigns[:edit_proc]
8
- = pipe_separator
3
+ td.noprint= toggler("##{row_id}")
4
+ - if local_assigns[:edit_proc]
5
+ td.noprint
9
6
  = link_to("Edit", edit_proc.call(event))
10
7
 
11
8
  td.nowrap= l event.created_at.to_date
@@ -16,8 +13,8 @@ tr
16
13
  locals: { event: event }
17
14
  td.created_at= l(event.date_time)
18
15
  td.created_by= event.created_by.full_name
19
- = content_tag(:tr, id: "#{toggle_prefix}-quick-preview-#{event.id}", style: "display: none")
20
- td(colspan=6)
16
+ = content_tag(:tr, id: row_id, style: "display: none")
17
+ td(colspan=7)
21
18
  .quick-preview
22
19
  = render partial: event.to_toggled_cell_partial_path,
23
20
  locals: { event: event }
@@ -3,7 +3,9 @@
3
3
  table.has-togglable-rows.events-table
4
4
  thead
5
5
  tr
6
- th.col-width-tiny
6
+ th.noprint.togglers= table_toggler
7
+ - if local_assigns[:edit_proc]
8
+ th.col-width-tiny
7
9
  th.col-width-date=t(".created_at")
8
10
  - unless local_assigns.fetch(:exclude_type_column, false)
9
11
  th.col-width-large= t(".type")
@@ -1,13 +1,9 @@
1
1
  tr.hd-session-row(class=[session.state, stripe_class])
2
+ td.noprint(rowspan=2)= toggler("#hd-session-#{session.id}")
2
3
  td.noprint(rowspan=2)
3
- = link_to("Toggle",
4
- "#hd-session-#{session.id}",
5
- data: { behaviour: "toggler" })
6
- = pipe_separator
7
4
  = session.edit_or_view_url
8
5
  td.col-width-date(rowspan=2)= session.performed_on
9
6
  td= session.hospital_unit_unit_code
10
-
11
7
  td= session.start_time
12
8
  td.derived(rowspan=2)= session.duration
13
9
  td= session.before_measurement_for(:weight)
@@ -42,7 +38,7 @@ tr(class=[session.state, stripe_class])
42
38
  td.nowrap= session.after_measurement_for(:blood_pressure)
43
39
  td.print-only= session.signed_off_by
44
40
  = content_tag(:tr, id: "hd-session-#{session.id}", style: "display: none")
45
- td(colspan=19)
41
+ td(colspan=20)
46
42
  .quick-preview
47
43
  = definition_list_for(session, size: :large) do |list|
48
44
  = list.definition(:notes){ |value| simple_format(value) }
@@ -1,5 +1,6 @@
1
1
  thead
2
2
  tr
3
+ th.togglers.noprint(rowspan=3)= table_toggler
3
4
  th.noprint.col-width-small(rowspan=3)
4
5
  th.col-width-date(rowspan=3 valign="top")= t(".date")
5
6
  th.col-width-small= t(".site")
@@ -1,9 +1,6 @@
1
1
  tr(class=[session.state, stripe_class])
2
- td
3
- = link_to("Toggle",
4
- "#hd-session-#{session.id}",
5
- data: { behaviour: "toggler" })
6
- = pipe_separator
2
+ td.noprint= toggler("#hd-session-#{session.id}")
3
+ td.noprint
7
4
  = session.edit_or_view_url
8
5
  td= session.performed_on
9
6
  td= session.hospital_unit_unit_code
@@ -11,7 +8,7 @@ tr(class=[session.state, stripe_class])
11
8
  td(colspan=13)
12
9
  i= session.truncated_notes
13
10
  = content_tag(:tr, id: "hd-session-#{session.id}", style: "display: none")
14
- td(colspan=19)
11
+ td(colspan=20)
15
12
  .quick-preview
16
13
  = definition_list_for(session, size: :large) do |list|
17
14
  = list.definition(:notes) { |value| simple_format(value) }
@@ -38,9 +38,7 @@
38
38
  td.actions
39
39
  - if pundit_policy_for(Renalware::HD::Station).index?
40
40
  = link_to("HD Stations", hd_unit_stations_path(unit))
41
- = pipe_separator
42
41
  - if pundit_policy_for(Renalware::HD::Scheduling::Diary).index?
43
42
  = link_to("HD Diaries", hd_scheduling_unit_diaries_path(unit))
44
43
  - if pundit_policy_for(Renalware::Hospitals::Ward).index?
45
- = pipe_separator
46
44
  = link_to("Wards", hospitals_unit_wards_path(unit))
@@ -4,7 +4,7 @@ html lang="en"
4
4
  meta charset="utf-8"
5
5
  meta name="viewport" content="width=device-width, initial-scale=1.0"
6
6
  title= yield(:page_title)
7
- = stylesheet_link_tag "renalware/application", media: :all
7
+ = stylesheet_link_tag "renalware/core", media: :all
8
8
 
9
9
  body.error-page
10
10
  nav.top-bar(data-topbar role="navigation")
@@ -28,7 +28,6 @@ table.letters.electronic-ccs.has-togglable-rows
28
28
  td.col-width-medium-with-ellipsis= letter.description
29
29
  td.actions
30
30
  = link_to "Toggle", "##{receipt.html_preview_identifier}", data: { behaviour: "toggler" }
31
- = pipe_separator
32
31
  = link_to letter.view_label,
33
32
  patient_letters_letter_path(letter.patient, letter, back_url: request.fullpath)
34
33
 
@@ -31,7 +31,6 @@
31
31
  td.col-width-medium-with-ellipsis= letter.description
32
32
  td.actions
33
33
  = link_to "Toggle", "##{receipt.html_preview_identifier}", data: { behaviour: "toggler" }
34
- = pipe_separator
35
34
  = link_to(\
36
35
  letter.view_label,
37
36
  patient_letters_letter_path(letter.patient, letter, back_url: request.fullpath))
@@ -1,15 +1,12 @@
1
1
  - columns = local_assigns[:columns] || []
2
2
  - cache([letter, columns.join("-")]) do
3
3
  tr(class=letter.state.dasherize)
4
- td
5
- = link_to "Toggle", "#quick-preview-#{letter.id}", data: { behaviour: "toggler" }
6
- = pipe_separator
4
+ td= toggler("#letter-quick-preview-#{letter.id}")
5
+ td.actions
7
6
  = link_to letter.view_label, patient_letters_letter_path(letter.patient, letter)
8
7
  - if policy(letter).update?
9
- = pipe_separator
10
8
  = link_to "Edit", edit_patient_letters_letter_path(letter.patient, letter)
11
9
  - if policy(letter).destroy?
12
- = pipe_separator
13
10
  = link_to "Delete",
14
11
  patient_letters_letter_path(letter.patient, letter),
15
12
  method: :delete,
@@ -25,9 +22,9 @@
25
22
  td.recipient= letter.main_recipient.address
26
23
  td.col-width-medium-with-ellipsis= letter.description
27
24
 
28
- = content_tag(:tr, id: "quick-preview-#{letter.id}", style: "display: none")
25
+ = content_tag(:tr, id: "letter-quick-preview-#{letter.id}", style: "display: none")
29
26
  td
30
- td(colspan=8)
27
+ td(colspan=9)
31
28
  .quick-preview
32
29
  = simple_format letter.body
33
30
  - if letter.notes.present?
@@ -3,7 +3,8 @@
3
3
  table.auto-layout.letters.has-togglable-rows
4
4
  thead
5
5
  tr
6
- th.col-width-small
6
+ th.noprint.togglers= table_toggler
7
+ th.col-width-11
7
8
  th.col-width-tiny State
8
9
  th.col-width-date-time Date
9
10
  - if columns.include?(:author)
@@ -1,6 +1,9 @@
1
1
  tr(class=letter.state.dasherize)
2
+ td= toggler("#letter-quick-preview-#{letter.id}")
2
3
  td.noprint
4
+ = link_to "View", patient_letters_letter_path(letter.patient, letter)
3
5
  - if letter.approved?
6
+ |  
4
7
  / The Print link will:
5
8
  / - open a new tab with the PDF, ready to print
6
9
  / - display a modal on this page (ready for when the user returns here after
@@ -16,8 +19,8 @@ tr(class=letter.state.dasherize)
16
19
  } do
17
20
  i.fas.fa-print
18
21
  | Print
19
- |  
20
22
  - if letter.approved? && letter.page_count
23
+ |  
21
24
  = link_to patient_letters_letter_printable_path(letter.patient, letter),
22
25
  target: "_blank",
23
26
  class: "printing-pdf button secondary compact",
@@ -26,13 +29,6 @@ tr(class=letter.state.dasherize)
26
29
  } do
27
30
  i.fas.fa-envelope
28
31
  | Env Print
29
- |  
30
- = link_to "Toggle",
31
- "#quick-preview-#{letter.id}",
32
- data: { behaviour: "toggler" }
33
- = pipe_separator
34
- = link_to "View", patient_letters_letter_path(letter.patient, letter)
35
-
36
32
  td.col-width-medium-with-ellipsis= letter.type
37
33
  td.state
38
34
  span= letter.state_description
@@ -40,14 +36,14 @@ tr(class=letter.state.dasherize)
40
36
  td= letter.patient.nhs_number
41
37
  td= letter.enclosures&.truncate(6)
42
38
  td= l(letter.effective_date)
43
- td= letter.author
44
- td= letter.typist
39
+ td.col-width-medium-with-ellipsis= letter.author
40
+ td.col-width-medium-with-ellipsis= letter.typist
45
41
  td= letter.page_count
46
42
  td.col-width-medium-with-ellipsis= letter.main_recipient.address
47
43
  td.col-width-medium-with-ellipsis= letter.description
48
- = content_tag(:tr, id: "quick-preview-#{letter.id}", style: "display: none")
44
+ = content_tag(:tr, id: "letter-quick-preview-#{letter.id}", style: "display: none")
49
45
  td
50
- td(colspan=11)
46
+ td(colspan=12)
51
47
  .quick-preview
52
48
  = simple_format letter.body
53
49
  - if letter.notes.present?
@@ -2,9 +2,10 @@
2
2
  table.report.letters
3
3
  thead
4
4
  tr
5
- th.noprint.col-width-large
6
- th Type
7
- th= sort_link([:renalware, q], :type, "State")
5
+ th.noprint.togglers
6
+ th.noprint.col-width-15
7
+ th.col-width-small Type
8
+ th.col-width-small= sort_link([:renalware, q], :type, "State")
8
9
  th.col-width-medium= sort_link([:renalware, q], :patient_family_name, "Patient")
9
10
  th.col-width-nhs-no= sort_link([:renalware, q], :patient_nhs_number, "NHS No")
10
11
  th= sort_link([:renalware, q], :enclosures, "Enc.")
@@ -8,6 +8,11 @@
8
8
  = link_to "View All",
9
9
  patient_clinic_visits_path(mdm.patient),
10
10
  class: "button secondary"
11
+ = link_to new_patient_clinic_visit_path(mdm.patient),
12
+ class: "button",
13
+ target: "_blank" do
14
+ i.fa.fa-external-link-square-alt
15
+ | Add
11
16
 
12
17
  = render "renalware/clinics/clinic_visits/table",
13
18
  clinic_visits: mdm.clinic_visits,
@@ -1,5 +1,5 @@
1
1
  = content_for(:head2) do
2
- = wicked_pdf_stylesheet_link_tag "renalware/print/pathology_request_forms.css"
2
+ = wicked_pdf_stylesheet_link_tag "renalware/pathology_request_forms.css"
3
3
 
4
4
  = render partial: "renalware/pathology/requests/requests/request_form/#{request_html_form_params.template}",
5
5
  locals: { requests: requests }
@@ -1,21 +1,6 @@
1
- / doctype html
2
- / html lang="en"
3
- / head
4
- / meta charset="utf-8"
5
-
6
- / title= content_for?(:title) ? yield(:title) : "Renalware v#{Renalware::VERSION}"
7
-
8
- / = stylesheet_link_tag "renalware/application", media: :all
9
- / = stylesheet_link_tag "renalware/print/pathology_request_forms", media: :all
10
- / = javascript_include_tag "renalware/modernizr"
11
-
12
- / = csrf_meta_tag
13
-
14
-
15
- / body.overflow
16
-
17
1
  = content_for(:css) do
18
- = stylesheet_link_tag "renalware/print/pathology_request_forms", media: :all
2
+ = stylesheet_link_tag "renalware/pathology_request_forms", media: :all
3
+
19
4
  = within_admin_layout(title: "Pathology Request CRS Form Preview") do
20
5
  / .row
21
6
  / h4 Pathology Request CRS Form Preview
@@ -59,5 +44,3 @@
59
44
 
60
45
  = render partial: "renalware/pathology/requests/requests/request_form/#{request_html_form_params.template}",
61
46
  locals: { requests: requests, format: :html }
62
-
63
- /= javascript_include_tag "renalware/application"
@@ -1,5 +1,5 @@
1
1
  = content_for(:head2) do
2
- = wicked_pdf_stylesheet_link_tag "renalware/print/pathology_request_forms.css"
2
+ = wicked_pdf_stylesheet_link_tag "renalware/pathology_request_forms.css"
3
3
 
4
4
  = render partial: "renalware/pathology/requests/requests/request_form/#{request.template}",
5
5
  locals: { requests: [request] }
@@ -15,9 +15,18 @@
15
15
  - notes.each do |note|
16
16
  tr
17
17
  - unless problem.archived?
18
- td= link_to "Edit",
19
- edit_patient_problem_note_path(problem.patient, problem, note),
20
- remote: true
18
+ td
19
+ - if policy(note).edit?
20
+ = link_to "Edit",
21
+ edit_patient_problem_note_path(problem.patient, problem, note),
22
+ remote: true
23
+ - if policy(note).destroy?
24
+ = pipe_separator
25
+ = link_to "Delete",
26
+ patient_problem_note_path(problem.patient, problem, note),
27
+ method: :delete,
28
+ remote: true,
29
+ data: { confirm: "Are you sure you want to delete this note?" }
21
30
  td(class="problem-note-#{note.id}")= note.description
22
31
  td= note.updated_by
23
32
  td= l(note.updated_at)
@@ -32,11 +32,9 @@ tr(data={ "snippet-id" => snippet.id, invocation_url: snippet_invocations_path(s
32
32
 
33
33
  - if snippet_authored_by_me
34
34
  = link_to t(".edit"), edit_snippet_path(snippet)
35
- = pipe_separator
36
35
  = link_to t(".duplicate"),
37
36
  snippet_clones_path(snippet_id: snippet),
38
37
  method: :post
39
- = pipe_separator
40
38
  = link_to t(".delete"),
41
39
  snippet_path(snippet),
42
40
  method: :delete,
@@ -15,7 +15,7 @@
15
15
  table
16
16
  thead
17
17
  tr
18
- th Date
18
+ th.col-width-date Date
19
19
  - eq5d_summary_part.question_labels.each do |code, label|
20
20
  th= label
21
21
  tbody
@@ -15,7 +15,7 @@
15
15
  table
16
16
  thead
17
17
  tr
18
- th Date
18
+ th.col-width-date Date
19
19
  - pos_s_summary_part.question_labels.each do |code, label|
20
20
  th= label
21
21
  tbody
@@ -36,7 +36,7 @@ resources :patients, except: [:destroy], controller: "patients/patients" do
36
36
  # Problems
37
37
  resources :problems, controller: "problems/problems" do
38
38
  post :sort, on: :collection
39
- resources :notes, only: [:index, :new, :create, :edit, :update], controller: "problems/notes"
39
+ resources :notes, controller: "problems/notes"
40
40
  end
41
41
 
42
42
  namespace :surveys do
@@ -4,17 +4,4 @@ require "renalware/engine"
4
4
  require "renalware/configuration"
5
5
 
6
6
  module Renalware
7
- # Configure Webpacker instance.
8
- # See https://github.com/rails/webpacker/blob/master/docs/engines.md
9
- class << self
10
- def webpacker
11
- @webpacker ||= begin
12
- root_path = Pathname.new(File.join(__dir__, ".."))
13
- ::Webpacker::Instance.new(
14
- root_path: root_path,
15
- config_path: root_path.join("config/webpacker.yml")
16
- )
17
- end
18
- end
19
- end
20
7
  end