renalware-core 2.0.0.pre.rc9 → 2.0.0.pre.rc10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/renalware/modules/_clinics.scss +1 -1
- data/app/assets/stylesheets/renalware/modules/_letters.scss +7 -0
- data/app/assets/stylesheets/renalware/partials/_navigation.scss +1 -1
- data/app/controllers/renalware/api/ukrdc/patients_controller.rb +2 -1
- data/app/controllers/renalware/application_controller.rb +13 -0
- data/app/controllers/renalware/base_controller.rb +0 -2
- data/app/controllers/renalware/concerns/cache_busting.rb +21 -0
- data/app/controllers/renalware/devise/passwords_controller.rb +0 -2
- data/app/controllers/renalware/devise/registrations_controller.rb +0 -2
- data/app/controllers/renalware/devise/sessions_controller.rb +0 -2
- data/app/controllers/renalware/events/events_controller.rb +2 -0
- data/app/controllers/renalware/letters/letters_controller.rb +1 -1
- data/app/controllers/renalware/pd/bag_types_controller.rb +1 -1
- data/app/controllers/renalware/virology/dashboards_controller.rb +15 -0
- data/app/controllers/renalware/virology/vaccinations_controller.rb +11 -0
- data/app/documents/renalware/patient_document.rb +9 -0
- data/app/jobs/hl7_message_example.yml +12 -12
- data/app/models/renalware/events/event.rb +28 -3
- data/app/models/renalware/pathology/create_observation_requests.rb +2 -1
- data/app/models/renalware/pathology/observation_description.rb +2 -0
- data/app/models/renalware/pathology/observation_descriptions_by_code_query.rb +2 -1
- data/app/models/renalware/pathology/observation_requests_attributes_builder.rb +14 -1
- data/app/models/renalware/pd/bag_type.rb +2 -0
- data/app/models/renalware/pd/capd_regime.rb +5 -1
- data/app/models/renalware/virology.rb +13 -0
- data/app/models/renalware/virology/profile.rb +8 -0
- data/app/models/renalware/virology/vaccination.rb +24 -0
- data/app/policies/renalware/virology/dasboard_policy.rb +8 -0
- data/app/policies/renalware/virology/vaccination_policy.rb +8 -0
- data/app/presenters/renalware/admissions/summary_part.rb +30 -0
- data/app/presenters/renalware/events/summary_part.rb +31 -0
- data/app/presenters/renalware/letters/summary_part.rb +48 -0
- data/app/presenters/renalware/medications/summary_part.rb +23 -0
- data/app/presenters/renalware/problems/summary_part.rb +19 -0
- data/app/presenters/renalware/renal/clinical_summary_presenter.rb +5 -90
- data/app/presenters/renalware/summary_part.rb +34 -0
- data/app/views/renalware/admissions/_summary_part.html.slim +14 -0
- data/app/views/renalware/clinical/_header.html.slim +3 -3
- data/app/views/renalware/clinics/visits/index.html.slim +0 -1
- data/app/views/renalware/events/events/_event.html.slim +2 -2
- data/app/views/renalware/events/events/_form.html.slim +1 -2
- data/app/views/renalware/events/events/_summary_part.html.slim +15 -0
- data/app/views/renalware/events/events/new.js.erb +2 -3
- data/app/views/renalware/events/events/simple/_event.html.slim +1 -2
- data/app/views/renalware/layouts/_patient.html.slim +1 -0
- data/app/views/renalware/letters/_summary_part.html.slim +16 -0
- data/app/views/renalware/letters/letters/index.html.slim +3 -3
- data/app/views/renalware/mdm_patients/_table.html.slim +1 -1
- data/app/views/renalware/medications/_summary_part.html.slim +18 -0
- data/app/views/renalware/patients/clinical_summaries/show.html.slim +6 -32
- data/app/views/renalware/patients/patients/_form.html.slim +13 -0
- data/app/views/renalware/patients/patients/show.html.slim +2 -0
- data/app/views/renalware/patients/patients/show/_psychosocial.html.slim +15 -0
- data/app/views/renalware/patients/side_menu/_general.html.slim +4 -0
- data/app/views/renalware/problems/problems/_summary_part.html.slim +16 -0
- data/app/views/renalware/virology/dashboards/_actions.html.slim +10 -0
- data/app/views/renalware/virology/dashboards/show.html.slim +6 -0
- data/app/views/renalware/virology/vaccinations/_cell.html.slim +2 -0
- data/app/views/renalware/virology/vaccinations/_inputs.html.slim +4 -0
- data/app/views/renalware/virology/vaccinations/_list.html.slim +14 -0
- data/app/views/renalware/virology/vaccinations/_toggled_cell.html.slim +8 -0
- data/config/locales/en-GB.yml +1 -3
- data/config/locales/en.yml +0 -11
- data/config/locales/renalware/age.yml +0 -1
- data/config/locales/renalware/clinical/allergies.en.yml +0 -3
- data/config/locales/renalware/clinical/body_composition.yml +0 -2
- data/config/locales/renalware/clinical/dry_weight.en.yml +0 -2
- data/config/locales/renalware/clinics/visit.yml +0 -2
- data/config/locales/renalware/feeds/file.en.yml +0 -1
- data/config/locales/renalware/hd/diary_slots.en.yml +0 -1
- data/config/locales/renalware/hd/prescription_administration.en.yml +0 -1
- data/config/locales/renalware/hd/session.en.yml +0 -1
- data/config/locales/renalware/hospitals/unit.yml +0 -2
- data/config/locales/renalware/letters/contact.en.yml +0 -1
- data/config/locales/renalware/letters/letter.en.yml +0 -2
- data/config/locales/renalware/low_clearance/profile.en.yml +0 -1
- data/config/locales/renalware/medications/prescription.yml +0 -2
- data/config/locales/renalware/messaging/internal/messages.en.yml +0 -2
- data/config/locales/renalware/patient.yml +0 -2
- data/config/locales/renalware/patients/side_menu.en.yml +1 -1
- data/config/locales/renalware/pd/assessments.en.yml +0 -1
- data/config/locales/renalware/pd/bag_types.yml +0 -2
- data/config/locales/renalware/pd/regime.en.yml +0 -2
- data/config/locales/renalware/pd/training_sessions.en.yml +0 -1
- data/config/locales/renalware/renal/profile.en.yml +0 -1
- data/config/locales/renalware/renal/registry.en.yml +0 -2
- data/config/locales/renalware/research/study_participant.en.yml +0 -1
- data/config/locales/renalware/snippets/snippets.en.yml +0 -1
- data/config/locales/renalware/transplants/donation.yml +0 -3
- data/config/locales/renalware/transplants/donor_followup.yml +0 -4
- data/config/locales/renalware/transplants/donor_operation.yml +0 -4
- data/config/locales/renalware/transplants/donor_workup.yml +0 -4
- data/config/locales/renalware/transplants/recipient_followup.yml +0 -2
- data/config/locales/renalware/transplants/recipient_operation.yml +0 -4
- data/config/locales/renalware/transplants/recipient_workup.yml +0 -4
- data/config/locales/renalware/transplants/registration.yml +0 -4
- data/config/locales/renalware/virology/virology.en.yml +18 -0
- data/config/routes.rb +8 -0
- data/db/migrate/20180122173922_create_virology_profiles.rb +6 -0
- data/db/migrate/20180213171805_add_display_order_cols_to_observation_descriptions.rb +12 -0
- data/db/seeds/default/events/event_types.csv +1 -0
- data/db/seeds/default/pathology/measurement_units.csv +45 -38
- data/db/seeds/default/pathology/measurement_units.rb +1 -0
- data/lib/renalware/configuration.rb +14 -0
- data/lib/renalware/engine.rb +0 -4
- data/lib/renalware/version.rb +1 -1
- data/lib/sql/index_case_stmt.rb +6 -6
- data/spec/factories/events/events_types.rb +6 -0
- data/spec/factories/virology/vaccinations.rb +6 -0
- metadata +265 -243
- data/app/controllers/application_controller.rb +0 -6
- data/app/models/renalware/pathology/view_current_observation_results.rb.dead +0 -47
- data/app/presenters/renalware/pathology/current_observation_results.dead/html_table_view.rb.dead +0 -67
- data/app/views/renalware/layouts/application.html.slim +0 -44
- data/app/views/renalware/patients/clinical_summaries/_admissions.html.slim +0 -11
- data/app/views/renalware/patients/clinical_summaries/_events.html.slim +0 -11
- data/app/views/renalware/patients/clinical_summaries/_letters.html.slim +0 -12
- data/app/views/renalware/patients/clinical_summaries/_prescriptions.html.slim +0 -16
- data/app/views/renalware/patients/clinical_summaries/_problems.html.slim +0 -13
@@ -1,6 +1,6 @@
|
|
1
1
|
= content_for(:actions) do
|
2
|
-
- if
|
3
|
-
= render "create_letter_button_dropdown", patient:
|
2
|
+
- if patient.present?
|
3
|
+
= render "create_letter_button_dropdown", patient: patient
|
4
4
|
|
5
5
|
= within_patient_layout(title: "Letters") do
|
6
|
-
= render "table", letters: letters
|
6
|
+
= render "table", letters: letters, patient: patient
|
@@ -3,7 +3,7 @@ table#patients.mdm-patients.columns
|
|
3
3
|
thead
|
4
4
|
tr
|
5
5
|
th.col-width-large= sort_link(path, :family_name, t(".name"))
|
6
|
-
th.col-width-nhs-no= sort_link(path, :nhs_number, t(".
|
6
|
+
th.col-width-nhs-no= sort_link(path, :nhs_number, t(".nhs_no"))
|
7
7
|
th.col-width-reference-no= t(".hosp_no")
|
8
8
|
th.col-width-tiny= t(".sex")
|
9
9
|
th.col-width-tiny= t(".age")
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.columns.large-6
|
2
|
+
#current-prescriptions
|
3
|
+
article
|
4
|
+
header
|
5
|
+
h2
|
6
|
+
= link_to "Current Prescriptions (#{summary_part.current_prescriptions.length})",
|
7
|
+
patient_prescriptions_path(summary_part.patient)
|
8
|
+
|
9
|
+
= link_to patient_prescriptions_path(summary_part.patient), class: "button" do
|
10
|
+
| Add
|
11
|
+
|
12
|
+
ul.no-bullet
|
13
|
+
- summary_part.current_prescriptions.each do |prescription|
|
14
|
+
li class="drug-#{drug_types_colour_tag(prescription.drug_types)}"
|
15
|
+
= "#{prescription.drug.name}, "
|
16
|
+
= "#{prescription.dose}, "
|
17
|
+
= "#{prescription.medication_route.code} #{prescription.frequency} - "
|
18
|
+
= l(prescription.prescribed_on)
|
@@ -1,35 +1,9 @@
|
|
1
1
|
= within_patient_layout(title: "Clinical Summary") do
|
2
|
-
.row
|
3
|
-
.columns.large-6
|
4
|
-
#current-problems
|
5
|
-
= render "problems",
|
6
|
-
problems: clinical_summary.current_problems,
|
7
|
-
patient: patient
|
8
|
-
|
9
|
-
.columns.large-6
|
10
|
-
#current-prescriptions
|
11
|
-
= render "prescriptions",
|
12
|
-
prescriptions: clinical_summary.current_prescriptions,
|
13
|
-
patient: patient
|
14
2
|
|
15
3
|
.row
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
.columns.large-12.xlarge-6
|
24
|
-
#events
|
25
|
-
= render "events",
|
26
|
-
events: clinical_summary.current_events,
|
27
|
-
current_events_count: clinical_summary.current_events_count,
|
28
|
-
patient: patient
|
29
|
-
|
30
|
-
.columns.large-12.xlarge-6
|
31
|
-
#admissions
|
32
|
-
= render "admissions",
|
33
|
-
admissions: clinical_summary.admissions,
|
34
|
-
admissions_count: clinical_summary.admissions_count,
|
35
|
-
patient: patient
|
4
|
+
- patient = clinical_summary.patient
|
5
|
+
- summary_parts = clinical_summary.summary_parts.map{ |klass| klass.new(patient) }
|
6
|
+
/ Cache each SummaryPart if it defined #cache_key
|
7
|
+
- summary_parts.select(&:render?).each do |summary_part|
|
8
|
+
- cache_if summary_part.cache?, summary_part do
|
9
|
+
= render summary_part
|
@@ -117,3 +117,16 @@
|
|
117
117
|
as: :text,
|
118
118
|
wrapper: :horizontal_large,
|
119
119
|
input_html: { rows: 3 }
|
120
|
+
.columns.large-12
|
121
|
+
= field_set_tag do
|
122
|
+
legend Psychosocial
|
123
|
+
|
124
|
+
= f.simple_fields_for :document, patient.document do |patient_doc|
|
125
|
+
= patient_doc.simple_fields_for :psychosocial, patient.document.psychosocial do |psychosocial|
|
126
|
+
= psychosocial.input :housing, wrapper: :horizontal_medium
|
127
|
+
= psychosocial.input :social_network, wrapper: :horizontal_medium
|
128
|
+
= psychosocial.input :care_package, wrapper: :horizontal_medium
|
129
|
+
= psychosocial.input :other, as: :text,
|
130
|
+
wrapper: :horizontal_large,
|
131
|
+
input_html: { rows: 3 }
|
132
|
+
= psychosocial.input :updated_at, as: :date_picker, wrapper: :horizontal_datepicker
|
@@ -24,3 +24,5 @@
|
|
24
24
|
= render "renalware/patients/patients/show/contact_details", patient: patient
|
25
25
|
.columns.medium-6.large-4.xlarge-3
|
26
26
|
= render "renalware/patients/patients/show/referral", patient: patient
|
27
|
+
.columns.medium-6.large-4.xlarge-3
|
28
|
+
= render "renalware/patients/patients/show/psychosocial", patient: patient
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- psychosocial = patient.document.psychosocial
|
2
|
+
article
|
3
|
+
header
|
4
|
+
h2 Psychosocial
|
5
|
+
dl.dl-horizontal
|
6
|
+
dt Housing:
|
7
|
+
dd= psychosocial.housing
|
8
|
+
dt Social Network:
|
9
|
+
dd= psychosocial.social_network
|
10
|
+
dt Care Package
|
11
|
+
dd= psychosocial.care_package
|
12
|
+
dt Other
|
13
|
+
dd= psychosocial.other
|
14
|
+
dt Updated at
|
15
|
+
dd= l(psychosocial.updated_at)
|
@@ -34,6 +34,10 @@ li.heading= t(".heading")
|
|
34
34
|
path: patient_pathology_historical_observations_path(patient),
|
35
35
|
active_when_controller_matches: %r{renalware/pathology}
|
36
36
|
|
37
|
+
= patient_menu_item title: t(".virology", count: 0),
|
38
|
+
path: patient_virology_dashboard_path(patient),
|
39
|
+
active_when_controller_matches: %r{renalware/virology}
|
40
|
+
|
37
41
|
= patient_menu_item title: t(".prescriptions", count: summary.prescriptions_count),
|
38
42
|
path: patient_prescriptions_path(patient),
|
39
43
|
active_when_controller_matches: %r{renalware/medications}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.columns.large-6
|
2
|
+
#current-problems
|
3
|
+
article
|
4
|
+
header
|
5
|
+
h2
|
6
|
+
= link_to "Problems (#{summary_part.current_problems.length})",
|
7
|
+
patient_problems_path(summary_part.patient)
|
8
|
+
|
9
|
+
= link_to patient_problems_path(summary_part.patient), class: "button" do
|
10
|
+
| Add
|
11
|
+
|
12
|
+
ul.no-bullet
|
13
|
+
- summary_part.current_problems.each do |problem|
|
14
|
+
li
|
15
|
+
= problem.full_description
|
16
|
+
= " - #{l(problem.created_at.to_date)}"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
a.button.dropdown(href="#"
|
2
|
+
data-dropdown="virology-options"
|
3
|
+
aria-controls="virology-options"
|
4
|
+
aria-expanded="false")
|
5
|
+
| Add...
|
6
|
+
br
|
7
|
+
|
8
|
+
ul.f-dropdown#virology-options(data-dropdown-content aria-hidden="true")
|
9
|
+
= dropdown_btn_item title: t(".add_vaccination"),
|
10
|
+
url: new_patient_virology_vaccination_path(patient)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
article.vaccinations
|
2
|
+
header
|
3
|
+
h2= t(".title")
|
4
|
+
|
5
|
+
= link_to t(".add"),
|
6
|
+
new_patient_virology_vaccination_path(patient),
|
7
|
+
class: "button right"
|
8
|
+
|
9
|
+
- toggle_prefix ||= "investigation"
|
10
|
+
|
11
|
+
= render "renalware/events/events/table",
|
12
|
+
events: vaccinations,
|
13
|
+
exclude_type_column: true
|
14
|
+
/ #edit_proc: ->(vaccination) { edit_patient_vaccination_path(patient, vaccination) },
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/ See Vaccination.to_partial_path etc
|
2
|
+
- document = event.document
|
3
|
+
|
4
|
+
dl.dl-horizontal
|
5
|
+
dt= attr_name(document, :type, suffix: ":")
|
6
|
+
dd= document.type&.text || t("unspecified")
|
7
|
+
dt= attr_name(event, :notes, suffix: ":")
|
8
|
+
dd= event.notes&.html_safe || t("unspecified")
|
data/config/locales/en-GB.yml
CHANGED
@@ -5,9 +5,7 @@ en-GB:
|
|
5
5
|
:false: "No"
|
6
6
|
updated_at: "Updated on"
|
7
7
|
created_at: "Created on"
|
8
|
-
|
9
8
|
unspecified: Not specified
|
10
|
-
|
11
9
|
date:
|
12
10
|
abbr_day_names:
|
13
11
|
- Sun
|
@@ -43,6 +41,7 @@ en-GB:
|
|
43
41
|
default: "%d-%b-%Y"
|
44
42
|
long: "%a %e %b %Y"
|
45
43
|
short: "%d %b"
|
44
|
+
compact: "%d-%b-%y"
|
46
45
|
month_names:
|
47
46
|
-
|
48
47
|
- January
|
@@ -104,7 +103,6 @@ en-GB:
|
|
104
103
|
month: Month
|
105
104
|
second: Seconds
|
106
105
|
year: Year
|
107
|
-
|
108
106
|
number:
|
109
107
|
currency:
|
110
108
|
format:
|
data/config/locales/en.yml
CHANGED
@@ -1,28 +1,21 @@
|
|
1
1
|
en:
|
2
2
|
:true: "Yes"
|
3
3
|
:false: "No"
|
4
|
-
|
5
4
|
disable_with:
|
6
5
|
save: Saving...
|
7
|
-
|
8
6
|
new_record:
|
9
7
|
link_title: Add
|
10
8
|
page_title: New
|
11
|
-
|
12
9
|
edit_record:
|
13
10
|
link_title: Edit
|
14
11
|
page_title: Edit
|
15
|
-
|
16
12
|
links:
|
17
13
|
view_all: View All
|
18
|
-
|
19
14
|
modal:
|
20
15
|
close: Close
|
21
|
-
|
22
16
|
collection:
|
23
17
|
blank_option: Please select
|
24
18
|
blank_option_for_multiple: Please select one or more
|
25
|
-
|
26
19
|
enums:
|
27
20
|
letter:
|
28
21
|
state:
|
@@ -30,12 +23,10 @@ en:
|
|
30
23
|
pending_review: Pending Review
|
31
24
|
approved: Approved
|
32
25
|
completed: Completed
|
33
|
-
|
34
26
|
provider:
|
35
27
|
gp: GP
|
36
28
|
hospital: Hospital
|
37
29
|
home_delivery: Home Delivery
|
38
|
-
|
39
30
|
helpers:
|
40
31
|
label:
|
41
32
|
patient:
|
@@ -48,7 +39,6 @@ en:
|
|
48
39
|
update: Save
|
49
40
|
filter: Filter
|
50
41
|
reset: Reset
|
51
|
-
|
52
42
|
activerecord:
|
53
43
|
attributes:
|
54
44
|
renalware/event_type:
|
@@ -85,7 +75,6 @@ en:
|
|
85
75
|
bag_type_id: PD bag type
|
86
76
|
volume: "PD bag volume (ml)"
|
87
77
|
days: PD bag
|
88
|
-
|
89
78
|
errors:
|
90
79
|
format: "%{attribute} %{message}"
|
91
80
|
messages:
|
@@ -9,13 +9,11 @@ en:
|
|
9
9
|
add: Add
|
10
10
|
delete: Delete
|
11
11
|
edit: Edit
|
12
|
-
|
13
12
|
new:
|
14
13
|
title: Add allergy
|
15
14
|
description: Description
|
16
15
|
save: Add
|
17
16
|
save_disable_with: Saving...
|
18
|
-
|
19
17
|
mini:
|
20
18
|
title: Allergies
|
21
19
|
allergy_statuses:
|
@@ -23,7 +21,6 @@ en:
|
|
23
21
|
no_known_allergies: The patient reports no allergies
|
24
22
|
save: Confirm
|
25
23
|
save_disable_with: Saving...
|
26
|
-
|
27
24
|
enumerize:
|
28
25
|
renalware/patient:
|
29
26
|
allergy_status:
|
@@ -16,7 +16,6 @@ en:
|
|
16
16
|
body_cell_mass: Body Cell Mass (BCM)
|
17
17
|
quality_of_reading: Quality of Reading (Q)
|
18
18
|
notes: Notes
|
19
|
-
|
20
19
|
renalware:
|
21
20
|
clinical:
|
22
21
|
body_compositions:
|
@@ -44,4 +43,3 @@ en:
|
|
44
43
|
view_all: View All
|
45
44
|
recent:
|
46
45
|
title: Recent Body Composition Measurements
|
47
|
-
|
@@ -11,7 +11,6 @@ en:
|
|
11
11
|
weight:
|
12
12
|
out_of_range: Must be between 5.0 and 300.0 kg
|
13
13
|
invalid_number: Please enter a number with up to 1 decimal place, for example 100 or 100.1
|
14
|
-
|
15
14
|
renalware:
|
16
15
|
clinical:
|
17
16
|
dry_weights:
|
@@ -25,4 +24,3 @@ en:
|
|
25
24
|
view_all: View All
|
26
25
|
recent:
|
27
26
|
title: Recent Dry Weights
|
28
|
-
|
@@ -21,7 +21,6 @@ en:
|
|
21
21
|
height:
|
22
22
|
out_of_range: Please enter a number between 0.05 and 2.5m
|
23
23
|
invalid_number: Please enter a number with up to 2 decimal place
|
24
|
-
|
25
24
|
enumerize:
|
26
25
|
renalware/clinics/clinic_visit:
|
27
26
|
urine_blood:
|
@@ -38,7 +37,6 @@ en:
|
|
38
37
|
low: "++"
|
39
38
|
medium: "+++"
|
40
39
|
high: "++++"
|
41
|
-
|
42
40
|
simple_form:
|
43
41
|
hints:
|
44
42
|
clinic_visit:
|
@@ -6,7 +6,6 @@ en:
|
|
6
6
|
prompts:
|
7
7
|
prescription:
|
8
8
|
medication_route: Please select route of administration
|
9
|
-
|
10
9
|
activerecord:
|
11
10
|
attributes:
|
12
11
|
renalware/medications/prescription:
|
@@ -22,7 +21,6 @@ en:
|
|
22
21
|
attributes:
|
23
22
|
route_description:
|
24
23
|
not_other: can't be present when a route has been selected
|
25
|
-
|
26
24
|
enumerize:
|
27
25
|
renalware:
|
28
26
|
medications:
|