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.
- checksums.yaml +4 -4
- data/Rakefile +0 -6
- data/app/assets/config/renalware/core/manifest.js +5 -0
- data/app/assets/images/renalware/icons/chevron-down.svg +1 -0
- data/app/assets/images/renalware/icons/chevron-up.svg +1 -0
- data/app/assets/images/renalware/icons/chevrons-down.svg +1 -0
- data/app/assets/images/renalware/icons/chevrons-up.svg +1 -0
- data/app/assets/javascripts/renalware/README.md +9 -0
- data/app/assets/javascripts/renalware/{charting/charting.js.erb → charting.js} +0 -2
- data/app/assets/javascripts/renalware/{ajax_errors.js → components/ajax_errors.js} +0 -0
- data/app/assets/javascripts/renalware/{aki_alerts.js → components/aki_alerts.js} +0 -0
- data/app/assets/javascripts/renalware/{appointments.js → components/appointments.js} +0 -0
- data/app/assets/javascripts/renalware/{behaviours.js → components/behaviours.js} +0 -0
- data/app/assets/javascripts/renalware/components/bla.es6 +1 -0
- data/app/assets/javascripts/renalware/{clipboard_setup.js → components/clipboard_setup.js} +0 -0
- data/app/assets/javascripts/renalware/components/clockpicker.js +742 -0
- data/app/assets/javascripts/renalware/{contacts.js → components/contacts.js} +0 -0
- data/app/assets/javascripts/renalware/{dialogs.js.erb → components/dialogs.js.erb} +0 -0
- data/app/assets/javascripts/renalware/{drugs.js → components/drugs.js} +0 -0
- data/app/assets/javascripts/renalware/{events.js → components/events.js} +0 -0
- data/app/assets/javascripts/renalware/{feed_only_inputs.js.erb → components/feed_only_inputs.js.erb} +0 -0
- data/app/assets/javascripts/renalware/{feeds.js → components/feeds.js} +0 -0
- data/app/assets/javascripts/renalware/{forms.js → components/forms.js} +0 -0
- data/app/assets/javascripts/renalware/{full_screen.js → components/full_screen.js} +0 -0
- data/app/assets/javascripts/renalware/{hd.js → components/hd.js} +0 -0
- data/app/assets/javascripts/renalware/{iframe.js → components/iframe.js} +0 -0
- data/app/assets/javascripts/renalware/{keyboard_shortcuts.js → components/keyboard_shortcuts.js} +0 -0
- data/app/assets/javascripts/renalware/{layout.js → components/layout.js} +0 -0
- data/app/assets/javascripts/renalware/{letters.js → components/letters.js} +0 -0
- data/app/assets/javascripts/renalware/{masonry.run.js → components/masonry.run.js} +0 -0
- data/app/assets/javascripts/renalware/{messaging.js → components/messaging.js} +0 -0
- data/app/assets/javascripts/renalware/{modality_codes.js → components/modality_codes.js} +0 -0
- data/app/assets/javascripts/renalware/{modality_reasons.js → components/modality_reasons.js} +0 -0
- data/app/assets/javascripts/renalware/{navigation.js → components/navigation.js} +0 -0
- data/app/assets/javascripts/renalware/{patient_ajax_search.js → components/patient_ajax_search.js} +0 -0
- data/app/assets/javascripts/renalware/{patient_menu.js → components/patient_menu.js} +0 -0
- data/app/assets/javascripts/renalware/{pd.js → components/pd.js} +0 -0
- data/app/assets/javascripts/renalware/{pdf.js → components/pdf.js} +0 -0
- data/app/assets/javascripts/renalware/{person_ajax_search.js → components/person_ajax_search.js} +0 -0
- data/app/assets/javascripts/renalware/{primary_care_physician_search.js → components/primary_care_physician_search.js} +0 -0
- data/app/assets/javascripts/renalware/{primary_care_physicians.js → components/primary_care_physicians.js} +0 -0
- data/app/assets/javascripts/renalware/{problems.js → components/problems.js} +0 -0
- data/app/assets/javascripts/renalware/{renal.js → components/renal.js} +0 -0
- data/app/assets/javascripts/renalware/{reporting.js.erb → components/reporting.js.erb} +0 -0
- data/app/assets/javascripts/renalware/{searchables.js → components/searchables.js} +0 -0
- data/app/assets/javascripts/renalware/{select2-ajax-search.js → components/select2-ajax-search.js} +0 -0
- data/app/assets/javascripts/renalware/{session_timeout_redirect.js.erb → components/session_timeout_redirect.js.erb} +0 -0
- data/app/assets/javascripts/renalware/{sortable.js → components/sortable.js} +0 -0
- data/app/assets/javascripts/renalware/{table.js → components/table.js} +0 -0
- data/app/assets/javascripts/renalware/{tabs.js → components/tabs.js} +0 -0
- data/app/assets/javascripts/renalware/components/toggler.js +64 -0
- data/app/assets/javascripts/renalware/{transplants.js → components/transplants.js} +0 -0
- data/app/assets/javascripts/renalware/{application.js.erb → core.js.erb} +1 -2
- data/app/assets/stylesheets/renalware/README.md +16 -0
- data/app/assets/stylesheets/renalware/base/_variables.scss +1 -0
- data/app/assets/stylesheets/renalware/{application.scss → core.scss} +0 -0
- data/app/assets/stylesheets/renalware/lib/_clockpicker.css +98 -98
- data/app/assets/stylesheets/renalware/partials/_button.scss +49 -0
- data/app/assets/stylesheets/renalware/{clipboard.scss → partials/_clipboard.scss} +0 -0
- data/app/assets/stylesheets/renalware/partials/_tables.scss +63 -1
- data/app/assets/stylesheets/renalware/partials/_toggling.scss +38 -0
- data/app/assets/stylesheets/renalware/{print/pathology_request_forms.scss → pathology_request_forms.scss} +0 -0
- data/app/controllers/renalware/letters/letters_controller.rb +1 -1
- data/app/controllers/renalware/problems/notes_controller.rb +6 -0
- data/app/helpers/renalware/application_helper.rb +0 -7
- data/app/helpers/renalware/link_helper.rb +13 -0
- data/app/helpers/renalware/mdm_helper.rb +2 -1
- data/app/helpers/renalware/toggle_helper.rb +22 -0
- data/app/javascript/controllers/{clipboard_controller.js → clipboard_controller.js.dead} +0 -0
- data/app/models/concerns/renalware/transaction_retry.rb +38 -0
- data/app/models/renalware/accesses/patient.rb +1 -1
- data/app/models/renalware/hd/session.rb +1 -0
- data/app/models/renalware/letters/letter.rb +1 -0
- data/app/models/renalware/modalities/modality.rb +1 -1
- data/app/models/renalware/patient.rb +9 -4
- data/app/models/renalware/patients/ingestion/commands/add_or_update_patient.rb +6 -0
- data/app/views/renalware/clinical/body_compositions/_table.html.slim +9 -2
- data/app/views/renalware/clinics/clinic_visits/_table.html.slim +2 -1
- data/app/views/renalware/clinics/clinic_visits/_table_row.html.slim +3 -8
- data/app/views/renalware/clinics/visits/_table.html.slim +6 -5
- data/app/views/renalware/clinics/visits/_table_row.html.slim +34 -12
- data/app/views/renalware/dashboard/letters/_letter.html.slim +0 -2
- data/app/views/renalware/events/events/_event.html.slim +6 -9
- data/app/views/renalware/events/events/_table.html.slim +3 -1
- data/app/views/renalware/hd/sessions/_row.html.slim +2 -6
- data/app/views/renalware/hd/sessions/_thead.html.slim +1 -0
- data/app/views/renalware/hd/sessions/dna/_row.html.slim +3 -6
- data/app/views/renalware/hospitals/units/index.html.slim +0 -2
- data/app/views/renalware/layouts/error.html.slim +1 -1
- data/app/views/renalware/letters/electronic_receipts/_table.html.slim +0 -1
- data/app/views/renalware/letters/electronic_receipts/sent.html.slim +0 -1
- data/app/views/renalware/letters/letters/_letter.html.slim +4 -7
- data/app/views/renalware/letters/letters/_table.html.slim +2 -1
- data/app/views/renalware/letters/lists/_letter.html.slim +8 -12
- data/app/views/renalware/letters/lists/_table.html.slim +4 -3
- data/app/views/renalware/mdm/_clinic_visits.html.slim +5 -0
- data/app/views/renalware/pathology/requests/requests/create.pdf.slim +1 -1
- data/app/views/renalware/pathology/requests/requests/new.html.slim +2 -19
- data/app/views/renalware/pathology/requests/requests/show.pdf.slim +1 -1
- data/app/views/renalware/problems/notes/_table.html.slim +12 -3
- data/app/views/renalware/snippets/snippets/_row.html.slim +0 -2
- data/app/views/renalware/surveys/_eq5d_summary_part.html.slim +1 -1
- data/app/views/renalware/surveys/_pos_s_summary_part.html.slim +1 -1
- data/config/routes/patients.rb +1 -1
- data/lib/renalware.rb +0 -13
- data/lib/renalware/engine.rb +3 -60
- data/lib/renalware/version.rb +1 -1
- data/lib/tasks/renalware.rake +3 -100
- metadata +63 -58
- data/app/assets/javascripts/renalware/clockpicker.js +0 -742
- data/app/assets/javascripts/renalware/toggler.js +0 -41
- data/app/javascript/packs/renalware_core.js +0 -20
- data/config/webpack/development.js +0 -5
- data/config/webpack/environment.js +0 -3
- data/config/webpack/production.js +0 -5
- data/config/webpack/test.js +0 -5
- data/config/webpacker.yml +0 -103
File without changes
|
@@ -18,6 +18,51 @@ table.column_hover .hover { // for js column hovering see table.js
|
|
18
18
|
background-color: $table-row-hover-colour;
|
19
19
|
}
|
20
20
|
|
21
|
+
.no-permission {
|
22
|
+
color: $disabled-colour;
|
23
|
+
}
|
24
|
+
|
25
|
+
.actions-dropdown {
|
26
|
+
.no-permission {
|
27
|
+
padding: 0.5rem;
|
28
|
+
display: inline-block;
|
29
|
+
line-height: inherit;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
/*
|
34
|
+
Add a pipe between action links (Edit, Delete etc) in tables
|
35
|
+
*/
|
36
|
+
td.actions {
|
37
|
+
padding-left: 0;
|
38
|
+
white-space: nowrap;
|
39
|
+
|
40
|
+
> a, > span {
|
41
|
+
&:after {
|
42
|
+
color: $pipe-separator-colour;
|
43
|
+
content: "|";
|
44
|
+
padding-right: 0;
|
45
|
+
padding-left: .3rem;
|
46
|
+
}
|
47
|
+
|
48
|
+
&:last-child:after {
|
49
|
+
content: "";
|
50
|
+
}
|
51
|
+
|
52
|
+
&:before {
|
53
|
+
display: inline-block;
|
54
|
+
color: $pipe-separator-colour;
|
55
|
+
content: "";
|
56
|
+
padding-right: 0;
|
57
|
+
padding-right: .3rem;
|
58
|
+
}
|
59
|
+
|
60
|
+
&:first-child:before {
|
61
|
+
padding-right: 0;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
21
66
|
table.stripeless {
|
22
67
|
tr:nth-of-type(even),
|
23
68
|
tr:nth-of-type(odd) {
|
@@ -167,6 +212,13 @@ table {
|
|
167
212
|
|
168
213
|
&.actions {
|
169
214
|
text-align: right;
|
215
|
+
white-space: nowrap;
|
216
|
+
}
|
217
|
+
}
|
218
|
+
|
219
|
+
&:first-child {
|
220
|
+
&.actions {
|
221
|
+
white-space: nowrap;
|
170
222
|
}
|
171
223
|
}
|
172
224
|
}
|
@@ -197,7 +249,7 @@ table {
|
|
197
249
|
}
|
198
250
|
|
199
251
|
&.actions {
|
200
|
-
text-align:
|
252
|
+
text-align: left;
|
201
253
|
}
|
202
254
|
}
|
203
255
|
|
@@ -250,6 +302,10 @@ table {
|
|
250
302
|
width: 9.7rem;
|
251
303
|
}
|
252
304
|
|
305
|
+
&.col-width-actions-dropdown {
|
306
|
+
width: 2rem;
|
307
|
+
}
|
308
|
+
|
253
309
|
&.col-width-tiny {
|
254
310
|
min-width: 2rem;
|
255
311
|
width: 3rem;
|
@@ -299,12 +355,18 @@ table {
|
|
299
355
|
|
300
356
|
&.col-width-11 {
|
301
357
|
width: 11rem;
|
358
|
+
min-width: 11rem;
|
302
359
|
}
|
303
360
|
|
304
361
|
&.col-width-13 {
|
305
362
|
width: 13rem;
|
306
363
|
}
|
307
364
|
|
365
|
+
&.col-width-15 {
|
366
|
+
min-width: 15rem;
|
367
|
+
width: 15rem;
|
368
|
+
}
|
369
|
+
|
308
370
|
&.col-width-17 {
|
309
371
|
min-width: 17rem;
|
310
372
|
width: 17rem;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
.toggler {
|
2
|
+
position: relative; // required for safari otherwise user cannot click on :before content
|
3
|
+
display: inline-block; // required otherwise IE11 will not be able to click on it
|
4
|
+
|
5
|
+
i {
|
6
|
+
@extend %fa-icon;
|
7
|
+
@extend .fas;
|
8
|
+
font-weight: 600;
|
9
|
+
pointer-events: none;
|
10
|
+
text-align: center;
|
11
|
+
width: 1.2rem;
|
12
|
+
|
13
|
+
&:before {
|
14
|
+
content: asset-data-url("renalware/icons/chevron-down.svg");
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
th.togglers .toggler {
|
20
|
+
i:before {
|
21
|
+
content: asset-data-url("renalware/icons/chevrons-down.svg");
|
22
|
+
}
|
23
|
+
|
24
|
+
&.toggled i:before {
|
25
|
+
content: asset-data-url("renalware/icons/chevrons-up.svg");
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
.content-toggled .toggler i,
|
30
|
+
.toggler.toggled i {
|
31
|
+
&:before {
|
32
|
+
content: asset-data-url("renalware/icons/chevron-up.svg");
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
th.togglers {
|
37
|
+
width: 1rem;
|
38
|
+
}
|
File without changes
|
@@ -31,12 +31,12 @@ module Renalware
|
|
31
31
|
letter = LetterFactory.new(
|
32
32
|
@patient,
|
33
33
|
event: find_event,
|
34
|
-
author: current_user,
|
35
34
|
clinical: clinical?
|
36
35
|
)
|
37
36
|
.with_contacts_as_default_ccs
|
38
37
|
.build
|
39
38
|
RememberedLetterPreferences.new(session).apply_to(letter)
|
39
|
+
letter.author_id ||= current_user.id
|
40
40
|
render_form(letter, :new)
|
41
41
|
end
|
42
42
|
|
@@ -3,17 +3,10 @@
|
|
3
3
|
require "inline_image"
|
4
4
|
require "git_commit_sha"
|
5
5
|
require "breadcrumb"
|
6
|
-
require "webpacker/helper"
|
7
6
|
|
8
7
|
module Renalware
|
9
8
|
module ApplicationHelper
|
10
9
|
include Renalware::Engine.routes.url_helpers
|
11
|
-
include ::Webpacker::Helper
|
12
|
-
|
13
|
-
# See https://github.com/rails/webpacker/blob/master/docs/engines.md
|
14
|
-
def current_webpacker_instance
|
15
|
-
Renalware.webpacker
|
16
|
-
end
|
17
10
|
|
18
11
|
def default_patient_link(patient)
|
19
12
|
link_to(patient.to_s(:default), patient_clinical_summary_path(patient))
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Renalware
|
4
|
+
module LinkHelper
|
5
|
+
# A wrapper around link_to_if that will output greyed-out text to indicate the option is
|
6
|
+
# not permitted if condition is falsey.
|
7
|
+
def link_to_if_allowed(condition, name, options = {}, html_options = {})
|
8
|
+
link_to_if(condition, name, options, html_options) do
|
9
|
+
content_tag(:span, class: "no-permission") { name }
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -8,5 +8,27 @@ module Renalware
|
|
8
8
|
class: "button compact low-key",
|
9
9
|
data: { behaviour: "css-toggler" }
|
10
10
|
end
|
11
|
+
|
12
|
+
def toggler(row_selector, link_title: "Toggle")
|
13
|
+
link_to(
|
14
|
+
row_selector,
|
15
|
+
data: { behaviour: "toggler" },
|
16
|
+
class: "toggler",
|
17
|
+
title: link_title
|
18
|
+
) do
|
19
|
+
content_tag(:i)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def table_toggler(link_title: "Toggle all rows")
|
24
|
+
link_to(
|
25
|
+
"#",
|
26
|
+
data: { behaviour: "table-toggler" },
|
27
|
+
class: "toggler",
|
28
|
+
title: link_title
|
29
|
+
) do
|
30
|
+
content_tag(:i)
|
31
|
+
end
|
32
|
+
end
|
11
33
|
end
|
12
34
|
end
|
File without changes
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_dependency "renalware"
|
4
|
+
|
5
|
+
module Renalware
|
6
|
+
module TransactionRetry
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
included do
|
10
|
+
# Retry a transaction automatically when an ActiveRecord::PreparedStatementCacheExpired error
|
11
|
+
# is raised. This handles a specific scenario where there is a migration run during a deploy
|
12
|
+
# that changes one or more columns used in a cached PostgreSQL prepared statement.
|
13
|
+
# We rescue it here and retry (once) the txn to prevent users getting an error when they try
|
14
|
+
# to select/update data moments after the deploy.
|
15
|
+
#
|
16
|
+
# Do not use this for transactions with side-effects unless it is acceptable
|
17
|
+
# for these side-effects to occasionally happen twice.
|
18
|
+
#
|
19
|
+
# Note we define this method in the included block (not the class_methods block as you would
|
20
|
+
# expect) becuase in the latter case a client calling #transaction would get the including
|
21
|
+
# class's transaction method, not the overriding one defined here. Using 'included' allows
|
22
|
+
# use to get around this. See comments in
|
23
|
+
# https://github.com/rails/rails/blob/master/activesupport/lib/active_support/concern.rb
|
24
|
+
#
|
25
|
+
def self.transaction(*args, &block)
|
26
|
+
retried ||= false
|
27
|
+
super
|
28
|
+
rescue ActiveRecord::PreparedStatementCacheExpired
|
29
|
+
if retried
|
30
|
+
raise
|
31
|
+
else
|
32
|
+
retried = true
|
33
|
+
retry
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -30,7 +30,7 @@ module Renalware
|
|
30
30
|
scope :with_profile, lambda {
|
31
31
|
joins(<<-SQL)
|
32
32
|
left outer join access_profiles on (access_profiles.patient_id = patients.id
|
33
|
-
and access_profiles.terminated_on is
|
33
|
+
and access_profiles.terminated_on is null
|
34
34
|
and access_profiles.started_on <= current_date)
|
35
35
|
left outer join access_types on access_types.id = access_profiles.type_id
|
36
36
|
SQL
|
@@ -6,6 +6,7 @@ module Renalware
|
|
6
6
|
module Letters
|
7
7
|
class Letter < ApplicationRecord
|
8
8
|
include Accountable
|
9
|
+
include TransactionRetry
|
9
10
|
extend Enumerize
|
10
11
|
# The letterhead is the only site-specific element in the letter, so we use this
|
11
12
|
# to determine site-specific settings - in this case whether the letter should contain
|
@@ -19,7 +19,7 @@ module Renalware
|
|
19
19
|
validates :patient, presence: true
|
20
20
|
validates :started_on, presence: true
|
21
21
|
validates :description, presence: true
|
22
|
-
validates :started_on, timeliness: { type: :date }
|
22
|
+
validates :started_on, timeliness: { type: :date, on_or_before: -> { Date.current } }
|
23
23
|
validate :validate_modality_starts_later_than_previous, on: :create, if: :patient
|
24
24
|
|
25
25
|
def terminate_by(user, on:)
|
@@ -99,10 +99,11 @@ module Renalware
|
|
99
99
|
validates :born_on, timeliness: { type: :date }
|
100
100
|
validates :email, email: true, allow_blank: true
|
101
101
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
102
|
+
attr_accessor :skip_death_validations
|
103
|
+
with_options if: :validate_death_attributes?, on: :update do
|
104
|
+
validates :died_on, presence: true
|
105
|
+
validates :died_on, timeliness: { type: :date }
|
106
|
+
validates :first_cause_id, presence: true
|
106
107
|
end
|
107
108
|
|
108
109
|
scope :dead, -> { where.not(died_on: nil) }
|
@@ -137,6 +138,10 @@ module Renalware
|
|
137
138
|
self.primary_care_physician == primary_care_physician
|
138
139
|
end
|
139
140
|
|
141
|
+
def validate_death_attributes?
|
142
|
+
current_modality_death? && !skip_death_validations
|
143
|
+
end
|
144
|
+
|
140
145
|
def current_modality_death?
|
141
146
|
return false if current_modality.blank?
|
142
147
|
|
@@ -49,6 +49,12 @@ module Renalware
|
|
49
49
|
|
50
50
|
patient = mapper_factory.new(message, patient).fetch
|
51
51
|
patient.by = SystemUser.find
|
52
|
+
# If we update a patient who has the Death modality, and they do not have certain
|
53
|
+
# fields set yet like cause of death, we don't want those validations so stop us
|
54
|
+
# updating - so we set a flag here to effectively skip death attribute validations
|
55
|
+
# e.g. Died on can't be blank, Died on is not a valid date, First cause can't be blank
|
56
|
+
patient.skip_death_validations = true
|
57
|
+
|
52
58
|
patient.save!
|
53
59
|
patient
|
54
60
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
table
|
2
2
|
thead
|
3
3
|
tr
|
4
|
+
th.togglers= table_toggler
|
4
5
|
th.col-width-tiny
|
5
6
|
th.col-width-date= t(".assessed_on")
|
6
7
|
th= t(".modality_description")
|
@@ -21,9 +22,9 @@ table
|
|
21
22
|
tbody
|
22
23
|
- body_compositions.each do |body_composition|
|
23
24
|
tr
|
24
|
-
td
|
25
|
+
td= toggler("#bcm-quick-preview-#{body_composition.id}")
|
26
|
+
td.actions
|
25
27
|
= link_to "View", patient_clinical_body_composition_path(patient, body_composition)
|
26
|
-
= pipe_separator
|
27
28
|
= link_to "Edit", edit_patient_clinical_body_composition_path(patient, body_composition)
|
28
29
|
td= body_composition.assessed_on
|
29
30
|
td= body_composition.modality_description&.name
|
@@ -40,3 +41,9 @@ table
|
|
40
41
|
td= body_composition.adipose_tissue_mass
|
41
42
|
td= body_composition.body_cell_mass
|
42
43
|
td= body_composition.quality_of_reading
|
44
|
+
|
45
|
+
= content_tag(:tr, id: "bcm-quick-preview-#{body_composition.id}", style: "display: none")
|
46
|
+
td(colspan=16)
|
47
|
+
.quick-preview
|
48
|
+
= definition_list_for(body_composition, size: :large) do |list|
|
49
|
+
= list.definition(:notes){ |value| simple_format(value) }
|
@@ -1,19 +1,14 @@
|
|
1
1
|
tr(class="#{'dna' if clinic_visit.did_not_attend?}")
|
2
|
-
td
|
2
|
+
td.noprint= toggler("#clinic_visit-quick-preview-#{clinic_visit.id}")
|
3
|
+
td.noprint.actions
|
3
4
|
- if policy(clinic_visit).edit?
|
4
5
|
= link_to "Edit",
|
5
6
|
edit_patient_clinic_visit_path(patient, clinic_visit)
|
6
|
-
= pipe_separator
|
7
|
-
= link_to("Toggle",
|
8
|
-
"#clinic_visit-quick-preview-#{clinic_visit.id}",
|
9
|
-
data: { behaviour: "toggler" })
|
10
|
-
= pipe_separator
|
11
7
|
- if policy(clinic_visit).destroy?
|
12
8
|
= link_to "Delete",
|
13
9
|
patient_clinic_visit_path(patient, clinic_visit),
|
14
10
|
method: :delete,
|
15
11
|
data: { confirm: I18n.t("prompts.confirm_delete") }
|
16
|
-
= pipe_separator
|
17
12
|
= link_to_clinic_visit_letter(patient, clinic_visit)
|
18
13
|
td.date-time= l(clinic_visit.date)
|
19
14
|
td= yes_no(clinic_visit.did_not_attend)
|
@@ -29,7 +24,7 @@ tr(class="#{'dna' if clinic_visit.did_not_attend?}")
|
|
29
24
|
td= clinic_visit.urine_protein&.text
|
30
25
|
td.created-by= clinic_visit.created_by
|
31
26
|
= content_tag(:tr, id: "clinic_visit-quick-preview-#{clinic_visit.id}", style: "display: none")
|
32
|
-
td(colspan=
|
27
|
+
td(colspan=15)
|
33
28
|
.quick-preview
|
34
29
|
= definition_list_for(clinic_visit, size: :large) do |list|
|
35
30
|
= list.definition(:notes){ |value| simple_format(value) }
|
@@ -1,19 +1,20 @@
|
|
1
1
|
table.global-clinic-visits
|
2
2
|
thead
|
3
3
|
tr
|
4
|
-
th.
|
4
|
+
th.togglers= table_toggler
|
5
|
+
th.col-width-actions-dropdown.no-print
|
5
6
|
th.col-width-date Date
|
6
7
|
th.col-width-tiny DNA
|
7
|
-
th.col-width-
|
8
|
+
th.col-width-large Patient
|
8
9
|
th.col-width-nhs-no NHS Number
|
9
10
|
th.col-width-tiny Sex
|
10
11
|
th.col-width-tiny Age
|
11
|
-
th
|
12
|
-
th
|
12
|
+
th Modality
|
13
|
+
th Clinic Type
|
13
14
|
th.col-width-tiny BMI
|
14
15
|
th.col-width-tiny BP
|
15
16
|
th.col-width-small.no-print
|
16
|
-
th
|
17
|
+
th Created by
|
17
18
|
tbody
|
18
19
|
/ Note we can't use cached: true yet when rendering the events collection, as each row is
|
19
20
|
/ used in a different context and displays there slightly differently, for example showing
|