renalware-core 2.0.101 → 2.0.102

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/renalware/pd/regimes_controller.rb +1 -0
  3. data/app/models/renalware/pd/regime.rb +15 -2
  4. data/app/models/renalware/renal/profile.rb +3 -5
  5. data/app/models/renalware/ukrdc/transmission_log.rb +1 -1
  6. data/app/presenters/renalware/letters/letter_presenter.rb +4 -0
  7. data/app/views/renalware/admin/feeds/files/index.html.slim +0 -2
  8. data/app/views/renalware/admin/users/index.html.slim +0 -1
  9. data/app/views/renalware/admissions/consults/edit.html.slim +0 -1
  10. data/app/views/renalware/admissions/consults/index.pdf.slim +0 -1
  11. data/app/views/renalware/api/ukrdc/patients/_documents.xml.builder +5 -3
  12. data/app/views/renalware/api/ukrdc/patients/_hd_session_observations.xml.builder +1 -2
  13. data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder +2 -0
  14. data/app/views/renalware/api/ukrdc/patients/treatments/_pd.xml.builder +1 -1
  15. data/app/views/renalware/clinics/appointments/index.html.slim +0 -1
  16. data/app/views/renalware/devise/registrations/new.html.slim +0 -1
  17. data/app/views/renalware/hd/mdm_patients/_filters.html.slim +0 -1
  18. data/app/views/renalware/hd/sessions/_row.html.slim +0 -1
  19. data/app/views/renalware/hd/sessions/_thead.html.slim +0 -1
  20. data/app/views/renalware/layouts/pdf.pdf.slim +0 -1
  21. data/app/views/renalware/letters/contacts/_new_person.html.slim +0 -1
  22. data/app/views/renalware/letters/contacts/_person_form.html.slim +0 -2
  23. data/app/views/renalware/letters/letters/_main_recipient.html.slim +1 -1
  24. data/app/views/renalware/low_clearance/profiles/edit.html.slim +0 -1
  25. data/app/views/renalware/patients/clinical_summaries/show.html.slim +0 -1
  26. data/app/views/renalware/patients/patients/_form.html.slim +1 -1
  27. data/app/views/renalware/patients/patients/_patient.html.slim +1 -1
  28. data/app/views/renalware/patients/side_menu/_actions.html.slim +0 -1
  29. data/app/views/renalware/pd/regimes/_form.html.slim +3 -0
  30. data/app/views/renalware/pd/regimes/show.html.slim +7 -1
  31. data/app/views/renalware/renal/aki_alerts/_filters.html.slim +1 -1
  32. data/app/views/renalware/shared/documents/_year_dated_diagnosis_input.html.slim +0 -1
  33. data/app/views/renalware/system/messages/_message.html.slim +1 -1
  34. data/app/views/renalware/transplants/recipient_followups/_form.html.slim +1 -2
  35. data/app/views/renalware/transplants/recipient_operations/new.html.slim +2 -2
  36. data/app/views/renalware/ukrdc/summary_mailer/export_summary.html.slim +0 -1
  37. data/config/initializers/inflections.rb +1 -0
  38. data/config/locales/renalware/pd/regime.en.yml +15 -0
  39. data/db/migrate/20190830082736_add_pd_regime_columns_for_blt.rb +9 -0
  40. data/lib/renalware/version.rb +1 -1
  41. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be1dd365f062fce54445146b4623f13ae28d5ccc97c0530d78b8c4f9e57a4dc5
4
- data.tar.gz: 1b610c630f72fdb4f66585eeb3fbaf6d659ea5ea8f5b3effbbc2d5d12d64f898
3
+ metadata.gz: e133555ef2e268c6afe1886268f93c58e83e894946580483a919e39d93f1b077
4
+ data.tar.gz: 6f95064fe71e9d753935ce21c44cd46486e973f940777ff065be97fe502fa7bb
5
5
  SHA512:
6
- metadata.gz: ac5d3ea6f737b6bd9b2fef873c0caf1385747eedc1a010c1b7cb136b63422d223ea648e13cb73a6ae05c8afe9504efdb28f851644e131abf6e047c0908dd2ec7
7
- data.tar.gz: 535b8985590dc9ee936a504371a0807d4396c8a5e95c3e616217bd3646751de4ccf2cf5a91609a928abbc0395f33b824e0ff71947d761c43f6413626a026ba15
6
+ metadata.gz: c3e4ce78a878dd8933d791d30c7692056997b4194468c53924d2620f126192296e117c5b1d7db72b74e6fdd7a69ec63e3d95913497e43291038409ce1fcfa917
7
+ data.tar.gz: 3a377a342f2585c1341860e233dc7af417cd66d9cc43306bb3648fd9ca8f572cd01938134494a5b96b7d5734a032c00944e109dde7dfe08211f1f6ce57f1ec2d
@@ -85,6 +85,7 @@ module Renalware
85
85
  :tidal_indicator, :tidal_percentage, :no_cycles_per_apd,
86
86
  :apd_machine_pac, :dwell_time, :therapy_time, :fill_volume, :delivery_interval,
87
87
  :system_id, :last_fill_volume, :additional_manual_exchange_volume,
88
+ :exchanges_done_by, :exchanges_done_by_if_other, :exchanges_done_by_notes,
88
89
  bags_attributes: [
89
90
  :id, :regime_id, :bag_type_id, :volume, :role, :capd_overnight_bag, :per_week,
90
91
  :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :_destroy
@@ -8,6 +8,20 @@ module Renalware
8
8
  extend Enumerize
9
9
 
10
10
  enumerize :assistance_type, in: %i(none setup connect disconnect connect_and_disconnect)
11
+ enumerize(
12
+ :exchanges_done_by,
13
+ in: %i(
14
+ by_patient
15
+ predominantly_by_patient
16
+ equally_between_patient_and_others
17
+ predominantly_by_others
18
+ only_by_others
19
+ )
20
+ )
21
+ enumerize(
22
+ :exchanges_done_by_if_other,
23
+ in: %i(spouse daughter_son_in_law others_specify mix_specify)
24
+ )
11
25
 
12
26
  belongs_to :patient, class_name: "Renalware::Patient", touch: true
13
27
  belongs_to :system
@@ -25,8 +39,7 @@ module Renalware
25
39
  validates :start_date, presence: true, timeliness: { type: :date }
26
40
  validates :end_date,
27
41
  timeliness: { type: :date, on_or_after: ->(regime) { regime.start_date } },
28
- allow_blank: true,
29
- allow_nil: true
42
+ allow_blank: true
30
43
  validates :treatment, presence: true
31
44
  validate :min_one_bag
32
45
 
@@ -18,17 +18,15 @@ module Renalware
18
18
  has_document class_name: "Renalware::Renal::ProfileDocument"
19
19
 
20
20
  validates :patient, presence: true, uniqueness: true
21
- validates :esrf_on, timeliness: { type: :date, allow_nil: true }, allow_blank: true
21
+ validates :esrf_on, timeliness: { type: :date }, allow_blank: true
22
22
  validates :first_seen_on,
23
23
  timeliness: {
24
- type: :date,
25
- allow_nil: true
24
+ type: :date
26
25
  },
27
26
  allow_blank: true
28
27
  validates :comorbidities_updated_on,
29
28
  timeliness: {
30
- type: :date,
31
- allow_nil: true
29
+ type: :date
32
30
  },
33
31
  allow_blank: true
34
32
 
@@ -8,7 +8,7 @@ module Renalware
8
8
  validates :sent_at, presence: true
9
9
  validates :status, presence: true
10
10
  belongs_to :patient, class_name: "Renalware::Patient"
11
- enum status: [:undefined, :error, :unsent_no_change_since_last_send, :sent]
11
+ enum status: { undefined: 0, error: 1, unsent_no_change_since_last_send: 2, sent: 3 }
12
12
  scope :ordered, -> { order(sent_at: :asc) }
13
13
 
14
14
  def self.with_logging(patient, request_uuid)
@@ -91,6 +91,10 @@ module Renalware
91
91
  letterhead.site_code
92
92
  end
93
93
 
94
+ def hospital_unit_renal_registry_code
95
+ ::Renalware::Hospitals::Unit.find_by(unit_code: hospital_unit_code)&.renal_registry_code
96
+ end
97
+
94
98
  def title
95
99
  pdf_stateless_filename
96
100
  end
@@ -56,5 +56,3 @@
56
56
  - if defined?(delayed_job_path)
57
57
  br
58
58
  = "You can also see those jobs #{link_to("here", delayed_job_path)} if you have access.".html_safe
59
-
60
-
@@ -26,7 +26,6 @@
26
26
  th.col-width-medium.show-for-xlarge-up Telephone #
27
27
  th.col-width-date-time.show-for-xlarge-up= sort_link(user_search, :created_at, "Added")
28
28
 
29
-
30
29
  tbody
31
30
  - users.each do |user|
32
31
  = content_tag_for(:tr, user) do
@@ -1,4 +1,3 @@
1
-
2
1
  = within_admin_layout( \
3
2
  title: "Edit",
4
3
  breadcrumbs: breadcrumb_for("Admission Consults", admissions_consults_path) \
@@ -7,4 +7,3 @@
7
7
  h2.muted= I18n.l(Time.zone.today)
8
8
  = render "filters"
9
9
  = render "table", consults: consults
10
-
@@ -20,9 +20,11 @@ xml.Documents do
20
20
  xml.Code letter.updated_by&.username
21
21
  xml.Description letter.updated_by
22
22
  end
23
- xml.EnteredAt do
24
- xml.CodingStandard "ODS"
25
- xml.Code letter.hospital_unit_code
23
+ if letter.hospital_unit_renal_registry_code.present?
24
+ xml.EnteredAt do
25
+ xml.CodingStandard "LOCAL"
26
+ xml.Code letter.hospital_unit_renal_registry_code
27
+ end
26
28
  end
27
29
  xml.FileType "application/pdf"
28
30
  xml.FileName letter.pdf_stateless_filename
@@ -14,8 +14,7 @@ observation_times = {
14
14
  measurements = {
15
15
  "blood_pressure.systolic" => observations.blood_pressure&.systolic,
16
16
  "blood_pressure.diastolic" => observations.blood_pressure&.diastolic,
17
- "weight" => observations.weight,
18
- "bm_stix" => observations.bm_stix,
17
+ "weight" => observations.weight
19
18
  }
20
19
 
21
20
  if observations.temperature_measured == :yes
@@ -21,6 +21,8 @@ xml.LabOrder do
21
21
  # end
22
22
  xml.OrderCategory do
23
23
  xml.Code request.description.code
24
+ # xml.CodingStandard "LOCAL"
25
+ # xml.Description "Standard Renal Tests"
24
26
  end
25
27
  xml.SpecimenCollectedTime request.requested_at&.iso8601
26
28
  # xml.SpecimenReceivedTime "TODO"
@@ -3,7 +3,7 @@
3
3
  xml = builder
4
4
 
5
5
  xml.Treatment do
6
- xml.EncounterNumber [treatment.modality_id,treatment.pd_regime_id].compact.join("-")
6
+ xml.EncounterNumber [treatment.modality_id, treatment.pd_regime_id].compact.join("-")
7
7
  xml.EncounterType "N"
8
8
  xml.FromTime treatment.started_on&.iso8601
9
9
  xml.ToTime(treatment.ended_on&.iso8601) if treatment.ended_on.present?
@@ -14,7 +14,6 @@
14
14
  .medium-3.large-3.columns.actions.end
15
15
  = f.submit "Filter", class: "button"
16
16
 
17
-
18
17
  = content_for(:actions) do
19
18
  = link_to "Add",
20
19
  new_appointment_path,
@@ -20,7 +20,6 @@
20
20
  input_html: { autocomplete: "off" },
21
21
  wrapper: :horizontal_small
22
22
 
23
-
24
23
  .panel
25
24
  b
26
25
  | Check this box if you feel you should have full access to the database.
@@ -1,4 +1,3 @@
1
-
2
1
  = simple_form_for filter_form,
3
2
  as: :filter,
4
3
  url: filter_form.url,
@@ -28,7 +28,6 @@ tr.hd-session-row(class=[session.state, stripe_class])
28
28
  td.print-only(rowspan=2)= session.notes
29
29
  td.print-only= session.signed_on_by
30
30
 
31
-
32
31
  tr(class=[session.state, stripe_class])
33
32
  td= tooltip(label: session.summarised_access_used, content: session.access_used)
34
33
  td= session.end_time
@@ -21,7 +21,6 @@ thead
21
21
  th.col-width-notes.text-center.print-only(rowspan=3)= t(".notes")
22
22
  th.col-width-user.text-center.print-only= t(".user")
23
23
 
24
-
25
24
  tr.row2
26
25
  th(rowspan=2)= t(".access")
27
26
  th.col-width-time= t(".start_time")
@@ -4,7 +4,6 @@ html
4
4
  meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" /
5
5
  meta charset="utf-8" /
6
6
 
7
-
8
7
  = yield(:head)
9
8
  = wicked_pdf_stylesheet_link_tag "renalware/pdf"
10
9
  = yield(:head2)
@@ -24,4 +24,3 @@
24
24
  .large-12.columns
25
25
  = render "/renalware/letters/contacts/person_form", f: f,
26
26
  contact_descriptions: contact_descriptions
27
-
@@ -48,5 +48,3 @@
48
48
  .row
49
49
  .columns.small-12
50
50
  = f.input :notes, as: :text, input_html: { rows: 2 }
51
-
52
-
@@ -25,7 +25,7 @@ article.main-recipient
25
25
 
26
26
  = fmr.input :id, as: :hidden
27
27
 
28
- div#contact-selector(style="display: none")
28
+ #contact-selector(style="display: none")
29
29
  #contact-selector-input
30
30
  = fmr.input :addressee_id,
31
31
  as: :select,
@@ -1,7 +1,6 @@
1
1
  = within_patient_layout(title: "Profile",
2
2
  breadcrumbs: breadcrumb_for("Low Clearance Summary", patient_low_clearance_dashboard_path(patient))) do
3
3
 
4
-
5
4
  / in show
6
5
  / = render "renalware/shared/documents/attributes_group",
7
6
  group: profile.document.low_clearance,
@@ -6,6 +6,5 @@
6
6
  -# Template Dependency: renalware/**/summary_part
7
7
  = within_patient_layout(title: "Clinical Summary") do
8
8
  .row
9
- - patient = clinical_summary.patient
10
9
  - summary_parts = clinical_summary.summary_parts(current_user).each do |summary_part|
11
10
  = render summary_part
@@ -14,7 +14,7 @@
14
14
  = f.input :title, wrapper: :horizontal_tiny
15
15
  = f.input :family_name, wrapper: :horizontal_small
16
16
  = f.input :given_name, wrapper: :horizontal_small
17
- = f.input :suffix, wrapper: :horizontal_small
17
+ /= f.input :suffix, wrapper: :horizontal_small
18
18
  = f.input :born_on, as: :date_picker, label: "DoB", wrapper: :horizontal_datepicker
19
19
  = f.input :sex,
20
20
  selected: patient.sex.code,
@@ -6,7 +6,7 @@ tr
6
6
  td= patient.sex.code
7
7
  td= patient.born_on
8
8
  td= patient.age
9
- - if(patient.send_to_rpv?)
9
+ - if patient.send_to_rpv?
10
10
  td(title="#{patient.rpv_decision}")
11
11
  i.fas.fa-check
12
12
  -else
@@ -22,7 +22,6 @@
22
22
  li.link.action= render partial: "renalware/messaging/internal/messages/send_message_link",
23
23
  locals: { patient: patient, link_text: t(".send_message") }
24
24
 
25
-
26
25
  li.link.action= render partial: "renalware/admissions/requests/create_request_link",
27
26
  locals: { patient: patient, link_text: t(".request_admission") }
28
27
 
@@ -21,6 +21,9 @@
21
21
  wrapper: :horizontal_small
22
22
  = f.input :start_date, as: :date_picker, wrapper: :horizontal_datepicker
23
23
  = f.input :end_date, as: :date_picker, wrapper: :horizontal_datepicker
24
+ = f.input :exchanges_done_by, wrapper: :horizontal_small
25
+ = f.input :exchanges_done_by_if_other, wrapper: :horizontal_small
26
+ = f.input :exchanges_done_by_notes, as: :string, wrapper: :horizontal_medium
24
27
  = f.input :add_hd, as: :boolean, wrapper: :horizontal_small
25
28
 
26
29
  = render(partial: "pd_regime_bags", locals: { f: f })
@@ -7,7 +7,7 @@
7
7
  .columns.medium-6
8
8
  = article_tag "Treatment" do
9
9
 
10
- dl.dl-horizontal
10
+ dl.dl-horizontal.xlarge
11
11
  dt Last Updated:
12
12
  dd= l regime.updated_at
13
13
  dt Start:
@@ -18,6 +18,12 @@
18
18
  dd= regime.treatment
19
19
  - if regime.apd?
20
20
  = render("renalware/pd/regimes/assistance_type", regime: regime)
21
+ dt= attr_name(regime, :exchanges_done_by)
22
+ dd= regime.exchanges_done_by&.text
23
+ dt= attr_name(regime, :exchanges_done_by_if_other)
24
+ dd= regime.exchanges_done_by_if_other&.text
25
+ dt= attr_name(regime, :exchanges_done_by_notes)
26
+ dd= regime.exchanges_done_by_notes
21
27
  dt On additional HD?:
22
28
  dd= yes_no(regime.add_hd)
23
29
  = render "renalware/pd/regimes/glucose", regime: regime
@@ -37,7 +37,7 @@ scss:
37
37
  a.set_filter_date_to_any_date(href="") Clear
38
38
  .columns.medium-1.large-1
39
39
  = f.input :on_hotlist,
40
- collection: [["Yes",true],["No",false]],
40
+ collection: [["Yes", true], ["No", false]],
41
41
  label: "Hotlist"
42
42
  .columns.medium-2.large-2
43
43
  = f.input :action,
@@ -7,7 +7,6 @@
7
7
  collection: Renalware::YearDatedConfirmation.valid_years.reverse,
8
8
  input_html: { class: "tiny-input" }
9
9
 
10
-
11
10
  = f.simple_fields_for attribute, renderable do |fd|
12
11
  .row(class=attribute)
13
12
  .columns.small-12.medium-3.large-3
@@ -1,4 +1,4 @@
1
- div.system-message.alert-box.radius(class=message.severity)
1
+ .system-message.alert-box.radius(class=message.severity)
2
2
  - if message.title.present?
3
3
  h1= message.title
4
4
  = simple_format(message.body)
@@ -82,7 +82,7 @@ ruby:
82
82
  / unsaved ones that cocoon has kept around for us. So instead use #sort_by, allowing for
83
83
  / a nil recorded_on date if that value in a newly added and unsaved episode has not yet been
84
84
  / entered.
85
- - episodes = f.object.rejection_episodes.sort_by{ |ep| ep.recorded_on || Time.zone.today }
85
+ - episodes = f.object.rejection_episodes.sort_by { |ep| ep.recorded_on || Time.zone.today }
86
86
  = f.simple_fields_for :rejection_episodes, episodes do |episode|
87
87
  = render "rejection_episode_fields", f: episode
88
88
 
@@ -92,7 +92,6 @@ ruby:
92
92
  as: :text,
93
93
  input_html: { rows: 5 }
94
94
 
95
-
96
95
  .row
97
96
  .large-12.columns
98
97
  = f.submit "Save", class: "button save-button"
@@ -1,6 +1,6 @@
1
1
  = within_patient_layout(title: "New Recipient Operation",
2
- breadcrumbs: [ \
3
- recipient_summary_breadcrumb(patient)]) do
2
+ breadcrumbs: [\
3
+ recipient_summary_breadcrumb(patient)]) do
4
4
 
5
5
  .document
6
6
  = simple_form_for recipient_operation,
@@ -9,5 +9,4 @@ p= "Count of patients changed since the last time they were sent: #{summary.num_
9
9
  - summary.results.each do |key, value|
10
10
  li= "#{key.to_s.humanize}: #{value}"
11
11
 
12
-
13
12
  p= "Count of files waiting in outgoing folder: #{summary.count_of_files_in_outgoing_folder}"
@@ -17,6 +17,7 @@ ActiveSupport::Inflector.inflections(:en) do |inflect|
17
17
  inflect.acronym "AKI"
18
18
  inflect.acronym "APD"
19
19
  inflect.acronym "API"
20
+ inflect.acronym "BLT"
20
21
  inflect.acronym "BMI"
21
22
  inflect.acronym "CAPD"
22
23
  inflect.acronym "CC"
@@ -29,6 +29,9 @@ en:
29
29
  delivery_interval: Delivery interval
30
30
  start_date: Start date
31
31
  end_date: End date
32
+ exchanges_done_by: Exchanges done by
33
+ exchanges_done_by_if_other: Exchanges done by (if other)
34
+ exchanges_done_by_notes: Exchanges done by (if specify)
32
35
  renalware/pd/regime_bag:
33
36
  sunday: Sun
34
37
  monday: Mon
@@ -78,3 +81,15 @@ en:
78
81
  ordinary: Ordinary bag
79
82
  last_fill: Last fill
80
83
  additional_manual_exchange: Additional manual exchange
84
+ renalware/pd/regime:
85
+ exchanges_done_by:
86
+ by_patient: By patient
87
+ predominantly_by_patient: Predominantly by patient
88
+ equally_between_patient_and_others: Equally between patient and others
89
+ predominantly_by_others: Predominantly by others
90
+ only_by_others: Only by others
91
+ exchanges_done_by_if_other:
92
+ spouse: Spouse
93
+ daughter_son_in_law: Daughter/son/in-law
94
+ others_specify: Others - specify
95
+ mix_specify: Mix - specify
@@ -0,0 +1,9 @@
1
+ class AddPDRegimeColumnsForBLT < ActiveRecord::Migration[5.2]
2
+ def change
3
+ within_renalware_schema do
4
+ add_column :pd_regimes, :exchanges_done_by, :string
5
+ add_column :pd_regimes, :exchanges_done_by_if_other, :string
6
+ add_column :pd_regimes, :exchanges_done_by_notes, :text
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.101"
4
+ VERSION = "2.0.102"
5
5
  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.101
4
+ version: 2.0.102
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2019-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_type
@@ -3546,6 +3546,7 @@ files:
3546
3546
  - db/migrate/20190823044107_add_outcome_columns_to_clinic_appointments.rb
3547
3547
  - db/migrate/20190823051014_add_hidden_colum_to_event_types.rb
3548
3548
  - db/migrate/20190823105642_add_asked_for_write_access_to_users.rb
3549
+ - db/migrate/20190830082736_add_pd_regime_columns_for_blt.rb
3549
3550
  - db/seeds.rb
3550
3551
  - db/seeds/default/accesses/access_pd_catheter_insertion_techniques.csv
3551
3552
  - db/seeds/default/accesses/access_pd_catheter_insertion_techniques.rb