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,7 +3,7 @@
3
3
  FactoryBot.define do
4
4
  factory :internal_receipt, class: "Renalware::Messaging::Internal::Receipt" do
5
5
  association :recipient, factory: :internal_recipient
6
- read_at nil
6
+ read_at { nil }
7
7
  association :message, factory: :internal_message
8
8
  end
9
9
  end
@@ -9,7 +9,7 @@ FactoryBot.define do
9
9
  started_on { Date.parse("2015-04-01") }
10
10
 
11
11
  trait :terminated do
12
- state "terminated"
12
+ state { "terminated" }
13
13
  end
14
14
 
15
15
  trait :pd_to_haemo do
@@ -2,38 +2,38 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :modality_description, class: "Renalware::Modalities::Description" do
5
- name "unspecific modality description not set in factory"
5
+ name { "unspecific modality description not set in factory" }
6
6
 
7
7
  initialize_with { Renalware::Modalities::Description.find_or_create_by(name: name) }
8
8
 
9
9
  trait :pd do
10
- name "PD"
11
- type "Renalware::PD::ModalityDescription"
10
+ name { "PD" }
11
+ type { "Renalware::PD::ModalityDescription" }
12
12
  end
13
13
 
14
14
  trait :hd do
15
- name "HD"
16
- type "Renalware::HD::ModalityDescription"
15
+ name { "HD" }
16
+ type { "Renalware::HD::ModalityDescription" }
17
17
  end
18
18
 
19
19
  trait :transplant do
20
- name "Transplant"
21
- type "Renalware::Transplants::RecipientModalityDescription"
20
+ name { "Transplant" }
21
+ type { "Renalware::Transplants::RecipientModalityDescription" }
22
22
  end
23
23
 
24
24
  trait :low_clearance do
25
- name "Low Clearance"
26
- type "Renalware::LowClearance::ModalityDescription"
25
+ name { "Low Clearance" }
26
+ type { "Renalware::LowClearance::ModalityDescription" }
27
27
  end
28
28
 
29
29
  trait :death do
30
- name "Death"
31
- type "Renalware::Deaths::ModalityDescription"
30
+ name { "Death" }
31
+ type { "Renalware::Deaths::ModalityDescription" }
32
32
  end
33
33
 
34
34
  trait :live_donor do
35
- name "Live Donor"
36
- type "Renalware::Transplants::DonorModalityDescription"
35
+ name { "Live Donor" }
36
+ type { "Renalware::Transplants::DonorModalityDescription" }
37
37
  end
38
38
  end
39
39
  end
@@ -7,16 +7,16 @@ FactoryBot.define do
7
7
 
8
8
  factory :modality_reason, class: "Renalware::Modalities::Reason" do
9
9
  rr_code
10
- description "Patient / partner choice"
10
+ description { "Patient / partner choice" }
11
11
  end
12
12
 
13
13
  factory :pd_to_haemodialysis, parent: :modality_reason do
14
- type "Renalware::Modalities::PDToHaemodialysis"
15
- description "Effective after temporary HD"
14
+ type { "Renalware::Modalities::PDToHaemodialysis" }
15
+ description { "Effective after temporary HD" }
16
16
  end
17
17
 
18
18
  factory :haemodialysis_to_pd, parent: :modality_reason do
19
- type "Renalware::Modalities::HaemodialysisToPD"
20
- description "Abdominal surgery or complications"
19
+ type { "Renalware::Modalities::HaemodialysisToPD" }
20
+ description { "Abdominal surgery or complications" }
21
21
  end
22
22
  end
@@ -5,6 +5,6 @@ FactoryBot.define do
5
5
  factory :pathology_measurement_unit,
6
6
  class: "Renalware::Pathology::MeasurementUnit" do
7
7
  name { generate(:measurement_unit) }
8
- description ""
8
+ description { "" }
9
9
  end
10
10
  end
@@ -9,17 +9,17 @@ FactoryBot.define do
9
9
 
10
10
  before(:create){ |desc| desc.loinc_code ||= desc.code.downcase }
11
11
 
12
- code "WBR"
12
+ code { "WBR" }
13
13
  association :measurement_unit, factory: :pathology_measurement_unit
14
- display_group 1
15
- display_order 1
16
- letter_group 1
17
- letter_order 1
14
+ display_group { 1 }
15
+ display_order { 1 }
16
+ letter_group { 1 }
17
+ letter_order { 1 }
18
18
 
19
19
  %i(urr ure hgb cre phos pth).each do |code|
20
20
  trait code do
21
- code code.to_s.upcase
22
- name code.to_s.upcase
21
+ code { code.to_s.upcase }
22
+ name { code.to_s.upcase }
23
23
  end
24
24
  end
25
25
  end
@@ -6,7 +6,7 @@ FactoryBot.define do
6
6
  factory :pathology_observation_request, class: "Renalware::Pathology::ObservationRequest" do
7
7
  association :description, factory: :pathology_request_description
8
8
  requestor_order_number
9
- requestor_name "Jane Doe"
9
+ requestor_name { "Jane Doe" }
10
10
  requested_at { 1.year.ago }
11
11
 
12
12
  trait :full_blood_count_with_observations do
@@ -3,8 +3,8 @@
3
3
  FactoryBot.define do
4
4
  factory :pathology_observation, class: "Renalware::Pathology::Observation" do
5
5
  association :description, factory: :pathology_observation_description
6
- result "6.0"
7
- comment "My Comment"
8
- observed_at "2016-03-04 10:15:40"
6
+ result { "6.0" }
7
+ comment { "My Comment" }
8
+ observed_at { "2016-03-04 10:15:40" }
9
9
  end
10
10
  end
@@ -4,6 +4,6 @@ FactoryBot.define do
4
4
  factory :pathology_request_description, class: "Renalware::Pathology::RequestDescription" do
5
5
  initialize_with { Renalware::Pathology::RequestDescription.find_or_create_by(code: code) }
6
6
  association :lab, factory: :pathology_lab
7
- code "FBC"
7
+ code { "FBC" }
8
8
  end
9
9
  end
@@ -3,6 +3,6 @@
3
3
  FactoryBot.define do
4
4
  factory :pathology_requests_drug_category,
5
5
  class: "Renalware::Pathology::Requests::DrugCategory" do
6
- name "Ciclosporin"
6
+ name { "Ciclosporin" }
7
7
  end
8
8
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :pathology_requests_global_rule, class: "Renalware::Pathology::Requests::GlobalRule" do
5
- type "ObservationResult"
6
- param_comparison_operator "<"
7
- param_comparison_value "100"
5
+ type { "ObservationResult" }
6
+ param_comparison_operator { "<" }
7
+ param_comparison_value { "100" }
8
8
  end
9
9
  end
@@ -5,11 +5,11 @@ FactoryBot.define do
5
5
  class: "Renalware::Pathology::Requests::PatientRule" do
6
6
  association :lab, factory: :pathology_lab
7
7
  patient
8
- test_description "Test for HepB"
9
- sample_number_bottles 1
10
- sample_type nil
8
+ test_description { "Test for HepB" }
9
+ sample_number_bottles { 1 }
10
+ sample_type { nil }
11
11
  frequency_type { Renalware::Pathology::Requests::Frequency.all_names.sample }
12
- start_date nil
13
- end_date nil
12
+ start_date { nil }
13
+ end_date { nil }
14
14
  end
15
15
  end
@@ -4,6 +4,6 @@ FactoryBot.define do
4
4
  factory :patient_alert, class: "Renalware::Patients::Alert" do
5
5
  accountable
6
6
  notes { Faker::Lorem.sentence }
7
- urgent true
7
+ urgent { true }
8
8
  end
9
9
  end
@@ -3,6 +3,6 @@
3
3
  FactoryBot.define do
4
4
  factory :patients_bookmark, class: "Renalware::Patients::Bookmark" do
5
5
  notes { Faker::Lorem.sentence }
6
- urgent true
6
+ urgent { true }
7
7
  end
8
8
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :ethnicity, class: "Renalware::Patients::Ethnicity" do
5
- name "White - British"
6
- rr18_code "A"
5
+ name { "White - British" }
6
+ rr18_code { "A" }
7
7
 
8
8
  trait :white_british do
9
9
  end
@@ -2,22 +2,22 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :language, class: "Renalware::Patients::Language" do
5
- name "English"
6
- code "en"
5
+ name { "English" }
6
+ code { "en" }
7
7
 
8
8
  trait :english do
9
- name "English"
10
- code "en"
9
+ name { "English" }
10
+ code { "en" }
11
11
  end
12
12
 
13
13
  trait :afrikaans do
14
- name "Afrikaans"
15
- code "af"
14
+ name { "Afrikaans" }
15
+ code { "af" }
16
16
  end
17
17
 
18
18
  trait :unknown do
19
- name "Unknown"
20
- code "un"
19
+ name { "Unknown" }
20
+ code { "un" }
21
21
  end
22
22
  end
23
23
  end
@@ -14,13 +14,13 @@ FactoryBot.define do
14
14
  nhs_number
15
15
  secure_id { SecureRandom.base58(24) }
16
16
  local_patient_id
17
- family_name "Jones"
18
- given_name "Jack"
19
- born_on "01/01/1988"
20
- paediatric_patient_indicator "0"
21
- sex "M"
22
- died_on nil
23
- first_cause_id nil
17
+ family_name { "Jones" }
18
+ given_name { "Jack" }
19
+ born_on { "01/01/1988" }
20
+ paediatric_patient_indicator { "0" }
21
+ sex { "M" }
22
+ died_on { nil }
23
+ first_cause_id { nil }
24
24
 
25
25
  # ensures addressable_type and addressable_id work is assigned, using
26
26
  # FactoryBot's simple assoc method does not work
@@ -4,6 +4,6 @@ FactoryBot.define do
4
4
  factory :practice_membership, class: "Renalware::Patients::PracticeMembership" do
5
5
  practice
6
6
  primary_care_physician
7
- deleted_at nil
7
+ deleted_at { nil }
8
8
  end
9
9
  end
@@ -5,8 +5,8 @@ FactoryBot.define do
5
5
  "PR432#{n}"
6
6
  end
7
7
  factory :practice, class: "Renalware::Patients::Practice" do
8
- name "Trumpton Medical Centre"
9
- email "admin@trumptonmedicalcentre-nhs.net"
8
+ name { "Trumpton Medical Centre" }
9
+ email { "admin@trumptonmedicalcentre-nhs.net" }
10
10
  code { generate(:practice_code) }
11
11
 
12
12
  # ensures addressable_type and addressable_id work is assigned, using
@@ -6,10 +6,10 @@ FactoryBot.define do
6
6
  end
7
7
 
8
8
  factory :primary_care_physician, class: "Renalware::Patients::PrimaryCarePhysician" do
9
- name "GOOD PJ"
10
- telephone "0203593082"
9
+ name { "GOOD PJ" }
10
+ telephone { "0203593082" }
11
11
  code { generate(:gp_code) }
12
- practitioner_type "GP"
12
+ practitioner_type { "GP" }
13
13
 
14
14
  # ensures addressable_type and addressable_id work is assigned, using
15
15
  # FactoryBot's simple assoc method does not work
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :patients_religion, class: "Renalware::Patients::Religion" do
5
- name "Christian"
5
+ name { "Christian" }
6
6
  end
7
7
  end
@@ -2,18 +2,18 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :bag_type, class: "Renalware::PD::BagType" do
5
- manufacturer "Star Brand, Lucky Brand"
6
- description "Green–2.34"
7
- glucose_content 2.8
8
- glucose_strength :medium
9
- amino_acid true
10
- icodextrin false
11
- low_glucose_degradation true
12
- low_sodium false
13
- sodium_content 20
14
- lactate_content 25
15
- bicarbonate_content 47
16
- calcium_content 1.56
17
- magnesium_content 2.67
5
+ manufacturer { "Star Brand, Lucky Brand" }
6
+ description { "Green–2.34" }
7
+ glucose_content { 2.8 }
8
+ glucose_strength { :medium }
9
+ amino_acid { true }
10
+ icodextrin { false }
11
+ low_glucose_degradation { true }
12
+ low_sodium { false }
13
+ sodium_content { 20 }
14
+ lactate_content { 25 }
15
+ bicarbonate_content { 47 }
16
+ calcium_content { 1.56 }
17
+ magnesium_content { 2.67 }
18
18
  end
19
19
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :episode_type, class: "Renalware::PD::EpisodeType" do
5
- term "De novo"
6
- definition "First infection."
5
+ term { "De novo" }
6
+ definition { "First infection." }
7
7
  end
8
8
  end
@@ -3,9 +3,9 @@
3
3
  FactoryBot.define do
4
4
  factory :exit_site_infection, class: "Renalware::PD::ExitSiteInfection" do
5
5
  patient
6
- diagnosis_date "01/04/2015"
7
- treatment "Having treatment for exit site infection."
8
- outcome "Outcome is satisfactory."
9
- notes "Review in 2 weeks time, observe for temperature."
6
+ diagnosis_date { "01/04/2015" }
7
+ treatment { "Having treatment for exit site infection." }
8
+ outcome { "Outcome is satisfactory." }
9
+ notes { "Review in 2 weeks time, observe for temperature." }
10
10
  end
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :fluid_description, class: "Renalware::PD::FluidDescription" do
5
- description "Clear"
5
+ description { "Clear" }
6
6
  end
7
7
  end
@@ -3,9 +3,9 @@
3
3
  FactoryBot.define do
4
4
  factory :infection_organism, class: "Renalware::PD::InfectionOrganism" do
5
5
  organism_code
6
- sensitivity "Sensitive to MRSA."
6
+ sensitivity { "Sensitive to MRSA." }
7
7
  infectable factory: :peritonitis_episode
8
- created_at "2015-03-03 15:30:00"
9
- updated_at "2015-03-05 15:30:00"
8
+ created_at { "2015-03-03 15:30:00" }
9
+ updated_at { "2015-03-05 15:30:00" }
10
10
  end
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :pd_modality_description, class: "Renalware::PD::ModalityDescription" do
5
- name "PD"
5
+ name { "PD" }
6
6
  end
7
7
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :organism_code, class: "Renalware::PD::OrganismCode" do
5
- code "7"
6
- name "Staphylococcus aureus"
5
+ code { "7" }
6
+ name { "Staphylococcus aureus" }
7
7
  end
8
8
  end
@@ -7,31 +7,31 @@ FactoryBot.define do
7
7
 
8
8
  factory :capd_regime, class: "Renalware::PD::CAPDRegime" do
9
9
  patient
10
- start_date "01/02/2015"
11
- end_date "01/02/2020"
12
- treatment "CAPD 3 exchanges per day"
13
- amino_acid_volume 40
14
- icodextrin_volume 50
15
- add_hd false
10
+ start_date { "01/02/2015" }
11
+ end_date { "01/02/2020" }
12
+ treatment { "CAPD 3 exchanges per day" }
13
+ amino_acid_volume { 40 }
14
+ icodextrin_volume { 50 }
15
+ add_hd { false }
16
16
  end
17
17
 
18
18
  factory :apd_regime, class: "Renalware::PD::APDRegime" do
19
19
  patient
20
- start_date "01/03/2015"
21
- end_date "02/04/2020"
22
- treatment "APD Wet day with additional exchange"
23
- amino_acid_volume 43
24
- icodextrin_volume 53
25
- add_hd false
26
- last_fill_volume 630
27
- fill_volume 1500
20
+ start_date { "01/03/2015" }
21
+ end_date { "02/04/2020" }
22
+ treatment { "APD Wet day with additional exchange" }
23
+ amino_acid_volume { 43 }
24
+ icodextrin_volume { 53 }
25
+ add_hd { false }
26
+ last_fill_volume { 630 }
27
+ fill_volume { 1500 }
28
28
  # tidal_indicator true
29
29
  # tidal_percentage 70
30
- tidal_indicator false
31
- tidal_percentage nil
32
- tidal_full_drain_every_three_cycles nil
33
- no_cycles_per_apd 7
34
- overnight_volume 5100
35
- apd_machine_pac "123-4567-890"
30
+ tidal_indicator { false }
31
+ tidal_percentage { nil }
32
+ tidal_full_drain_every_three_cycles { nil }
33
+ no_cycles_per_apd { 7 }
34
+ overnight_volume { 5100 }
35
+ apd_machine_pac { "123-4567-890" }
36
36
  end
37
37
  end