renalware-core 2.0.42 → 2.0.43

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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/renalware/api/ukrdc/patients_controller.rb +2 -1
  3. data/app/views/renalware/hd/transmission_logs/index.html.slim +3 -3
  4. data/app/views/renalware/patients/side_menu/_actions.html.slim +1 -1
  5. data/app/views/renalware/renal/aki_alerts/_aki_alert.html.slim +1 -1
  6. data/app/views/renalware/renal/aki_alerts/_filters.html.slim +1 -1
  7. data/lib/renalware/version.rb +1 -1
  8. data/spec/factories/accesses/plans.rb +2 -2
  9. data/spec/factories/accesses/plans_types.rb +1 -1
  10. data/spec/factories/accesses/procedures.rb +1 -1
  11. data/spec/factories/accesses/profiles.rb +1 -1
  12. data/spec/factories/accesses/sites.rb +2 -2
  13. data/spec/factories/accesses/types.rb +4 -4
  14. data/spec/factories/admissions/admissions.rb +2 -2
  15. data/spec/factories/admissions/consults.rb +4 -4
  16. data/spec/factories/admissions/request_reasons.rb +1 -1
  17. data/spec/factories/admissions/requests.rb +1 -1
  18. data/spec/factories/clinical/body_compositions.rb +12 -12
  19. data/spec/factories/clinical/dry_weights.rb +1 -1
  20. data/spec/factories/clinics/clinic_visits.rb +6 -6
  21. data/spec/factories/clinics/clinics.rb +1 -1
  22. data/spec/factories/deaths/cause.rb +2 -2
  23. data/spec/factories/drugs/drug.rb +1 -1
  24. data/spec/factories/drugs/drug_types.rb +6 -6
  25. data/spec/factories/events/events.rb +2 -2
  26. data/spec/factories/events/events_types.rb +14 -14
  27. data/spec/factories/feeds/file_types.rb +7 -7
  28. data/spec/factories/hd/cannulation_types.rb +1 -1
  29. data/spec/factories/hd/dialysates.rb +5 -5
  30. data/spec/factories/hd/dialysers.rb +4 -4
  31. data/spec/factories/hd/diaries.rb +4 -4
  32. data/spec/factories/hd/diurnal_period_codes.rb +4 -4
  33. data/spec/factories/hd/hd_session_document.rb +28 -28
  34. data/spec/factories/hd/patient_statistics.rb +20 -20
  35. data/spec/factories/hd/preference_sets.rb +1 -1
  36. data/spec/factories/hd/profiles.rb +1 -1
  37. data/spec/factories/hd/schedule_definitions.rb +4 -4
  38. data/spec/factories/hd/sessions.rb +4 -4
  39. data/spec/factories/hd/station_locations.rb +2 -2
  40. data/spec/factories/hd/stations.rb +1 -1
  41. data/spec/factories/hd/transmission_logs.rb +4 -4
  42. data/spec/factories/hospitals/centres.rb +2 -2
  43. data/spec/factories/hospitals/units.rb +5 -5
  44. data/spec/factories/hospitals/wards.rb +1 -1
  45. data/spec/factories/letters/archives.rb +1 -1
  46. data/spec/factories/letters/contact_descriptions.rb +2 -2
  47. data/spec/factories/letters/descriptions.rb +1 -1
  48. data/spec/factories/letters/letterheads.rb +6 -6
  49. data/spec/factories/letters/letters.rb +2 -2
  50. data/spec/factories/letters/recipients.rb +2 -2
  51. data/spec/factories/medications/medication_route.rb +4 -4
  52. data/spec/factories/medications/prescription.rb +5 -5
  53. data/spec/factories/medications/prescription_terminations.rb +1 -1
  54. data/spec/factories/messaging/internal/messages.rb +4 -4
  55. data/spec/factories/messaging/internal/receipts.rb +1 -1
  56. data/spec/factories/modalities/modalities.rb +1 -1
  57. data/spec/factories/modalities/modality_descriptions.rb +13 -13
  58. data/spec/factories/modalities/modality_reasons.rb +5 -5
  59. data/spec/factories/pathology/measurement_units.rb +1 -1
  60. data/spec/factories/pathology/observation_descriptions.rb +7 -7
  61. data/spec/factories/pathology/observation_requests.rb +1 -1
  62. data/spec/factories/pathology/observations.rb +3 -3
  63. data/spec/factories/pathology/request_descriptions.rb +1 -1
  64. data/spec/factories/pathology/requests/drug_category.rb +1 -1
  65. data/spec/factories/pathology/requests/global_rule.rb +3 -3
  66. data/spec/factories/pathology/requests/patient_rule.rb +5 -5
  67. data/spec/factories/patients/alerts.rb +1 -1
  68. data/spec/factories/patients/bookmarks.rb +1 -1
  69. data/spec/factories/patients/ethnicities.rb +2 -2
  70. data/spec/factories/patients/languages.rb +8 -8
  71. data/spec/factories/patients/patients.rb +7 -7
  72. data/spec/factories/patients/practice_memberships.rb +1 -1
  73. data/spec/factories/patients/practices.rb +2 -2
  74. data/spec/factories/patients/primary_care_physicians.rb +3 -3
  75. data/spec/factories/patients/religions.rb +1 -1
  76. data/spec/factories/pd/bag_types.rb +13 -13
  77. data/spec/factories/pd/episode_types.rb +2 -2
  78. data/spec/factories/pd/exit_site_infections.rb +4 -4
  79. data/spec/factories/pd/fluid_descriptions.rb +1 -1
  80. data/spec/factories/pd/infection_organisms.rb +3 -3
  81. data/spec/factories/pd/modality_descriptions.rb +1 -1
  82. data/spec/factories/pd/organism_codes.rb +2 -2
  83. data/spec/factories/pd/pd_regimes.rb +20 -20
  84. data/spec/factories/pd/peritonitis_episodes.rb +14 -14
  85. data/spec/factories/pd/regime_bags.rb +30 -30
  86. data/spec/factories/pd/systems.rb +2 -2
  87. data/spec/factories/pd/training_sites.rb +2 -2
  88. data/spec/factories/pd/training_types.rb +1 -1
  89. data/spec/factories/problems/problems.rb +1 -1
  90. data/spec/factories/renal/aki_alert_actions.rb +1 -1
  91. data/spec/factories/renal/aki_alerts.rb +2 -2
  92. data/spec/factories/renal/prd_description.rb +2 -2
  93. data/spec/factories/renal/profiles.rb +2 -2
  94. data/spec/factories/reporting/audits.rb +4 -4
  95. data/spec/factories/research/studies.rb +2 -2
  96. data/spec/factories/system/addresses.rb +6 -6
  97. data/spec/factories/system/countries.rb +6 -6
  98. data/spec/factories/system/feedback.rb +3 -3
  99. data/spec/factories/system/messages.rb +2 -2
  100. data/spec/factories/system/roles.rb +7 -7
  101. data/spec/factories/system/templates.rb +8 -8
  102. data/spec/factories/system/users.rb +12 -12
  103. data/spec/factories/transplants/donations.rb +2 -2
  104. data/spec/factories/transplants/donor_stage.rb +3 -3
  105. data/spec/factories/transplants/live_donor_modality_description.rb +1 -1
  106. data/spec/factories/transplants/modality_descriptions.rb +1 -1
  107. data/spec/factories/transplants/recipient_operations.rb +4 -4
  108. data/spec/factories/transplants/registration_status_descriptions.rb +2 -2
  109. data/spec/factories/transplants/registrations.rb +1 -1
  110. data/spec/support/pathology_spec_helper.rb +1 -1
  111. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc71457e0667a1542f20348ec2d9a18f4c63771991d5ec1a04567d4c00998945
4
- data.tar.gz: 3d125ec394cf34ae6fe52a7e31a1383e3a37e423ede66a73630677aecf7de36f
3
+ metadata.gz: bb0aa2a964b933379fa9c6a72eb9570f4b6251f4d124fa6377fb2b6083deb8dd
4
+ data.tar.gz: bf7030934f456717a02fd899f7dfc530cdbde2e1a62cdaaa640ec268d68033ce
5
5
  SHA512:
6
- metadata.gz: 7eff31ea5c1a1386c1a6b54004a8ea39822972febf28e2f15860f8d073ee7183028670d5c7ba78f65e2e68c8126c78790917bde0eefc5e37b462af28c977ca7e
7
- data.tar.gz: c6fead2c420a33575453a89415ea5ec9fe2ce478797ac971b7ab4336f84ad797b9aedbe078dcdf0b76a29405a8991f3f58fd7f265a5cc1c27d8b97b60353fdb9
6
+ metadata.gz: c4348f2ff8acd6513e6dfd056ae78de44655f115f3ed5d56bfed7ee85169958a3a464e59a28af2920698177b018f3ee31b19adc520168dabe9a147160a9883fe
7
+ data.tar.gz: 2199399c9b5e3a4dd703c41492c048f59248f02c48b09541925e8baae20cf7c5f58c741368d6e1d21e174d6b16af34e787316379c6535d71d724066ba26aad74
@@ -23,7 +23,8 @@ module Renalware
23
23
  def patient_presenter
24
24
  patient = Renalware::Patient.find_by!(secure_id: params[:id])
25
25
  authorize patient
26
- Renalware::UKRDC::PatientPresenter.new(patient, changes_since: params[:changes_since])
26
+ changes_since = params.fetch(:changes_since, "2018-01-01")
27
+ Renalware::UKRDC::PatientPresenter.new(patient, changes_since: changes_since)
27
28
  end
28
29
  end
29
30
  end
@@ -4,11 +4,11 @@
4
4
  thead
5
5
  tr
6
6
  th.col-width-date-time Date
7
- th.col-width-tiny Direction
8
- th.col-width-tiny Format
7
+ th.col-width-tiny Dir
8
+ th.col-width-tiny Fmt
9
9
  th.col-width-tiny Payload
10
10
  th.col-width-large Filename
11
- th Patient
11
+ th.col-width-medium Patient
12
12
  th.col-width-small Ext Session Id
13
13
  th.col-width-small Session Id
14
14
  th.col-width-tiny Result
@@ -34,7 +34,7 @@ li.link.action
34
34
 
35
35
  - if policy(patient).debug?
36
36
  li.link.action
37
- = link_to "Debug: UKRDC XML", api_ukrdc_patient_path(patient, changes_since: "2000-01-01")
37
+ = link_to "Debug: UKRDC XML", api_ukrdc_patient_path(patient, changes_since: "2018-01-01")
38
38
 
39
39
  - cache do
40
40
  = render "renalware/admissions/requests/modal_dialog_placeholder"
@@ -12,7 +12,7 @@ tr(class="#{'aki_alert--hotlist' if aki_alert.hotlist?}")
12
12
  td= aki_alert.patient.sex
13
13
  td= aki_alert.patient.age
14
14
  td= aki_alert.action
15
- td= "#{aki_alert.hospital_ward} @#{aki_alert.hospital_ward&.hospital_unit&.unit_code}"
15
+ td= aki_alert.hospital_ward
16
16
  td= yes_no aki_alert.hotlist?
17
17
  td= aki_alert.max_aki
18
18
  td= l(aki_alert.aki_date)
@@ -47,7 +47,7 @@ scss:
47
47
  as: :grouped_select,
48
48
  group_method: :wards,
49
49
  collection: Renalware::Hospitals::Unit.joins(:wards).includes(:wards).ordered,
50
- label_method: ->(s) { "#{s.name} @#{s.hospital_unit.unit_code}" },
50
+ label_method: :name,
51
51
  input_html: { class: "searchable_select" },
52
52
  label: "Ward"
53
53
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.42"
4
+ VERSION = "2.0.43"
5
5
  end
@@ -5,8 +5,8 @@ FactoryBot.define do
5
5
  accountable
6
6
  association :patient, factory: :accesses_patient
7
7
  association :plan_type, factory: :access_plan_type
8
- notes "Lorem ipsum dolor sit amet.."
8
+ notes { "Lorem ipsum dolor sit amet.." }
9
9
  decided_by { accountable_actor }
10
- terminated_at nil
10
+ terminated_at { nil }
11
11
  end
12
12
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :access_plan_type, class: Renalware::Accesses::PlanType do
5
- name "Continue"
5
+ name { "Continue" }
6
6
  end
7
7
  end
@@ -3,7 +3,7 @@
3
3
  FactoryBot.define do
4
4
  factory :access_procedure, class: Renalware::Accesses::Procedure do
5
5
  type { create(:access_type) }
6
- side "R"
6
+ side { "R" }
7
7
  performed_on { Time.zone.today }
8
8
  end
9
9
  end
@@ -5,7 +5,7 @@ FactoryBot.define do
5
5
  accountable
6
6
  patient
7
7
  type { create(:access_type) }
8
- side :right
8
+ side { :right }
9
9
  formed_on { Time.zone.today }
10
10
 
11
11
  trait :current do
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :access_site, class: Renalware::Accesses::Site do
5
- name "Femoral vein line"
6
- code "12"
5
+ name { "Femoral vein line" }
6
+ code { "12" }
7
7
  end
8
8
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :access_type, class: Renalware::Accesses::Type do
5
- name "Tunnelled subclav"
6
- abbreviation "TLN LS"
7
- rr02_code "TLN"
8
- rr41_code "LS"
5
+ name { "Tunnelled subclav" }
6
+ abbreviation { "TLN LS" }
7
+ rr02_code { "TLN" }
8
+ rr41_code { "LS" }
9
9
  end
10
10
  end
@@ -5,8 +5,8 @@ FactoryBot.define do
5
5
  accountable
6
6
  patient { create(:patient, by: accountable_actor) }
7
7
  admitted_on { Time.zone.today }
8
- admission_type :unknown
9
- reason_for_admission "Reason"
8
+ admission_type { :unknown }
9
+ reason_for_admission { "Reason" }
10
10
  hospital_ward
11
11
  modality_at_admission { patient&.current_modality }
12
12
  end
@@ -5,13 +5,13 @@ FactoryBot.define do
5
5
  accountable
6
6
  patient { create(:patient, by: accountable_actor) }
7
7
  association :consult_site, factory: :admissions_consult_site
8
- consult_type "x"
8
+ consult_type { "x" }
9
9
  started_on { Time.zone.now - 2.days }
10
- ended_on nil
11
- description "Lorem ipsum dolor"
10
+ ended_on { nil }
11
+ description { "Lorem ipsum dolor" }
12
12
 
13
13
  trait :active do
14
- ended_on nil
14
+ ended_on { nil }
15
15
  end
16
16
 
17
17
  trait :inactive do
@@ -5,6 +5,6 @@ FactoryBot.define do
5
5
  initialize_with do
6
6
  Renalware::Admissions::RequestReason.find_or_create_by!(description: description)
7
7
  end
8
- description "AKI"
8
+ description { "AKI" }
9
9
  end
10
10
  end
@@ -5,6 +5,6 @@ FactoryBot.define do
5
5
  accountable
6
6
  association :reason, factory: :admissions_request_reason
7
7
  patient { create(:patient, by: accountable_actor) }
8
- priority :low
8
+ priority { :low }
9
9
  end
10
10
  end
@@ -5,18 +5,18 @@ FactoryBot.define do
5
5
  accountable
6
6
  patient
7
7
  assessed_on { 1.week.ago }
8
- overhydration "19.1"
9
- volume_of_distribution "52.1"
10
- total_body_water "23.1"
11
- extracellular_water "63.1"
12
- intracellular_water "23.1"
13
- lean_tissue_index "78.1"
14
- fat_tissue_index "32.1"
15
- lean_tissue_mass "32.1"
16
- fat_tissue_mass "42.1"
17
- adipose_tissue_mass "15.1"
18
- body_cell_mass "53.1"
19
- quality_of_reading "65.123"
8
+ overhydration { "19.1" }
9
+ volume_of_distribution { "52.1" }
10
+ total_body_water { "23.1" }
11
+ extracellular_water { "63.1" }
12
+ intracellular_water { "23.1" }
13
+ lean_tissue_index { "78.1" }
14
+ fat_tissue_index { "32.1" }
15
+ lean_tissue_mass { "32.1" }
16
+ fat_tissue_mass { "42.1" }
17
+ adipose_tissue_mass { "15.1" }
18
+ body_cell_mass { "53.1" }
19
+ quality_of_reading { "65.123" }
20
20
  assessor { accountable_actor }
21
21
  end
22
22
  end
@@ -6,7 +6,7 @@ FactoryBot.define do
6
6
  patient
7
7
 
8
8
  assessed_on { 1.week.ago }
9
- weight 156.1
9
+ weight { 156.1 }
10
10
  assessor { accountable_actor }
11
11
  end
12
12
  end
@@ -6,12 +6,12 @@ FactoryBot.define do
6
6
  patient
7
7
  date { Time.zone.today }
8
8
  time { Time.zone.now }
9
- did_not_attend false
10
- height 1.5
11
- weight 1.5
12
- pulse 100
13
- systolic_bp 112
14
- diastolic_bp 71
9
+ did_not_attend { false }
10
+ height { 1.5 }
11
+ weight { 1.5 }
12
+ pulse { 100 }
13
+ systolic_bp { 112 }
14
+ diastolic_bp { 71 }
15
15
  clinic { create(:clinic, consultant: accountable_actor) }
16
16
  end
17
17
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :clinic, class: "Renalware::Clinics::Clinic" do
5
- name "Access"
5
+ name { "Access" }
6
6
  association :consultant, factory: :user
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :cause_of_death, class: "Renalware::Deaths::Cause" do
5
- code "12"
6
- description "Hyperkalaemia"
5
+ code { "12" }
6
+ description { "Hyperkalaemia" }
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :drug, class: "Renalware::Drugs::Drug" do
5
- name "Blue Pill"
5
+ name { "Blue Pill" }
6
6
 
7
7
  trait :immunosuppressant do
8
8
  after(:create) do |instance|
@@ -2,17 +2,17 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :drug_type, class: "Renalware::Drugs::Type" do
5
- code "immuno"
6
- name "Immunosuppressant"
5
+ code { "immuno" }
6
+ name { "Immunosuppressant" }
7
7
 
8
8
  trait :immunosuppressant do
9
- code "immunosuppressant"
10
- name "Immunosuppressant"
9
+ code { "immunosuppressant" }
10
+ name { "Immunosuppressant" }
11
11
  end
12
12
 
13
13
  trait :esa do
14
- code "esa"
15
- name "ESA"
14
+ code { "esa" }
15
+ name { "ESA" }
16
16
  end
17
17
  end
18
18
  end
@@ -6,8 +6,8 @@ FactoryBot.define do
6
6
  patient
7
7
  event_type factory: :access_clinic_event_type
8
8
  date_time { Time.zone.now }
9
- description "Needs blood sample taken."
10
- notes "Would like son to accompany them on clinic visit."
9
+ description { "Needs blood sample taken." }
10
+ notes { "Would like son to accompany them on clinic visit." }
11
11
 
12
12
  factory :simple_event, class: "Renalware::Events::Simple" do
13
13
  end
@@ -5,35 +5,35 @@ FactoryBot.define do
5
5
  initialize_with { Renalware::Events::Type.find_or_create_by(name: name) }
6
6
 
7
7
  factory :access_clinic_event_type do
8
- name "Access--Clinic"
8
+ name { "Access--Clinic" }
9
9
  end
10
10
 
11
11
  factory :swab_event_type do
12
- name "Swab"
13
- event_class_name "Renalware::Events::Swab"
14
- slug "swabs"
12
+ name { "Swab" }
13
+ event_class_name { "Renalware::Events::Swab" }
14
+ slug { "swabs" }
15
15
  end
16
16
 
17
17
  factory :biopsy_event_type do
18
- name "Renal biopsy"
19
- event_class_name "Renalware::Events::Biopsy"
18
+ name { "Renal biopsy" }
19
+ event_class_name { "Renalware::Events::Biopsy" }
20
20
  end
21
21
 
22
22
  factory :pd_line_change_event_type do
23
- name "PD Line Change"
24
- slug "pd_line_changes"
23
+ name { "PD Line Change" }
24
+ slug { "pd_line_changes" }
25
25
  end
26
26
 
27
27
  factory :investigation_event_type do
28
- name "Investigation"
29
- slug "investigations"
30
- event_class_name "Renalware::Events::Investigation"
28
+ name { "Investigation" }
29
+ slug { "investigations" }
30
+ event_class_name { "Renalware::Events::Investigation" }
31
31
  end
32
32
 
33
33
  factory :vaccination_event_type do
34
- name "Vaccination"
35
- slug "vaccinations"
36
- event_class_name "Renalware::Virology::Vaccination"
34
+ name { "Vaccination" }
35
+ slug { "vaccinations" }
36
+ event_class_name { "Renalware::Virology::Vaccination" }
37
37
  end
38
38
  end
39
39
  end
@@ -2,18 +2,18 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :feed_file_type, class: "Renalware::Feeds::FileType" do
5
- name "Practices"
6
- description "Import practices"
7
- prompt "Where to get the file etc"
5
+ name { "Practices" }
6
+ description { "Import practices" }
7
+ prompt { "Where to get the file etc" }
8
8
 
9
9
  trait :practices do
10
- name "Practices"
11
- description "Import practices"
10
+ name { "Practices" }
11
+ description { "Import practices" }
12
12
  end
13
13
 
14
14
  trait :primary_care_physicians do
15
- name "GPs"
16
- description "Import GPs"
15
+ name { "GPs" }
16
+ description { "Import GPs" }
17
17
  end
18
18
  end
19
19
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :hd_cannulation_type, class: "Renalware::HD::CannulationType" do
5
- name "Buttonhole"
5
+ name { "Buttonhole" }
6
6
  end
7
7
  end
@@ -3,10 +3,10 @@
3
3
  FactoryBot.define do
4
4
  factory :hd_dialysate, class: "Renalware::HD::Dialysate" do
5
5
  initialize_with { Renalware::HD::Dialysate.find_or_create_by(name: name) }
6
- name "Fresenius A7"
7
- sodium_content 4
8
- sodium_content_uom "mmol/L"
9
- description nil
10
- deleted_at nil
6
+ name { "Fresenius A7" }
7
+ sodium_content { 4 }
8
+ sodium_content_uom { "mmol/L" }
9
+ description { nil }
10
+ deleted_at { nil }
11
11
  end
12
12
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :hd_dialyser, class: "Renalware::HD::Dialyser" do
5
- group "FX"
6
- name "FX80"
7
- membrane_surface_area 234.12
8
- membrane_surface_area_coefficient_k0a 999.99
5
+ group { "FX" }
6
+ name { "FX80" }
7
+ membrane_surface_area { 234.12 }
8
+ membrane_surface_area_coefficient_k0a { 999.99 }
9
9
  end
10
10
  end