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.
- checksums.yaml +4 -4
- data/app/controllers/renalware/api/ukrdc/patients_controller.rb +2 -1
- data/app/views/renalware/hd/transmission_logs/index.html.slim +3 -3
- data/app/views/renalware/patients/side_menu/_actions.html.slim +1 -1
- data/app/views/renalware/renal/aki_alerts/_aki_alert.html.slim +1 -1
- data/app/views/renalware/renal/aki_alerts/_filters.html.slim +1 -1
- data/lib/renalware/version.rb +1 -1
- data/spec/factories/accesses/plans.rb +2 -2
- data/spec/factories/accesses/plans_types.rb +1 -1
- data/spec/factories/accesses/procedures.rb +1 -1
- data/spec/factories/accesses/profiles.rb +1 -1
- data/spec/factories/accesses/sites.rb +2 -2
- data/spec/factories/accesses/types.rb +4 -4
- data/spec/factories/admissions/admissions.rb +2 -2
- data/spec/factories/admissions/consults.rb +4 -4
- data/spec/factories/admissions/request_reasons.rb +1 -1
- data/spec/factories/admissions/requests.rb +1 -1
- data/spec/factories/clinical/body_compositions.rb +12 -12
- data/spec/factories/clinical/dry_weights.rb +1 -1
- data/spec/factories/clinics/clinic_visits.rb +6 -6
- data/spec/factories/clinics/clinics.rb +1 -1
- data/spec/factories/deaths/cause.rb +2 -2
- data/spec/factories/drugs/drug.rb +1 -1
- data/spec/factories/drugs/drug_types.rb +6 -6
- data/spec/factories/events/events.rb +2 -2
- data/spec/factories/events/events_types.rb +14 -14
- data/spec/factories/feeds/file_types.rb +7 -7
- data/spec/factories/hd/cannulation_types.rb +1 -1
- data/spec/factories/hd/dialysates.rb +5 -5
- data/spec/factories/hd/dialysers.rb +4 -4
- data/spec/factories/hd/diaries.rb +4 -4
- data/spec/factories/hd/diurnal_period_codes.rb +4 -4
- data/spec/factories/hd/hd_session_document.rb +28 -28
- data/spec/factories/hd/patient_statistics.rb +20 -20
- data/spec/factories/hd/preference_sets.rb +1 -1
- data/spec/factories/hd/profiles.rb +1 -1
- data/spec/factories/hd/schedule_definitions.rb +4 -4
- data/spec/factories/hd/sessions.rb +4 -4
- data/spec/factories/hd/station_locations.rb +2 -2
- data/spec/factories/hd/stations.rb +1 -1
- data/spec/factories/hd/transmission_logs.rb +4 -4
- data/spec/factories/hospitals/centres.rb +2 -2
- data/spec/factories/hospitals/units.rb +5 -5
- data/spec/factories/hospitals/wards.rb +1 -1
- data/spec/factories/letters/archives.rb +1 -1
- data/spec/factories/letters/contact_descriptions.rb +2 -2
- data/spec/factories/letters/descriptions.rb +1 -1
- data/spec/factories/letters/letterheads.rb +6 -6
- data/spec/factories/letters/letters.rb +2 -2
- data/spec/factories/letters/recipients.rb +2 -2
- data/spec/factories/medications/medication_route.rb +4 -4
- data/spec/factories/medications/prescription.rb +5 -5
- data/spec/factories/medications/prescription_terminations.rb +1 -1
- data/spec/factories/messaging/internal/messages.rb +4 -4
- data/spec/factories/messaging/internal/receipts.rb +1 -1
- data/spec/factories/modalities/modalities.rb +1 -1
- data/spec/factories/modalities/modality_descriptions.rb +13 -13
- data/spec/factories/modalities/modality_reasons.rb +5 -5
- data/spec/factories/pathology/measurement_units.rb +1 -1
- data/spec/factories/pathology/observation_descriptions.rb +7 -7
- data/spec/factories/pathology/observation_requests.rb +1 -1
- data/spec/factories/pathology/observations.rb +3 -3
- data/spec/factories/pathology/request_descriptions.rb +1 -1
- data/spec/factories/pathology/requests/drug_category.rb +1 -1
- data/spec/factories/pathology/requests/global_rule.rb +3 -3
- data/spec/factories/pathology/requests/patient_rule.rb +5 -5
- data/spec/factories/patients/alerts.rb +1 -1
- data/spec/factories/patients/bookmarks.rb +1 -1
- data/spec/factories/patients/ethnicities.rb +2 -2
- data/spec/factories/patients/languages.rb +8 -8
- data/spec/factories/patients/patients.rb +7 -7
- data/spec/factories/patients/practice_memberships.rb +1 -1
- data/spec/factories/patients/practices.rb +2 -2
- data/spec/factories/patients/primary_care_physicians.rb +3 -3
- data/spec/factories/patients/religions.rb +1 -1
- data/spec/factories/pd/bag_types.rb +13 -13
- data/spec/factories/pd/episode_types.rb +2 -2
- data/spec/factories/pd/exit_site_infections.rb +4 -4
- data/spec/factories/pd/fluid_descriptions.rb +1 -1
- data/spec/factories/pd/infection_organisms.rb +3 -3
- data/spec/factories/pd/modality_descriptions.rb +1 -1
- data/spec/factories/pd/organism_codes.rb +2 -2
- data/spec/factories/pd/pd_regimes.rb +20 -20
- data/spec/factories/pd/peritonitis_episodes.rb +14 -14
- data/spec/factories/pd/regime_bags.rb +30 -30
- data/spec/factories/pd/systems.rb +2 -2
- data/spec/factories/pd/training_sites.rb +2 -2
- data/spec/factories/pd/training_types.rb +1 -1
- data/spec/factories/problems/problems.rb +1 -1
- data/spec/factories/renal/aki_alert_actions.rb +1 -1
- data/spec/factories/renal/aki_alerts.rb +2 -2
- data/spec/factories/renal/prd_description.rb +2 -2
- data/spec/factories/renal/profiles.rb +2 -2
- data/spec/factories/reporting/audits.rb +4 -4
- data/spec/factories/research/studies.rb +2 -2
- data/spec/factories/system/addresses.rb +6 -6
- data/spec/factories/system/countries.rb +6 -6
- data/spec/factories/system/feedback.rb +3 -3
- data/spec/factories/system/messages.rb +2 -2
- data/spec/factories/system/roles.rb +7 -7
- data/spec/factories/system/templates.rb +8 -8
- data/spec/factories/system/users.rb +12 -12
- data/spec/factories/transplants/donations.rb +2 -2
- data/spec/factories/transplants/donor_stage.rb +3 -3
- data/spec/factories/transplants/live_donor_modality_description.rb +1 -1
- data/spec/factories/transplants/modality_descriptions.rb +1 -1
- data/spec/factories/transplants/recipient_operations.rb +4 -4
- data/spec/factories/transplants/registration_status_descriptions.rb +2 -2
- data/spec/factories/transplants/registrations.rb +1 -1
- data/spec/support/pathology_spec_helper.rb +1 -1
- 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
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|