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
@@ -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
|
@@ -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
|
|
@@ -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
|
@@ -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
|
@@ -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
|
|
@@ -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 }
|
@@ -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
|