renalware-core 2.0.42 → 2.0.43

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -3,20 +3,20 @@
3
3
  FactoryBot.define do
4
4
  factory :peritonitis_episode, class: "Renalware::PD::PeritonitisEpisode" do
5
5
  patient
6
- diagnosis_date "30/01/2015"
7
- treatment_start_date "1/02/2015"
8
- treatment_end_date "28/02/2015"
9
- catheter_removed true
10
- line_break false
11
- exit_site_infection true
12
- diarrhoea false
13
- abdominal_pain false
6
+ diagnosis_date { "30/01/2015" }
7
+ treatment_start_date { "1/02/2015" }
8
+ treatment_end_date { "28/02/2015" }
9
+ catheter_removed { true }
10
+ line_break { false }
11
+ exit_site_infection { true }
12
+ diarrhoea { false }
13
+ abdominal_pain { false }
14
14
  fluid_description
15
- white_cell_total 2000
16
- white_cell_neutro 25
17
- white_cell_lympho 25
18
- white_cell_degen 20
19
- white_cell_other 30
20
- notes "Needs review in 6 weeks"
15
+ white_cell_total { 2000 }
16
+ white_cell_neutro { 25 }
17
+ white_cell_lympho { 25 }
18
+ white_cell_degen { 20 }
19
+ white_cell_other { 30 }
20
+ notes { "Needs review in 6 weeks" }
21
21
  end
22
22
  end
@@ -3,44 +3,44 @@
3
3
  FactoryBot.define do
4
4
  factory :pd_regime_bag, class: "Renalware::PD::RegimeBag" do
5
5
  bag_type
6
- volume 200
7
- monday true
8
- tuesday false
9
- wednesday true
10
- thursday false
11
- friday true
12
- saturday false
13
- sunday false
14
- role :ordinary
6
+ volume { 200 }
7
+ monday { true }
8
+ tuesday { false }
9
+ wednesday { true }
10
+ thursday { false }
11
+ friday { true }
12
+ saturday { false }
13
+ sunday { false }
14
+ role { :ordinary }
15
15
 
16
16
  trait :weekdays_only do
17
- monday true
18
- tuesday true
19
- wednesday true
20
- thursday true
21
- friday true
22
- saturday false
23
- sunday false
17
+ monday { true }
18
+ tuesday { true }
19
+ wednesday { true }
20
+ thursday { true }
21
+ friday { true }
22
+ saturday { false }
23
+ sunday { false }
24
24
  end
25
25
 
26
26
  trait :weekend_only do
27
- monday false
28
- tuesday false
29
- wednesday false
30
- thursday false
31
- friday false
32
- saturday true
33
- sunday true
27
+ monday { false }
28
+ tuesday { false }
29
+ wednesday { false }
30
+ thursday { false }
31
+ friday { false }
32
+ saturday { true }
33
+ sunday { true }
34
34
  end
35
35
 
36
36
  trait :everyday do
37
- monday true
38
- tuesday true
39
- wednesday true
40
- thursday true
41
- friday true
42
- saturday true
43
- sunday true
37
+ monday { true }
38
+ tuesday { true }
39
+ wednesday { true }
40
+ thursday { true }
41
+ friday { true }
42
+ saturday { true }
43
+ sunday { true }
44
44
  end
45
45
  end
46
46
  end
@@ -3,11 +3,11 @@
3
3
  FactoryBot.define do
4
4
  factory :apd_system, class: "Renalware::PD::System" do
5
5
  name { Faker::Company.name }
6
- pd_type "APD"
6
+ pd_type { "APD" }
7
7
  end
8
8
 
9
9
  factory :capd_system, class: "Renalware::PD::System" do
10
10
  name { Faker::Company.name }
11
- pd_type "CAPD"
11
+ pd_type { "CAPD" }
12
12
  end
13
13
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :pd_training_site, class: "Renalware::PD::TrainingSite" do
5
- code "HOME"
6
- name "Home"
5
+ code { "HOME" }
6
+ name { "Home" }
7
7
  end
8
8
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :pd_training_type, class: "Renalware::PD::TrainingType" do
5
- name "APD Baxter"
5
+ name { "APD Baxter" }
6
6
  end
7
7
  end
@@ -3,6 +3,6 @@
3
3
  FactoryBot.define do
4
4
  factory :problem, class: "Renalware::Problems::Problem" do
5
5
  accountable
6
- description "further description of the patient problem"
6
+ description { "further description of the patient problem" }
7
7
  end
8
8
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :aki_alert_action, class: "Renalware::Renal::AKIAlertAction" do
5
- name "IP Review"
5
+ name { "IP Review" }
6
6
  end
7
7
  end
@@ -3,8 +3,8 @@
3
3
  FactoryBot.define do
4
4
  factory :aki_alert, class: "Renalware::Renal::AKIAlert" do
5
5
  accountable
6
- notes "Some notes"
7
- hotlist false
6
+ notes { "Some notes" }
7
+ hotlist { false }
8
8
  association :action, factory: :aki_alert_action
9
9
  hospital_ward
10
10
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :prd_description, class: "Renalware::Renal::PRDDescription" do
5
- code "1074"
6
- term "Denys-Drash syndrome"
5
+ code { "1074" }
6
+ term { "Denys-Drash syndrome" }
7
7
  end
8
8
  end
@@ -3,8 +3,8 @@
3
3
  FactoryBot.define do
4
4
  factory :renal_profile, class: "Renalware::Renal::Profile" do
5
5
  prd_description
6
- first_seen_on "01-01-2017"
7
- comorbidities_updated_on "01-01-2017"
6
+ first_seen_on { "01-01-2017" }
7
+ comorbidities_updated_on { "01-01-2017" }
8
8
 
9
9
  document {
10
10
  {
@@ -2,9 +2,9 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :audit, class: "Renalware::Reporting::Audit" do
5
- name "Letters Authors"
6
- view_name "audit_letter_authors"
7
- refresh_schedule "1 0 * * *"
8
- display_configuration "{}"
5
+ name { "Letters Authors" }
6
+ view_name { "audit_letter_authors" }
7
+ refresh_schedule { "1 0 * * *" }
8
+ display_configuration { "{}" }
9
9
  end
10
10
  end
@@ -6,8 +6,8 @@ FactoryBot.define do
6
6
  description { "Description for #{code}" }
7
7
  leader { Faker::Name.name }
8
8
  started_on { 1.year.ago }
9
- terminated_on nil
10
- deleted_at nil
9
+ terminated_on { nil }
10
+ deleted_at { nil }
11
11
  accountable
12
12
  end
13
13
  end
@@ -2,13 +2,13 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :address, class: "Renalware::Address" do
5
- street_1 "123 Legoland"
6
- street_2 "Brewster Road"
7
- street_3 "Brownswater"
8
- town "Windsor"
9
- county "Berkshire"
5
+ street_1 { "123 Legoland" }
6
+ street_2 { "Brewster Road" }
7
+ street_3 { "Brownswater" }
8
+ town { "Windsor" }
9
+ county { "Berkshire" }
10
10
  country { Renalware::System::Country.find_by(alpha2: "GB") }
11
- postcode "NW1 6BB"
11
+ postcode { "NW1 6BB" }
12
12
 
13
13
  trait :in_uk do
14
14
  association(:country, factory: :united_kingdom)
@@ -3,15 +3,15 @@
3
3
  FactoryBot.define do
4
4
  factory :country, class: "Renalware::System::Country" do
5
5
  factory :united_kingdom do
6
- name "United Kingdom"
7
- alpha2 "GB"
8
- alpha3 "GBR"
6
+ name { "United Kingdom" }
7
+ alpha2 { "GB" }
8
+ alpha3 { "GBR" }
9
9
  end
10
10
 
11
11
  factory :algeria do
12
- name "Algeria"
13
- alpha2 "DZ"
14
- alpha3 "DZA"
12
+ name { "Algeria" }
13
+ alpha2 { "DZ" }
14
+ alpha3 { "DZA" }
15
15
  end
16
16
  end
17
17
  end
@@ -3,8 +3,8 @@
3
3
  FactoryBot.define do
4
4
  factory :user_feedback, class: "Renalware::System::UserFeedback" do
5
5
  association :author, factory: :user
6
- comment "My feedback is.."
7
- admin_notes ""
8
- category :general_comment
6
+ comment { "My feedback is.." }
7
+ admin_notes { "" }
8
+ category { :general_comment }
9
9
  end
10
10
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :system_message, class: "Renalware::System::Message" do
5
- title "Test title"
6
- body "Test body"
5
+ title { "Test title" }
6
+ body { "Test body" }
7
7
  display_from { Time.zone.now }
8
8
  end
9
9
  end
@@ -4,24 +4,24 @@ FactoryBot.define do
4
4
  factory :role, class: "Renalware::Role" do
5
5
  initialize_with { Renalware::Role.find_or_create_by(name: name) }
6
6
 
7
- name :super_admin
8
- hidden false
7
+ name { :super_admin }
8
+ hidden { false }
9
9
 
10
10
  trait :super_admin do
11
- name :super_admin
12
- hidden true
11
+ name { :super_admin }
12
+ hidden { true }
13
13
  end
14
14
 
15
15
  trait :admin do
16
- name :admin
16
+ name { :admin }
17
17
  end
18
18
 
19
19
  trait :clinical do
20
- name :clinical
20
+ name { :clinical }
21
21
  end
22
22
 
23
23
  trait :read_only do
24
- name :read_only
24
+ name { :read_only }
25
25
  end
26
26
  end
27
27
  end
@@ -2,16 +2,16 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :esi_printable_form_template, class: "Renalware::System::Template" do
5
- name "esi_printable_form"
6
- title "ESI Printable Form"
7
- description "Description"
8
- body "{{ patient.name }} {{ patient.hospital_identifier }}"
5
+ name { "esi_printable_form" }
6
+ title { "ESI Printable Form" }
7
+ description { "Description" }
8
+ body { "{{ patient.name }} {{ patient.hospital_identifier }}" }
9
9
  end
10
10
 
11
11
  factory :peritonitis_episode_printable_form_template, class: "Renalware::System::Template" do
12
- name "peritonitis_episode_printable_form"
13
- title "Peritonitis Episode Printable form"
14
- description "Description"
15
- body "{{ patient.name }} {{ patient.hospital_identifier }}"
12
+ name { "peritonitis_episode_printable_form" }
13
+ title { "Peritonitis Episode Printable form" }
14
+ description { "Description" }
15
+ body { "{{ patient.name }} {{ patient.hospital_identifier }}" }
16
16
  end
17
17
  end
@@ -14,15 +14,15 @@ FactoryBot.define do
14
14
  family_name { Faker::Name.last_name }
15
15
  username
16
16
  email
17
- password "supersecret"
18
- approved true
19
- professional_position "Health Minister"
17
+ password { "supersecret" }
18
+ approved { true }
19
+ professional_position { "Health Minister" }
20
20
  signature { Faker::Name.name }
21
21
 
22
22
  # By default a user has no roles.
23
23
  # If you want a use with a role, use a trait, e.g. create(:user, :clinical)
24
24
  transient do
25
- role nil
25
+ role { nil }
26
26
  end
27
27
 
28
28
  after(:create) do |user, obj|
@@ -32,7 +32,7 @@ FactoryBot.define do
32
32
  end
33
33
 
34
34
  trait :unapproved do
35
- approved false
35
+ approved { false }
36
36
  end
37
37
 
38
38
  trait :author do
@@ -46,29 +46,29 @@ FactoryBot.define do
46
46
 
47
47
  trait :super_admin do
48
48
  transient do
49
- role :super_admin
49
+ role { :super_admin }
50
50
  end
51
51
  end
52
52
 
53
53
  trait :admin do
54
54
  transient do
55
- role :admin
55
+ role { :admin }
56
56
  end
57
57
  end
58
58
 
59
59
  trait :clinical do
60
- given_name "Aneurin"
61
- family_name "Bevan"
62
- signature "Aneurin Bevan"
60
+ given_name { "Aneurin" }
61
+ family_name { "Bevan" }
62
+ signature { "Aneurin Bevan" }
63
63
 
64
64
  transient do
65
- role :clinical
65
+ role { :clinical }
66
66
  end
67
67
  end
68
68
 
69
69
  trait :read_only do
70
70
  transient do
71
- role :read_only
71
+ role { :read_only }
72
72
  end
73
73
  end
74
74
  end
@@ -4,7 +4,7 @@ FactoryBot.define do
4
4
  factory :transplant_donation, class: Renalware::Transplants::Donation do
5
5
  patient
6
6
 
7
- state :volunteered
8
- relationship_with_recipient :sibling
7
+ state { :volunteered }
8
+ relationship_with_recipient { :sibling }
9
9
  end
10
10
  end
@@ -6,8 +6,8 @@ FactoryBot.define do
6
6
  patient
7
7
  stage_position factory: :donor_stage_position
8
8
  stage_status factory: :donor_stage_status
9
- started_on ->{ Time.zone.now }
10
- notes "Some notes"
11
- terminated_on nil
9
+ started_on { ->{ Time.zone.now } }
10
+ notes { "Some notes" }
11
+ terminated_on { nil }
12
12
  end
13
13
  end