renalware-core 2.0.76 → 2.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 644e883f0c733d49ad49139eb2118a2387f3378db8a6fc9eb5b20eaf5dad4db2
4
- data.tar.gz: 71cd0139f74aa162bbaedb783d6ce450270de74a64b74751cf1873ead4b9829a
3
+ metadata.gz: 9f31b746ef727f7d62c938bd6978058aabd3eb52ab5d24529b0e28706446b961
4
+ data.tar.gz: a510872302ae102f5f78d0f0a92645baace889986336ee55d337313db005a33b
5
5
  SHA512:
6
- metadata.gz: 6dfe27f438b2f56ecaec02bda8abce84f8015ca5054f05b7e76bf6c405e6a0632f60013287e913b7e03aa0bf0a7f7ad8127742253fdecba60f3ce5277269abf0
7
- data.tar.gz: a007bf5ef7be7ee91722e27ac434ed7d49e8edf32cc6408dd048b613272f0938c7073dff9990419d201d711ef574433cfe3faac4835b53e78d8265d2f1f9353b
6
+ metadata.gz: e3f44451da960cba27e7608f53ca1ab6172d1767106a974ab07ab7415450ab2a2e41f83620752bb3af568787134cc1d185021d1af159ad366965e1bb25f0052b
7
+ data.tar.gz: d1139a781f293dceac77f83703841b8a6a3d158d7e449fa786e72cdc6954ce0edef34ed5d04828dce3240865ffe68b9d0cbccb39dfe99d7f140e58d9a94e2986
@@ -1,3 +1,4 @@
1
+
1
2
  // On forms with more than one submit button, apply the disable-with label to
2
3
  // only the clicked button, and just disable the other buttons.
3
4
  // See for instance the HD Session form.
@@ -32,9 +32,21 @@ table.contacts tbody td{
32
32
  }
33
33
 
34
34
  .letters {
35
- .quick-preview p {
36
- font-size: 0.9rem;
37
- line-height: 1rem;
35
+ .quick-preview {
36
+ font-size: .9rem;
37
+
38
+ p {
39
+ font-size: .9rem;
40
+ line-height: 1rem;
41
+ }
42
+
43
+ .admin-notes {
44
+ display: inline-block;
45
+ background-color: darken($table-even-row-colour, 10);
46
+ padding: .2rem;
47
+ margin: .5rem 0 0 0;
48
+ font-size: .9rem;
49
+ }
38
50
  }
39
51
 
40
52
  td {
@@ -1,4 +1,22 @@
1
1
  .simple_form {
2
+ /*
3
+ This class repositions the hint to the right of the input and adds a ? icon to the anchor.
4
+ Used for example in help popups/tooltips on forms.
5
+ */
6
+ .hint.hint-help-link {
7
+ display: inline-block;
8
+ margin-left: 1rem;
9
+
10
+ a {
11
+ font-size: 1.5rem;
12
+ @extend %fa-icon;
13
+ @extend .far;
14
+
15
+ &:before {
16
+ content: fa-content($fa-var-question-circle);
17
+ }
18
+ }
19
+ }
2
20
 
3
21
  fieldset {
4
22
  border: 0;
@@ -14,6 +14,7 @@ module Renalware
14
14
  render locals: { pet_adequacy_result: result, patient: patient }
15
15
  end
16
16
 
17
+ # rubocop:disable Metrics/AbcSize
17
18
  def create
18
19
  result = patient.pet_adequacy_results.new(pet_adequacy_result_params)
19
20
  authorize result
@@ -24,11 +25,13 @@ module Renalware
24
25
  render :new, locals: { pet_adequacy_result: result, patient: patient }
25
26
  end
26
27
  end
28
+ # rubocop:enable Metrics/AbcSize
27
29
 
28
30
  def edit
29
31
  render locals: { pet_adequacy_result: pet_adequacy_result, patient: patient }
30
32
  end
31
33
 
34
+ # rubocop:disable Metrics/AbcSize
32
35
  def update
33
36
  pet_adequacy_result.assign_attributes(pet_adequacy_result_params)
34
37
  if pet_adequacy_result.save
@@ -38,6 +41,7 @@ module Renalware
38
41
  render :edit, locals: { pet_adequacy_result: pet_adequacy_result, patient: patient }
39
42
  end
40
43
  end
44
+ # rubocop:enable Metrics/AbcSize
41
45
 
42
46
  def show
43
47
  render locals: { pet_adequacy_result: pet_adequacy_result, patient: patient }
@@ -62,7 +66,7 @@ module Renalware
62
66
  :crcl_total, :crcl_dialysate, :crcl_rrf,
63
67
  :daily_uf, :daily_urine, :date_rff, :creat_value, :dialysate_effluent_volume,
64
68
  :date_creat_clearance, :date_creat_value,
65
- :urine_urea_conc, :urine_creat_conc)
69
+ :urine_urea_conc, :urine_creat_conc, :dietry_protein_intake)
66
70
  .merge!(by: current_user)
67
71
  end
68
72
  end
@@ -40,8 +40,8 @@ module Renalware
40
40
  validates :blood_pressure, presence: true
41
41
  validates :weight_measured, presence: true
42
42
  validates :temperature_measured, presence: true
43
- validates :weight, presence: { if: ->{ weight_measured&.yes? } }
44
- validates :temperature, presence: { if: ->{ temperature_measured&.yes? } }
43
+ validates :weight, presence: { if: -> { weight_measured&.yes? } }
44
+ validates :temperature, presence: { if: -> { temperature_measured&.yes? } }
45
45
  validates :blood_pressure, "renalware/patients/blood_pressure_presence" => true
46
46
  end
47
47
  attribute :observations_before, Observations
@@ -57,6 +57,11 @@ module Renalware
57
57
  end
58
58
  attribute :dialysis, Dialysis
59
59
 
60
+ class Complications < Renalware::HD::SessionDocument::Complications
61
+ validates :line_exit_site_status, presence: true
62
+ end
63
+ attribute :complications, Complications
64
+
60
65
  validates :hdf, "renalware/patients/hdf_presence" => true, if: :hd_type_is_hdf?
61
66
 
62
67
  def hd_type_is_hdf?
@@ -32,7 +32,8 @@ module Renalware
32
32
  creat_value: 9999,
33
33
  dialysate_effluent_volume: 5,
34
34
  urine_urea_conc: 999,
35
- urine_creat_conc: 9999
35
+ urine_creat_conc: 9999,
36
+ dietry_protein_intake: 2
36
37
  }.freeze
37
38
 
38
39
  # This map is currently for documentation purposes but may be useful when exporting
@@ -155,6 +156,11 @@ module Renalware
155
156
  only_integer: true
156
157
  },
157
158
  allow_nil: true
159
+ validates :dietry_protein_intake,
160
+ numericality: {
161
+ less_than_or_equal_to: MAXIMUMS[:dietry_protein_intake]
162
+ },
163
+ allow_nil: true
158
164
  end
159
165
  end
160
166
  end
@@ -16,4 +16,9 @@ tr(class=letter.state.dasherize)
16
16
  td
17
17
  td(colspan=7)
18
18
  .quick-preview
19
- = simple_format letter.body
19
+ p
20
+ = simple_format letter.body
21
+ - if letter.notes.present?
22
+ .admin-notes
23
+ i Notes:&nbsp;&nbsp;
24
+ = letter.notes
@@ -47,12 +47,18 @@ ruby:
47
47
  wrapper: :horizontal_small
48
48
  = fcm.input :access_side, wrapper: :horizontal_small
49
49
  = fcm.input :access_confirmed, as: :boolean, wrapper: :horizontal_medium
50
- = fcm.input :is_access_first_use, as: :inline_radio_buttons, wrapper: :horizontal_medium
51
- = fcm.input :fistula_plus_line, as: :inline_radio_buttons, wrapper: :horizontal_medium
52
- = fcm.input :single_needle, as: :inline_radio_buttons, wrapper: :horizontal_medium
53
- = fcm.input :lines_reversed, as: :inline_radio_buttons, wrapper: :horizontal_medium
54
- = fcm.input :machine_no, wrapper: :horizontal_tiny
55
- = f.association :dialysate, wrapper: :horizontal_small
50
+ = fcm.input :is_access_first_use, as: :inline_radio_buttons, wrapper: :horizontal_medium
51
+ = fcm.input :fistula_plus_line, as: :inline_radio_buttons, wrapper: :horizontal_medium
52
+ = fcm.input :single_needle, as: :inline_radio_buttons, wrapper: :horizontal_medium
53
+ = fcm.input :lines_reversed, as: :inline_radio_buttons, wrapper: :horizontal_medium
54
+
55
+ = fd.simple_fields_for :complications, fd.object.complications do |fcm|
56
+ = fcm.input :access_site_status, wrapper: :horizontal_small
57
+ = fcm.input :line_exit_site_status,
58
+ wrapper: :horizontal_tiny,
59
+ hint: link_to("", asset_path("renalware/hd/mr_victor.jpg"),
60
+ data: {"reveal-id" => "mr-vistor-help-modal" }),
61
+ hint_html: { class: "hint-help-link" }
56
62
 
57
63
  = render layout: "renalware/shared/fieldset",
58
64
  locals: { legend: "Pre-Dialysis Observations", name: "before" } do
@@ -86,8 +92,11 @@ ruby:
86
92
  = fcm.input :flow_rate, collection: fcm.object.class.flow_rates, wrapper: :horizontal_tiny
87
93
  = fcm.input :blood_flow, wrapper: :horizontal_tiny
88
94
  = fcm.input :machine_urr, wrapper: :horizontal_tiny
89
- = fcm.input :machine_ktv, wrapper: :horizontal_tiny
90
95
  = fcm.input :litres_processed, wrapper: :horizontal_tiny
96
+ = f.association :dialysate, wrapper: :horizontal_small
97
+ = fcm.input :machine_ktv, wrapper: :horizontal_tiny
98
+ = fd.simple_fields_for :info, fd.object.info do |fi|
99
+ = fi.input :machine_no, wrapper: :horizontal_tiny
91
100
 
92
101
  = render layout: "renalware/shared/fieldset",
93
102
  locals: { legend: "HDF", name: "hdf" } do
@@ -113,8 +122,8 @@ ruby:
113
122
  = render layout: "renalware/shared/fieldset",
114
123
  locals: { legend: "Notes/Complications", name: "complications" } do
115
124
  = fd.simple_fields_for :complications, fd.object.complications do |fcm|
116
- = fcm.input :access_site_status, wrapper: :horizontal_small
117
- = fcm.input :line_exit_site_status, wrapper: :horizontal_small
125
+ / = fcm.input :access_site_status, wrapper: :horizontal_small
126
+ / = fcm.input :line_exit_site_status, wrapper: :horizontal_small
118
127
  = fcm.input :was_dressing_changed, as: :inline_radio_buttons, wrapper: :horizontal_small
119
128
  = fcm.input :had_mrsa_swab, as: :inline_radio_buttons, wrapper: :horizontal_small
120
129
  = fcm.input :had_mssa_swab, as: :inline_radio_buttons, wrapper: :horizontal_small
@@ -130,3 +139,18 @@ ruby:
130
139
  .row
131
140
  .large-12.columns
132
141
  = render "form_actions", f: f, back_path: back_path, session: session, patient: @patient
142
+
143
+ / Failed in all attempts to override close_on_background_click using eg data-options or any
144
+ / variation of e.g. data-options="closeOnBackgroundClick:false"
145
+ / data-options="close_on_background_click:false"
146
+ / I can only assume its not possible so we would need to use another handler top initialize modals
147
+ / that allow a bg click to close.
148
+ #mr-vistor-help-modal.reveal-modal.medium(data-reveal style="width: 600px")
149
+ .modal
150
+ .modal__header
151
+ h2 MR VICTOR
152
+ | &nbsp;
153
+ span Multi Racial Visual Inspection Catheter Tool Observation Record
154
+ = render "renalware/shared/modal_close_link"
155
+ .modal__body(style="text-align: center")
156
+ = image_tag(asset_path("renalware/hd/mr_victor.jpg"))
@@ -30,3 +30,7 @@
30
30
  td(colspan=8)
31
31
  .quick-preview
32
32
  = simple_format letter.body
33
+ - if letter.notes.present?
34
+ .admin-notes
35
+ i Notes:&nbsp;&nbsp;
36
+ = letter.notes
@@ -47,6 +47,11 @@ tr(class=letter.state.dasherize)
47
47
  td.col-width-medium-with-ellipsis= letter.description
48
48
  = content_tag(:tr, id: "quick-preview-#{letter.id}", style: "display: none")
49
49
  td
50
- td(colspan=10)
50
+ td(colspan=11)
51
51
  .quick-preview
52
52
  = simple_format letter.body
53
+ - if letter.notes.present?
54
+ .admin-notes
55
+ p
56
+ | Notes:&nbsp;&nbsp;
57
+ = letter.notes
@@ -26,6 +26,7 @@
26
26
  = f.input :date_creat_value, as: :date_picker, wrapper: :horizontal_datepicker
27
27
  = f.input :urine_urea_conc, wrapper: :horizontal_small
28
28
  = f.input :urine_creat_conc, wrapper: :horizontal_small
29
+ = f.input :dietry_protein_intake, wrapper: :horizontal_small
29
30
 
30
31
  = submit_tag "Save", class: "button"
31
32
  span= " or "
@@ -28,3 +28,4 @@
28
28
  = list.definition(:date_creat_value) { |value| l value }
29
29
  = list.definition(:urine_urea_conc)
30
30
  = list.definition(:urine_creat_conc)
31
+ = list.definition(:dietry_protein_intake)
@@ -104,6 +104,7 @@ en:
104
104
  erythema: Erythema
105
105
  purulent: Purulent
106
106
  line_exit_site_status:
107
+ 99: Not Applicable
107
108
  0: 0
108
109
  1: 1
109
110
  2: 2
@@ -0,0 +1,13 @@
1
+ class AddDietryProteinIntakeToPETAdequacyResults < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_column(
5
+ :pd_pet_adequacy_results,
6
+ :dietry_protein_intake,
7
+ :decimal,
8
+ scale: 2,
9
+ precision: 8
10
+ )
11
+ end
12
+ end
13
+ end
@@ -145,6 +145,7 @@ module Renalware
145
145
  renalware/favicon/safari-pinned-tab.svg
146
146
  renalware/clippy.svg
147
147
  renalware/print-button-example.png
148
+ renalware/hd/mr_victor.jpg
148
149
  )
149
150
  app.config.assets.paths <<
150
151
  Rails.root.join(config.root, "vendor", "assets", "javascripts", "renalware")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.76"
4
+ VERSION = "2.0.77"
5
5
  end
@@ -61,10 +61,15 @@ FactoryBot.define do
61
61
  blood_pressure factory: :blood_pressure, strategy: :marshal_dump
62
62
  end
63
63
 
64
+ factory :hd_session_document_complications, class: OpenStruct do
65
+ line_exit_site_status { "0" }
66
+ end
67
+
64
68
  factory :hd_session_document, class: OpenStruct do
65
69
  info factory: :hd_session_document_info, strategy: :marshal_dump
66
70
  dialysis factory: :hd_session_document_dialysis, strategy: :marshal_dump
67
71
  observations_before factory: :hd_session_document_observations_before, strategy: :marshal_dump
68
72
  observations_after factory: :hd_session_document_observations_after, strategy: :marshal_dump
73
+ complications factory: :hd_session_document_complications, strategy: :marshal_dump
69
74
  end
70
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.76
4
+ version: 2.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-02 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_type
@@ -965,6 +965,7 @@ files:
965
965
  - app/assets/images/renalware/favicon/manifest.json
966
966
  - app/assets/images/renalware/favicon/mstile-150x150.png
967
967
  - app/assets/images/renalware/favicon/safari-pinned-tab.svg
968
+ - app/assets/images/renalware/hd/mr_victor.jpg
968
969
  - app/assets/images/renalware/kidney.png
969
970
  - app/assets/images/renalware/nhs_a4_letter_logo_black.png
970
971
  - app/assets/images/renalware/nhs_a4_letter_logo_blue.png
@@ -3447,6 +3448,7 @@ files:
3447
3448
  - db/migrate/20190315125638_add_timestamps_to_pathology_description_tables.rb
3448
3449
  - db/migrate/20190401105149_create_function_for_hl7_insertion_from_mirth.rb
3449
3450
  - db/migrate/20190422095620_streamline_daily_summary_reports.rb
3451
+ - db/migrate/20190424101709_add_dietry_protein_intake_to_pet_adequacy_results.rb
3450
3452
  - db/seeds.rb
3451
3453
  - db/seeds/default/accesses/access_pd_catheter_insertion_techniques.csv
3452
3454
  - db/seeds/default/accesses/access_pd_catheter_insertion_techniques.rb