renalware-core 2.0.5 → 2.0.7

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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/renalware/primary_care_physician_search.js +7 -3
  3. data/app/assets/stylesheets/renalware/modules/_letters.scss +5 -0
  4. data/app/assets/stylesheets/renalware/modules/_patients.scss +11 -0
  5. data/app/assets/stylesheets/renalware/modules/_snippets.scss +45 -1
  6. data/app/assets/stylesheets/renalware/partials/_errors.scss +1 -0
  7. data/app/assets/stylesheets/renalware/partials/_tables.scss +14 -0
  8. data/app/controllers/renalware/admissions/consults_controller.rb +5 -1
  9. data/app/controllers/renalware/clinics/clinic_visits_controller.rb +1 -1
  10. data/app/controllers/renalware/hd/current_profile_controller.rb +1 -1
  11. data/app/controllers/renalware/hd/preference_sets_controller.rb +1 -1
  12. data/app/controllers/renalware/medications/prescriptions_controller.rb +0 -1
  13. data/app/controllers/renalware/patients/practices_controller.rb +21 -1
  14. data/app/controllers/renalware/patients/worry_controller.rb +1 -1
  15. data/app/controllers/renalware/renal/aki_alerts_controller.rb +1 -1
  16. data/app/controllers/renalware/renal/profiles_controller.rb +1 -1
  17. data/app/controllers/renalware/transplants/donor_workups_controller.rb +1 -1
  18. data/app/controllers/renalware/transplants/recipient_workups_controller.rb +1 -1
  19. data/app/helpers/renalware/layout_helper.rb +2 -2
  20. data/app/models/concerns/renalware/patients_ransack_helper.rb +0 -1
  21. data/app/models/renalware/admissions/consult.rb +1 -1
  22. data/app/models/renalware/admissions/consult_query.rb +19 -3
  23. data/app/models/renalware/feeds/files/practices/convert_xml_to_csv.rb +6 -2
  24. data/app/models/renalware/letters/letter_factory.rb +3 -1
  25. data/app/models/renalware/letters/recipient.rb +34 -9
  26. data/app/models/renalware/patients/patient_hospital_identifiers.rb +4 -0
  27. data/app/models/renalware/patients/practice_search_query.rb +5 -2
  28. data/app/models/renalware/transplants/registration_status.rb +1 -1
  29. data/app/presenters/renalware/hd/session_presenter.rb +2 -1
  30. data/app/presenters/renalware/summary_part.rb +1 -1
  31. data/app/views/renalware/addresses/_address.html.slim +2 -2
  32. data/app/views/renalware/addresses/_form.html.slim +3 -3
  33. data/app/views/renalware/admissions/admissions/_form.html.slim +1 -1
  34. data/app/views/renalware/admissions/admissions/_table.html.slim +6 -7
  35. data/app/views/renalware/admissions/consults/_filters.html.slim +12 -9
  36. data/app/views/renalware/admissions/consults/_form.html.slim +2 -2
  37. data/app/views/renalware/admissions/consults/_table.html.slim +45 -25
  38. data/app/views/renalware/api/ukrdc/patients/_lab_orders.xml.builder +1 -1
  39. data/app/views/renalware/api/ukrdc/patients/_observations.xml.builder +1 -1
  40. data/app/views/renalware/directory/people/_address_form.html.slim +3 -3
  41. data/app/views/renalware/letters/contacts/_new.html.slim +10 -8
  42. data/app/views/renalware/letters/contacts/_new_person.html.slim +15 -19
  43. data/app/views/renalware/letters/contacts/_person_form.html.slim +48 -25
  44. data/app/views/renalware/letters/formatted_letters/_letter.html.slim +14 -3
  45. data/app/views/renalware/letters/letters/_cc_recipient_form.html.slim +1 -1
  46. data/app/views/renalware/letters/letters/_form.html.slim +1 -1
  47. data/app/views/renalware/letters/letters/_main_recipient.html.slim +5 -5
  48. data/app/views/renalware/letters/letters/contact_added.js.erb +4 -2
  49. data/app/views/renalware/patients/alerts/_list.html.slim +1 -1
  50. data/app/views/renalware/problems/problems/edit.html.slim +2 -3
  51. data/app/views/renalware/problems/problems/new.html.slim +2 -3
  52. data/app/views/renalware/snippets/snippets/_list.html.slim +3 -8
  53. data/app/views/renalware/snippets/snippets/_row.html.slim +5 -4
  54. data/app/views/renalware/snippets/snippets/_table.html.slim +24 -23
  55. data/app/views/renalware/snippets/snippets/edit.html.slim +2 -3
  56. data/app/views/renalware/snippets/snippets/index.html.slim +3 -2
  57. data/app/views/renalware/snippets/snippets/new.html.slim +2 -5
  58. data/lib/renalware/version.rb +1 -1
  59. metadata +2 -2
@@ -1,29 +1,52 @@
1
1
  = f.simple_fields_for :person do |ff|
2
- = field_set_tag "Person" do
3
- = ff.input :title
4
- = ff.input :given_name
5
- = ff.input :family_name
2
+ / article
3
+ / header
4
+ / h2 Person
5
+ .row
6
+ .columns.small-2
7
+ = ff.input :title
8
+ .columns.small-5
9
+ = ff.input :given_name
10
+ .columns.small-5
11
+ = ff.input :family_name
6
12
 
7
- = field_set_tag "Address" do
8
- - ff.object.build_address
9
- = ff.simple_fields_for :address do |fa|
10
- = fa.input :name,
11
- placeholder: "If different than above (optional)"
12
- = fa.input :organisation_name,
13
- placeholder: "e.g. practice or hospital name (optional)"
14
- = fa.input :street_1
15
- = fa.input :street_2
16
- = fa.input :street_3
17
- = fa.input :town
18
- = fa.input :county
19
- = fa.input :postcode
20
- = fa.association :country
21
- = fa.input :telephone
22
- = fa.input :email
13
+ /= field_set_tag "Address" do
14
+ - ff.object.build_address
15
+ = ff.simple_fields_for :address do |fa|
16
+ / = fa.input :name,
17
+ / placeholder: "If different than above (optional)"
18
+ = fa.input :organisation_name,
19
+ placeholder: "e.g. practice or hospital name (optional)"
20
+ .row
21
+ .columns.small-6
22
+ = fa.input :street_1
23
+ .columns.small-6
24
+ = fa.input :street_2
25
+ .columns.small-6
26
+ = fa.input :street_3
27
+ .columns.small-6
28
+ = fa.input :town
29
+ .columns.small-6
30
+ = fa.input :county
31
+ .columns.small-6
32
+ = fa.input :postcode
33
+ .columns.small-6
34
+ = fa.association :country
35
+ .columns.small-6
36
+ = fa.input :telephone
37
+ .columns.small-6
38
+ = fa.input :email
39
+ .columns.small-6
40
+ // Disable `for` attribute, so it works when multiple contact form on the page
41
+ = f.input :default_cc, label_html: { for: nil }
42
+
43
+ .row
44
+ .columns.small-6
45
+ = f.input :description_id, collection: contact_descriptions
46
+ .columns.small-6
47
+ = f.input :other_description
48
+ .row
49
+ .columns.small-12
50
+ = f.input :notes, as: :text, input_html: { rows: 2 }
23
51
 
24
- = f.input :description_id, collection: contact_descriptions
25
- = f.input :other_description
26
- = f.input :notes, as: :text, input_html: { rows: 2 }
27
52
 
28
- // Disable `for` attribute, so it works when multiple contact form on the page
29
- = f.input :default_cc, label_html: { for: nil }
@@ -240,11 +240,23 @@ scss:
240
240
  list-style-position: outside;
241
241
  margin: 0;
242
242
  padding: 0;
243
+
244
+ li {
245
+ margin-bottom: .2rem;
246
+ }
243
247
  }
244
248
 
245
249
  h3 {
246
250
  font-size: 1em;
247
- margin-bottom: 20px;
251
+ margin: 1rem 0;
252
+ }
253
+
254
+ p.private {
255
+ margin: 1rem 0;
256
+ }
257
+
258
+ .address {
259
+ margin-bottom: 6rem;
248
260
  }
249
261
  }
250
262
  }
@@ -314,8 +326,7 @@ scss:
314
326
  - letter.electronic_cc_recipients.each do |user|
315
327
  li= user.professional_signature
316
328
 
317
- .private
318
- p Private and confidential
329
+ p.private Private and confidential
319
330
 
320
331
  - letter.cc_recipients.each do |cc|
321
332
  .address.nobreak
@@ -8,5 +8,5 @@ tr
8
8
 
9
9
  = check_box_tag("letter[cc_recipients_attributes][][_keep]", "1",
10
10
  recipient.present?, id: check_box_id)
11
- td= label_tag check_box_id, contact.address
11
+ td= label_tag check_box_id, [contact.to_s, contact.address].compact.join(" - ")
12
12
  td= label_tag check_box_id, contact.description_name
@@ -29,7 +29,7 @@ ruby:
29
29
  }
30
30
  = hidden_field_tag "description_id"
31
31
  = f.input :clinical, as: :hidden
32
- = f.input :issued_on, as: :date_picker, wrapper: :horizontal_datepicker
32
+ = f.input :issued_on, as: :date_picker
33
33
  = f.association :author,
34
34
  as: :user_picker,
35
35
  collection: Renalware::System::UsersPresenter.new.list_for_dropdown( \
@@ -6,11 +6,10 @@ article
6
6
 
7
7
  .radio_buttons.row.optional.letter_main_recipient_person_role.field_with_hint
8
8
  .columns.small-12
9
- .hint
10
- - if patient.primary_care_physician.nil? || patient.practice.nil?
11
- | No option to send to GP as patient has no Practice and/or GP
12
- br
13
- =f.object.patient_cc_hint
9
+ - if patient.primary_care_physician.nil? || patient.practice.nil?
10
+ .panel
11
+ | No option to send to GP as patient is missing a practice or GP
12
+
14
13
  = fmr.collection_radio_buttons(:person_role,
15
14
  f.object.person_roles,
16
15
  :second,
@@ -23,6 +22,7 @@ article
23
22
  class: "radio_buttons recipient-person-role-picker has_salutation") \
24
23
  + b.text \
25
24
  }
25
+ .hint=f.object.patient_cc_hint
26
26
 
27
27
  = fmr.input :id, as: :hidden
28
28
 
@@ -1,4 +1,6 @@
1
1
  $("#letter_main_recipient_attributes_addressee_id")
2
- .append('<option value="<%= @contact.id %>"><%= @contact.name_and_description %></option>');
2
+ .append('<option value="<%= @contact.id %>" data-salutation="<%=@contact.salutation%>" data-class=".has_salutation"><%= @contact.name_and_description %></option>');
3
+ setTimeout(function() { $("#letter_main_recipient_attributes_addressee_id").trigger("change") }, 200);
4
+
3
5
  $("#letter-ccs table tbody")
4
- .append('<%= j render(partial: "cc_recipient_form", object: @contact, as: :contact, locals: { letter: @letter }) %>');
6
+ .append('<%= j render(partial: "cc_recipient_form", object: @contact, as: :contact, locals: { letter: @letter }) %>');
@@ -1 +1 @@
1
- = render patient.alerts
1
+ = render partial: "/renalware/patients/alerts/alert", collection: patient.alerts
@@ -4,10 +4,9 @@
4
4
 
5
5
  = simple_form_for problem,
6
6
  url: patient_problem_path(patient, problem),
7
- html: { autocomplete: "off", class: "problem-form" },
8
- wrapper: :horizontal_form do |f|
7
+ html: { autocomplete: "off", class: "problem-form" } do |f|
9
8
 
10
- = f.input :description
9
+ = f.input :description, as: :text
11
10
  = f.button :button, "Save"
12
11
  span= " or "
13
12
  = link_to "cancel", patient_problems_path(patient)
@@ -2,10 +2,9 @@
2
2
 
3
3
  = simple_form_for problem,
4
4
  url: patient_problems_path(patient),
5
- html: { autocomplete: "off" },
6
- wrapper: :horizontal_form do |f|
5
+ html: { autocomplete: "off" } do |f|
7
6
 
8
- = f.input :description, wrapper: :horizontal_small
7
+ = f.input :description, as: :text
9
8
 
10
9
  = f.button :submit
11
10
  span= " or "
@@ -3,14 +3,9 @@
3
3
 
4
4
  .snippets(class=klass)
5
5
  .modal-header
6
- h1= t("#{i18n_scope}.page_title")
7
-
8
- = render "renalware/shared/modal_close_link" if remote
9
-
10
- - unless remote
11
- .columns.small-12
12
- = link_to "Create new", new_snippet_path, class: "button create-snippet right"
13
-
6
+ - if remote
7
+ h1= t("#{i18n_scope}.page_title")
8
+ = render "renalware/shared/modal_close_link"
14
9
  ul.tabs
15
10
  li(class= "#{'active' if author == :me}")
16
11
  = link_to snippets_path, remote: remote do
@@ -17,12 +17,13 @@ tr(data={ "snippet-id" => snippet.id, invocation_url: snippet_invocations_path(s
17
17
  "#",
18
18
  title: "Insert this snippet into the letter",
19
19
  class: "insert-snippet button compact alternative"
20
- td.css-toggle-container
21
- = tooltip_with_block(label: snippet.title) do
22
- = snippet.title
23
- td.css-toggle-container.body= snippet.body.html_safe
24
20
  - unless author == :me
25
21
  td.col-width-medium.author= snippet.author
22
+ td.css-toggle-container.title
23
+ = tooltip_with_block(label: snippet.title) do
24
+ = snippet.title
25
+ td.css-toggle-container.body
26
+ .body-content= snippet.body.html_safe
26
27
  - unless remote
27
28
  td.last_used_on
28
29
  = "#{snippet.last_used_on? ? l(snippet.last_used_on) : 'Never'} (#{snippet.times_used})"
@@ -1,26 +1,27 @@
1
1
  - delete_confirmation_msg = I18n.t("prompts.confirm_delete_with_model", model: "snippet")
2
2
 
3
- table.snippets
4
- thead
5
- tr
6
- th.col-width-toggle
7
- th.col-width-medium
8
- = sort_link([:renalware, search], :title)
9
- th(style="max-width: 100%")
10
- = sort_link([:renalware, search], :body)
11
- - unless author == :me
12
- th.col-width-medium.author
13
- = sort_link([:renalware, search], :author_family_name, t(".author"))
14
- - unless remote
15
- th.col-width-medium.last_used_on
16
- = sort_link([:renalware, search], :last_used_on, t(".last_used_on"))
17
- th.col-width-date-time.updated_at
18
- = sort_link([:renalware, search], :updated_at, t(".updated_at"))
3
+ .scrollable
4
+ table.snippets
5
+ thead
6
+ tr
19
7
  th.col-width-medium
20
- tbody
21
- = render partial: "row",
22
- collection: snippets,
23
- as: :snippet,
24
- locals: { author: author,
25
- delete_confirmation_msg: delete_confirmation_msg,
26
- remote: remote }
8
+ - unless author == :me
9
+ th.col-width-medium.author
10
+ = sort_link([:renalware, search], :author_family_name, t(".author"))
11
+ th.col-width-medium
12
+ = sort_link([:renalware, search], :title)
13
+ th(style="max-width: 100%")
14
+ = sort_link([:renalware, search], :body)
15
+ - unless remote
16
+ th.col-width-medium.last_used_on
17
+ = sort_link([:renalware, search], :last_used_on, t(".last_used_on"))
18
+ th.col-width-date-time.updated_at
19
+ = sort_link([:renalware, search], :updated_at, t(".updated_at"))
20
+ th.col-width-medium
21
+ tbody
22
+ = render partial: "row",
23
+ collection: snippets,
24
+ as: :snippet,
25
+ locals: { author: author,
26
+ delete_confirmation_msg: delete_confirmation_msg,
27
+ remote: remote }
@@ -1,5 +1,4 @@
1
- .row
2
-
3
- h1= t(".title")
1
+ = within_admin_layout(title: "Edit",
2
+ breadcrumbs: breadcrumb_for("Snippets", snippets_path)) do
4
3
 
5
4
  = render "form", snippet: snippet, submit_to_url: snippet_path(snippet)
@@ -1,4 +1,5 @@
1
- - content_for(:page_title){ t(".page_title") }
1
+ = content_for(:actions) do
2
+ = link_to "Create new", new_snippet_path, class: "button create-snippet right"
2
3
 
3
- .row.collapse
4
+ = within_admin_layout(title: "Snippets") do
4
5
  = render "list", snippets: snippets, search: search, author: author, remote: false
@@ -1,6 +1,3 @@
1
- - content_for(:page_title){ t(".title") }
2
-
3
- .row
4
- h1= t(".title")
5
-
1
+ = within_admin_layout(title: "New",
2
+ breadcrumbs: breadcrumb_for("Snippets", snippets_path)) do
6
3
  = render "form", snippet: snippet, submit_to_url: snippets_path
@@ -1,3 +1,3 @@
1
1
  module Renalware
2
- VERSION = "2.0.5".freeze
2
+ VERSION = "2.0.7".freeze
3
3
  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.5
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2018-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails