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
@@ -2,13 +2,13 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :hd_weekly_diary, class: "Renalware::HD::WeeklyDiary" do
5
- year 2017
6
- week_number 2
7
- master false
5
+ year { 2017 }
6
+ week_number { 2 }
7
+ master { false }
8
8
  association :master_diary, factory: :hd_master_diary
9
9
  end
10
10
 
11
11
  factory :hd_master_diary, class: "Renalware::HD::MasterDiary" do
12
- master true
12
+ master { true }
13
13
  end
14
14
  end
@@ -3,18 +3,18 @@
3
3
  FactoryBot.define do
4
4
  factory :hd_diurnal_period_code, class: "Renalware::HD::DiurnalPeriodCode" do
5
5
  initialize_with { Renalware::HD::DiurnalPeriodCode.find_or_create_by(code: code) }
6
- code "am"
6
+ code { "am" }
7
7
 
8
8
  trait :am do
9
- code "am"
9
+ code { "am" }
10
10
  end
11
11
 
12
12
  trait :pm do
13
- code "pm"
13
+ code { "pm" }
14
14
  end
15
15
 
16
16
  trait :eve do
17
- code "eve"
17
+ code { "eve" }
18
18
  end
19
19
  end
20
20
  end
@@ -17,47 +17,47 @@
17
17
  #
18
18
  FactoryBot.define do
19
19
  factory :blood_pressure, class: OpenStruct do
20
- systolic 100
21
- diastolic 80
20
+ systolic { 100 }
21
+ diastolic { 80 }
22
22
  end
23
23
 
24
24
  factory :hd_session_document_info, class: OpenStruct do
25
- hd_type "hd"
26
- machine_no 222
27
- access_side "right"
28
- access_type "Arteriovenous graft (AVG)"
29
- access_type_abbreviation "AVG"
30
- access_confirmed true
31
- single_needle "no"
32
- lines_reversed "no"
33
- fistula_plus_line "no"
34
- is_access_first_use "no"
25
+ hd_type { "hd" }
26
+ machine_no { 222 }
27
+ access_side { "right" }
28
+ access_type { "Arteriovenous graft (AVG)" }
29
+ access_type_abbreviation { "AVG" }
30
+ access_confirmed { true }
31
+ single_needle { "no" }
32
+ lines_reversed { "no" }
33
+ fistula_plus_line { "no" }
34
+ is_access_first_use { "no" }
35
35
  end
36
36
 
37
37
  factory :hd_session_document_dialysis, class: OpenStruct do
38
- flow_rate 200
39
- blood_flow 150
40
- machine_ktv 1.0
41
- machine_urr 1
42
- fluid_removed 1.0
43
- venous_pressure 1
44
- litres_processed 1.0
45
- arterial_pressure 1
38
+ flow_rate { 200 }
39
+ blood_flow { 150 }
40
+ machine_ktv { 1.0 }
41
+ machine_urr { 1 }
42
+ fluid_removed { 1.0 }
43
+ venous_pressure { 1 }
44
+ litres_processed { 1.0 }
45
+ arterial_pressure { 1 }
46
46
  end
47
47
 
48
48
  factory :hd_session_document_observations_before, class: OpenStruct do
49
- pulse 37
50
- weight 100.0
51
- bm_stix 1.0
52
- temperature 36.0
49
+ pulse { 37 }
50
+ weight { 100.0 }
51
+ bm_stix { 1.0 }
52
+ temperature { 36.0 }
53
53
  blood_pressure factory: :blood_pressure, strategy: :marshal_dump
54
54
  end
55
55
 
56
56
  factory :hd_session_document_observations_after, class: OpenStruct do
57
- pulse 36
58
- weight 99.0
59
- bm_stix 0.9
60
- temperature 35.0
57
+ pulse { 36 }
58
+ weight { 99.0 }
59
+ bm_stix { 0.9 }
60
+ temperature { 35.0 }
61
61
  blood_pressure factory: :blood_pressure, strategy: :marshal_dump
62
62
  end
63
63
 
@@ -4,26 +4,26 @@ FactoryBot.define do
4
4
  factory :hd_patient_statistics, class: "Renalware::HD::PatientStatistics" do
5
5
  patient factory: :hd_patient
6
6
  association :hospital_unit, factory: :hospital_unit
7
- month 1
8
- year 2018
7
+ month { 1 }
8
+ year { 2018 }
9
9
  # rolling false
10
- pre_mean_systolic_blood_pressure 0
11
- pre_mean_diastolic_blood_pressure 0
12
- post_mean_systolic_blood_pressure 0
13
- post_mean_diastolic_blood_pressure 0
14
- lowest_systolic_blood_pressure 0
15
- highest_systolic_blood_pressure 0
16
- mean_fluid_removal 0
17
- mean_weight_loss 0
18
- mean_machine_ktv 0
19
- mean_blood_flow 0
20
- mean_litres_processed 0
21
- session_count 0
22
- number_of_missed_sessions 0
23
- dialysis_minutes_shortfall 0
24
- dialysis_minutes_shortfall_percentage 0
25
- mean_ufr 0
26
- mean_weight_loss_as_percentage_of_body_weight 0
27
- number_of_sessions_with_dialysis_minutes_shortfall_gt_5_pct 0
10
+ pre_mean_systolic_blood_pressure { 0 }
11
+ pre_mean_diastolic_blood_pressure { 0 }
12
+ post_mean_systolic_blood_pressure { 0 }
13
+ post_mean_diastolic_blood_pressure { 0 }
14
+ lowest_systolic_blood_pressure { 0 }
15
+ highest_systolic_blood_pressure { 0 }
16
+ mean_fluid_removal { 0 }
17
+ mean_weight_loss { 0 }
18
+ mean_machine_ktv { 0 }
19
+ mean_blood_flow { 0 }
20
+ mean_litres_processed { 0 }
21
+ session_count { 0 }
22
+ number_of_missed_sessions { 0 }
23
+ dialysis_minutes_shortfall { 0 }
24
+ dialysis_minutes_shortfall_percentage { 0 }
25
+ mean_ufr { 0 }
26
+ mean_weight_loss_as_percentage_of_body_weight { 0 }
27
+ number_of_sessions_with_dialysis_minutes_shortfall_gt_5_pct { 0 }
28
28
  end
29
29
  end
@@ -6,6 +6,6 @@ FactoryBot.define do
6
6
  patient
7
7
  association :hospital_unit, factory: :hospital_unit
8
8
  association :schedule_definition, :mon_wed_fri_pm
9
- other_schedule ""
9
+ other_schedule { "" }
10
10
  end
11
11
  end
@@ -4,7 +4,7 @@ FactoryBot.define do
4
4
  factory :hd_profile, class: "Renalware::HD::Profile" do
5
5
  accountable
6
6
  patient
7
- active true
7
+ active { true }
8
8
  association :hospital_unit, factory: :hospital_unit
9
9
  association :dialysate, factory: :hd_dialysate
10
10
  prescriber { accountable_actor }
@@ -10,14 +10,14 @@ FactoryBot.define do
10
10
  end
11
11
 
12
12
  trait :mon_wed_fri_am do
13
- days [1, 3, 5]
14
- days_text "Mon Wed Fri"
13
+ days { [1, 3, 5] }
14
+ days_text { "Mon Wed Fri" }
15
15
  association :diurnal_period, :am, factory: :hd_diurnal_period_code
16
16
  end
17
17
 
18
18
  trait :mon_wed_fri_pm do
19
- days [1, 3, 5]
20
- days_text "Mon Wed Fri"
19
+ days { [1, 3, 5] }
20
+ days_text { "Mon Wed Fri" }
21
21
  association :diurnal_period, :pm, factory: :hd_diurnal_period_code
22
22
  end
23
23
  end
@@ -10,10 +10,10 @@ FactoryBot.define do
10
10
  signed_on_by { accountable_actor }
11
11
 
12
12
  performed_on { 1.week.ago }
13
- notes "Some notes"
13
+ notes { "Some notes" }
14
14
 
15
15
  factory :hd_open_session do
16
- start_time "11:00"
16
+ start_time { "11:00" }
17
17
  end
18
18
 
19
19
  factory :hd_dna_session, class: "Renalware::HD::Session::DNA" do
@@ -25,8 +25,8 @@ FactoryBot.define do
25
25
  end
26
26
 
27
27
  factory :hd_closed_session, class: "Renalware::HD::Session::Closed" do
28
- start_time "11:00"
29
- end_time "16:00"
28
+ start_time { "11:00" }
29
+ end_time { "16:00" }
30
30
  signed_off_at { 1.day.ago }
31
31
  signed_off_by { accountable_actor }
32
32
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :hd_station_location, class: "Renalware::HD::StationLocation" do
5
- name "Side room"
6
- colour "#EEEEEE"
5
+ name { "Side room" }
6
+ colour { "#EEEEEE" }
7
7
  end
8
8
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :hd_station, class: "Renalware::HD::Station" do
5
- name "StationA"
5
+ name { "StationA" }
6
6
  end
7
7
  end
@@ -3,13 +3,13 @@
3
3
  FactoryBot.define do
4
4
  factory :hd_transmission_log, class: "Renalware::HD::TransmissionLog" do
5
5
  trait :outgoing_hl7 do
6
- direction :out
7
- format :hl7
6
+ direction { :out }
7
+ format { :hl7 }
8
8
  end
9
9
 
10
10
  trait :incoming_xml do
11
- direction :in
12
- format :xml
11
+ direction { :in }
12
+ format { :xml }
13
13
  end
14
14
  end
15
15
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :hospital_centre, class: "Renalware::Hospitals::Centre" do
5
- name "King's College Hospital"
6
- code "RJZ"
5
+ name { "King's College Hospital" }
6
+ code { "RJZ" }
7
7
  end
8
8
  end
@@ -3,13 +3,13 @@
3
3
  FactoryBot.define do
4
4
  factory :hospital_unit, class: "Renalware::Hospitals::Unit" do
5
5
  hospital_centre
6
- name "King's College Hospital"
7
- unit_code "UJZ"
8
- renal_registry_code "RJZ"
9
- unit_type :hospital
6
+ name { "King's College Hospital" }
7
+ unit_code { "UJZ" }
8
+ renal_registry_code { "RJZ" }
9
+ unit_type { :hospital }
10
10
 
11
11
  factory :hd_hospital_unit do
12
- is_hd_site true
12
+ is_hd_site { true }
13
13
  end
14
14
  end
15
15
  end
@@ -6,6 +6,6 @@ FactoryBot.define do
6
6
  Renalware::Hospitals::Ward.find_or_create_by!(name: name, hospital_unit: hospital_unit)
7
7
  end
8
8
  hospital_unit
9
- name "Ward A"
9
+ name { "Ward A" }
10
10
  end
11
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :letter_archive, class: "Renalware::Letters::Archive" do
5
- content ":html-content:"
5
+ content { ":html-content:" }
6
6
  end
7
7
  end
@@ -11,8 +11,8 @@ FactoryBot.define do
11
11
  position
12
12
 
13
13
  trait :unspecified do
14
- name "Other"
15
- system_code "other"
14
+ name { "Other" }
15
+ system_code { "other" }
16
16
  end
17
17
  end
18
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :letter_description, class: "Renalware::Letters::Description" do
5
- text "Clinic letter"
5
+ text { "Clinic letter" }
6
6
  end
7
7
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :letter_letterhead, class: "Renalware::Letters::Letterhead" do
5
- name "KCH"
6
- site_code "KCH"
7
- unit_info "KCH"
8
- trust_name "KCH TRUST"
9
- trust_caption "KCH TRUST"
10
- site_info "Lorem ipsum"
5
+ name { "KCH" }
6
+ site_code { "KCH" }
7
+ unit_info { "KCH" }
8
+ trust_name { "KCH TRUST" }
9
+ trust_caption { "KCH TRUST" }
10
+ site_info { "Lorem ipsum" }
11
11
  end
12
12
  end
@@ -5,8 +5,8 @@ FactoryBot.define do
5
5
  accountable
6
6
 
7
7
  issued_on { Time.zone.today }
8
- description "This is a custom description"
9
- body "I am pleased to report a marked improvement in her condition."
8
+ description { "This is a custom description" }
9
+ body { "I am pleased to report a marked improvement in her condition." }
10
10
 
11
11
  association :letterhead, factory: [:letter_letterhead]
12
12
 
@@ -3,11 +3,11 @@
3
3
  FactoryBot.define do
4
4
  factory :letter_recipient, class: "Renalware::Letters::Recipient" do
5
5
  trait :main do
6
- role "main"
6
+ role { "main" }
7
7
  end
8
8
 
9
9
  trait :cc do
10
- role "cc"
10
+ role { "cc" }
11
11
  end
12
12
  end
13
13
  end
@@ -2,12 +2,12 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :medication_route, class: "Renalware::Medications::MedicationRoute" do
5
- code "PO"
6
- name "Per Oral"
5
+ code { "PO" }
6
+ name { "Per Oral" }
7
7
  end
8
8
 
9
9
  trait :other do
10
- code "Other"
11
- name "Other"
10
+ code { "Other" }
11
+ name { "Other" }
12
12
  end
13
13
  end
@@ -5,12 +5,12 @@ FactoryBot.define do
5
5
  accountable
6
6
  patient
7
7
  drug
8
- dose_amount "20"
9
- dose_unit "milligram"
8
+ dose_amount { "20" }
9
+ dose_unit { "milligram" }
10
10
  medication_route
11
- frequency "daily"
12
- notes "with food"
13
- provider 0
11
+ frequency { "daily" }
12
+ notes { "with food" }
13
+ provider { 0 }
14
14
  prescribed_on { 2.weeks.ago }
15
15
 
16
16
  before(:create) { |prescription| prescription.treatable ||= prescription.patient }
@@ -3,6 +3,6 @@
3
3
  FactoryBot.define do
4
4
  factory :prescription_termination, class: "Renalware::Medications::PrescriptionTermination" do
5
5
  accountable
6
- terminated_on "2016-07-26"
6
+ terminated_on { "2016-07-26" }
7
7
  end
8
8
  end
@@ -2,12 +2,12 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :internal_message, class: "Renalware::Messaging::Internal::Message" do
5
- body "The body"
6
- subject "The subject"
7
- urgent false
5
+ body { "The body" }
6
+ subject { "The subject" }
7
+ urgent { false }
8
8
  association :author, factory: :author
9
9
  sent_at { Time.zone.now }
10
10
  association :patient
11
- receipts []
11
+ receipts { [] }
12
12
  end
13
13
  end