renalware-core 2.0.132 → 2.0.133
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/renalware/core.js.erb +1 -1
- data/app/assets/stylesheets/renalware/core.scss +1 -1
- data/app/assets/stylesheets/renalware/modules/_clinics.scss +1 -2
- data/app/assets/stylesheets/renalware/modules/_patients.scss +1 -1
- data/app/assets/stylesheets/renalware/partials/_dashboards.scss +15 -0
- data/app/components/renalware/application_component.rb +22 -0
- data/app/components/renalware/events/biopsies_component.html.slim +14 -0
- data/app/components/renalware/events/biopsies_component.rb +20 -0
- data/app/components/renalware/letters/letters_in_progress_component.html.slim +8 -0
- data/app/components/renalware/letters/letters_in_progress_component.rb +32 -0
- data/app/components/renalware/letters/unread_electronic_ccs_component.html.slim +7 -0
- data/app/components/renalware/letters/unread_electronic_ccs_component.rb +24 -0
- data/app/components/renalware/messaging/unread_messages_component.html.slim +11 -0
- data/app/components/renalware/messaging/unread_messages_component.rb +24 -0
- data/app/components/renalware/patients/bookmarks_component.html.slim +11 -0
- data/app/components/renalware/patients/bookmarks_component.rb +22 -0
- data/app/controllers/renalware/clinical/body_compositions_controller.rb +1 -1
- data/app/controllers/renalware/pathology/code_groups_controller.rb +44 -0
- data/app/controllers/renalware/transplants/wait_lists_controller.rb +17 -8
- data/app/models/renalware/clinical/body_composition.rb +7 -0
- data/app/models/renalware/hd/mdm_patients_query.rb +10 -1
- data/app/models/renalware/pathology/code_group.rb +10 -3
- data/app/models/renalware/pathology/code_group_membership.rb +2 -0
- data/app/models/renalware/pathology/current_observation_set.rb +16 -3
- data/app/models/renalware/pathology/observations_jsonb_serializer.rb +1 -1
- data/app/models/renalware/pathology/version.rb +11 -0
- data/app/models/renalware/system/component.rb +25 -0
- data/app/models/renalware/system/dashboard.rb +20 -0
- data/app/models/renalware/system/dashboard_component.rb +17 -0
- data/app/models/renalware/transplants.rb +8 -1
- data/app/models/renalware/transplants/registrations/wait_list_form.rb +16 -0
- data/app/models/renalware/transplants/registrations/wait_list_query.rb +17 -3
- data/app/models/renalware/ukrdc/incoming/file_list.rb +1 -1
- data/app/models/renalware/ukrdc/incoming/import_surveys.rb +16 -0
- data/app/models/renalware/ukrdc/outgoing/rendering/base.rb +22 -0
- data/app/models/renalware/ukrdc/outgoing/rendering/dialysis_session.rb +2 -2
- data/app/models/renalware/ukrdc/outgoing/rendering/hd_session_observations.rb +1 -1
- data/app/models/renalware/user.rb +9 -0
- data/app/policies/renalware/hd/closed_session_policy.rb +1 -1
- data/app/policies/renalware/pathology/code_group_policy.rb +23 -0
- data/app/presenters/renalware/hd/protocol_presenter.rb +8 -2
- data/app/views/renalware/clinical/body_compositions/_form.html.slim +6 -0
- data/app/views/renalware/clinical/body_compositions/_table.html.slim +4 -0
- data/app/views/renalware/dashboard/bookmarks/_bookmark.html.slim +5 -5
- data/app/views/renalware/dashboard/bookmarks/_table.html.slim +5 -5
- data/app/views/renalware/dashboard/dashboards/_content.html.slim +4 -41
- data/app/views/renalware/dashboard/letters/_letter.html.slim +2 -2
- data/app/views/renalware/hd/mdm_patients/_patient.html.slim +5 -1
- data/app/views/renalware/hd/mdm_patients/_table.html.slim +2 -1
- data/app/views/renalware/hd/protocols/_recent_pathology.html.slim +5 -12
- data/app/views/renalware/mdm/{_biopsies.html.slim → _biopsies.html.slim.dead} +0 -0
- data/app/views/renalware/mdm_patients/_patient.html.slim +5 -1
- data/app/views/renalware/mdm_patients/_table.html.slim +1 -1
- data/app/views/renalware/medications/prescriptions/_tables.html.slim +27 -23
- data/app/views/renalware/messaging/internal/receipts/_receipt.html.slim +1 -1
- data/app/views/renalware/modalities/modalities/index.html.slim +17 -16
- data/app/views/renalware/navigation/_super_admin.html.slim +1 -0
- data/app/views/renalware/pathology/code_groups/edit.html.slim +8 -0
- data/app/views/renalware/pathology/code_groups/index.html.slim +16 -0
- data/app/views/renalware/pathology/code_groups/show.html.slim +34 -0
- data/app/views/renalware/problems/problems/index.html.slim +9 -5
- data/app/views/renalware/surveys/_eq5d_summary_part.html.slim +17 -17
- data/app/views/renalware/surveys/_pos_s_summary_part.html.slim +61 -60
- data/app/views/renalware/transplants/mdm/_bottom.html.slim +1 -1
- data/app/views/renalware/transplants/mdm_patients/_patient.html.slim +5 -1
- data/app/views/renalware/transplants/mdm_patients/_table.html.slim +1 -1
- data/app/views/renalware/transplants/wait_lists/_registration.html.slim +1 -0
- data/app/views/renalware/transplants/wait_lists/show.html.slim +24 -1
- data/config/locales/renalware/clinical/body_composition.yml +4 -0
- data/config/routes/pathology.rb +1 -0
- data/db/migrate/20200114151225_add_clinical_body_composition_cols.rb +11 -0
- data/db/migrate/20200127165951_create_pathology_versions.rb +16 -0
- data/db/migrate/20200127170711_add_created_by_to_pathology_code_groups.rb +15 -0
- data/db/migrate/20200129093835_create_system_dashboards.rb +73 -0
- data/db/seeds/default/pathology/code_groups.rb +15 -0
- data/db/seeds/default/pathology/seeds.rb +2 -1
- data/lib/core_extensions/active_record/migration_helpers.rb +3 -2
- data/lib/renalware/engine.rb +1 -1
- data/lib/renalware/version.rb +1 -1
- data/lib/tasks/spec.rake +23 -21
- data/spec/factories/clinical/body_compositions.rb +3 -1
- data/spec/factories/pathology/code_group_memberships.rb +7 -0
- data/spec/factories/pathology/code_groups.rb +13 -0
- data/spec/factories/transplants/registration_status_descriptions.rb +5 -0
- data/spec/support/devise_spec_helper.rb +24 -8
- data/spec/support/ukrdc_helpers.rb +2 -1
- metadata +53 -24
@@ -4,13 +4,13 @@ table.auto-layout
|
|
4
4
|
th.at-least.col-width-medium= t(".patient_name")
|
5
5
|
th.col-width-nhs-no= t(".nhs_number")
|
6
6
|
th.col-width-reference-no= t(".hospital_number")
|
7
|
-
th.col-width-date= t(".born_on")
|
7
|
+
th.show-for-medium-up.col-width-date= t(".born_on")
|
8
8
|
th.col-width-tiny= t(".age")
|
9
9
|
th.col-width-tiny= t(".sex")
|
10
|
-
th
|
11
|
-
th= t(".notes")
|
12
|
-
th= t(".tags")
|
13
|
-
th.col-width-date
|
10
|
+
th= t(".modality")
|
11
|
+
th.show-for-medium-up= t(".notes")
|
12
|
+
th.show-for-medium-up= t(".tags")
|
13
|
+
th.col-width-date= t(".bookmarked_on")
|
14
14
|
th.col-width-tiny
|
15
15
|
|
16
16
|
tbody
|
@@ -1,45 +1,8 @@
|
|
1
1
|
.dashboard-content
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#letters-in-progress
|
7
|
-
= render "renalware/dashboard/letters/table", letters: dashboard.letters_in_progress
|
8
|
-
- else
|
9
|
-
p.empty-section= t(".letters.in_progress.none").html_safe
|
10
|
-
|
11
|
-
article.bookmarks
|
12
|
-
header
|
13
|
-
h2.title= "Bookmarked Patients"
|
14
|
-
ul
|
15
|
-
li= link_to "View All", bookmarks_path, class: "button"
|
16
|
-
|
17
|
-
- if dashboard.bookmarks.any?
|
18
|
-
#bookmarks
|
19
|
-
= render "renalware/dashboard/bookmarks/table", bookmarks: dashboard.bookmarks
|
20
|
-
- else
|
21
|
-
p.empty-section= t(".bookmarks.none")
|
22
|
-
|
23
|
-
article.messages
|
24
|
-
header
|
25
|
-
h2 Messages
|
26
|
-
ul
|
27
|
-
li= render "renalware/messaging/shared/key"
|
28
|
-
- if dashboard.unread_messages_receipts.any?
|
29
|
-
.unread-messages
|
30
|
-
= render "renalware/messaging/internal/receipts/table",
|
31
|
-
receipts: dashboard.unread_messages_receipts
|
32
|
-
- else
|
33
|
-
p.empty-section= t(".messages.none")
|
34
|
-
|
35
|
-
article.electonic_ccs
|
36
|
-
header
|
37
|
-
h2 Electronic CCs
|
38
|
-
- if dashboard.unread_electronic_ccs.any?
|
39
|
-
= render "renalware/letters/electronic_receipts/table",
|
40
|
-
receipts: dashboard.unread_electronic_ccs
|
41
|
-
- else
|
42
|
-
p.empty-section= t(".electronic_ccs.none")
|
2
|
+
= render(Renalware::Letters::LettersInProgressComponent, current_user: current_user)
|
3
|
+
= render(Renalware::Patients::BookmarksComponent, current_user: current_user)
|
4
|
+
= render(Renalware::Messaging::UnreadMessagesComponent, current_user: current_user)
|
5
|
+
= render(Renalware::Letters::UnreadElectronicCCsComponent, current_user: current_user)
|
43
6
|
|
44
7
|
- if current_user_is_admin?
|
45
8
|
= render Renalware::Admin::Users::SummaryPart.new(nil, current_user)
|
@@ -3,8 +3,8 @@ tr(class=letter.state.dasherize)
|
|
3
3
|
span= letter.state_description
|
4
4
|
td= l letter.effective_date
|
5
5
|
td= letter.author
|
6
|
-
td= link_to letter.patient, patient_clinical_summary_path(letter.patient)
|
7
|
-
td= letter.description
|
6
|
+
td.col-width-medium-with-ellipsis= link_to letter.patient, patient_clinical_summary_path(letter.patient)
|
7
|
+
td.col-width-medium-with-ellipsis= letter.description
|
8
8
|
td.actions
|
9
9
|
= link_to "Toggle", "#quick-preview-#{letter.id}", data: { behaviour: "toggler" }
|
10
10
|
= link_to letter.view_label, patient_letters_letter_path(letter.patient, letter)
|
@@ -3,6 +3,11 @@
|
|
3
3
|
- transplant_patient = Renalware::Transplants::PatientPresenter.new(patient)
|
4
4
|
|
5
5
|
tr
|
6
|
+
td.actions
|
7
|
+
= link_to view_proc.call(patient), target: "_blank" do
|
8
|
+
i.fa.fa-external-link-square-alt
|
9
|
+
|
|
10
|
+
= t(".view")
|
6
11
|
td.full-name= link_to patient, view_proc.call(patient)
|
7
12
|
td.nowrap= patient.nhs_number
|
8
13
|
td.nowrap= patient.hospital_identifier
|
@@ -26,4 +31,3 @@ tr
|
|
26
31
|
td.show-for-xlarge-up= l(patient.current_observation_set.pthi_observed_at)
|
27
32
|
td.show-for-xlarge-up= patient.current_observation_set.urr_result
|
28
33
|
td.show-for-xlarge-up= l(patient.current_observation_set.urr_observed_at)
|
29
|
-
td.actions= link_to t(".view"), view_proc.call(patient)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
table#patients.mdm-patients.columns
|
3
3
|
thead
|
4
4
|
tr
|
5
|
+
th.col-width-tiny
|
5
6
|
th.col-width-large= sort_link(path, :family_name, t(".name"))
|
6
7
|
th.col-width-nhs-no= t(".nhs_no")
|
7
8
|
th.col-width-reference-no= t(".hosp_no")
|
@@ -25,7 +26,7 @@ table#patients.mdm-patients.columns
|
|
25
26
|
th.show-for-xlarge-up.col-width-date= sort_link(path, :pthi_date, t(".pthi_date"))
|
26
27
|
th.show-for-xlarge-up.col-width-tiny= sort_link(path, :urr, t(".urr"))
|
27
28
|
th.show-for-xlarge-up.col-width-date= sort_link(path, :urr_date, t(".urr_date"))
|
28
|
-
|
29
|
+
|
29
30
|
tbody
|
30
31
|
= render partial: "patient",
|
31
32
|
collection: presenter.patients,
|
@@ -1,14 +1,7 @@
|
|
1
1
|
table.recent-pathology
|
2
2
|
tbody
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
th.code PLT
|
9
|
-
td.result= recent_pathology.plt_result
|
10
|
-
td.nowrap.observed_at= (l(recent_pathology.plt_observed_at))
|
11
|
-
tr
|
12
|
-
th.code CRP
|
13
|
-
td.result= recent_pathology.crp_result
|
14
|
-
td.nowrap.observed_at= (l(recent_pathology.crp_observed_at))
|
3
|
+
- recent_pathology.each do |code, value|
|
4
|
+
tr
|
5
|
+
th.code= code
|
6
|
+
td.result= value[:result]
|
7
|
+
td.nowrap.observed_at= (value[:observed_at] && l(Date.parse(value[:observed_at])))
|
File without changes
|
@@ -1,6 +1,11 @@
|
|
1
1
|
- observation_set = patient.current_observation_set
|
2
2
|
- transplant_patient = Renalware::Transplants::PatientPresenter.new(patient)
|
3
3
|
tr
|
4
|
+
td.actions
|
5
|
+
= link_to view_proc.call(patient), target: "_blank" do
|
6
|
+
i.fa.fa-external-link-square-alt
|
7
|
+
|
|
8
|
+
= t(".view")
|
4
9
|
td.full-name= link_to patient.to_s(:default), view_proc.call(patient)
|
5
10
|
td.nowrap= patient.nhs_number
|
6
11
|
td.nowrap= patient.hospital_identifier
|
@@ -16,4 +21,3 @@ tr
|
|
16
21
|
td= l(observation_set.cre_observed_at)
|
17
22
|
td= observation_set.egfr_result
|
18
23
|
td= l(patient.esrf_date)
|
19
|
-
td.actions= link_to t(".view"), view_proc.call(patient)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
table#patients.mdm-patients.columns
|
3
3
|
thead
|
4
4
|
tr
|
5
|
+
th.col-width-tiny
|
5
6
|
th.col-width-large= sort_link(path, :family_name, t(".name"))
|
6
7
|
th.col-width-nhs-no= sort_link(path, :nhs_number, t(".nhs_no"))
|
7
8
|
th.col-width-reference-no= t(".hosp_no")
|
@@ -14,7 +15,6 @@ table#patients.mdm-patients.columns
|
|
14
15
|
th.col-width-date= sort_link(path, :"#{code}_date", t(".#{code}_date"))
|
15
16
|
th.col-width-tiny= sort_link(path, :egfr, t(".egfr"))
|
16
17
|
th.col-width-date= t(".esrf")
|
17
|
-
th.col-width-small
|
18
18
|
|
19
19
|
tbody
|
20
20
|
= render partial: "patient",
|
@@ -1,25 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.large-12.columns
|
11
|
-
.right
|
12
|
-
= link_to "Add Prescription",
|
13
|
-
new_patient_prescription_path(patient, treatable),
|
14
|
-
remote: true,
|
15
|
-
class: %i(button tiny add_prescription)
|
1
|
+
article
|
2
|
+
header
|
3
|
+
h2 Current
|
4
|
+
ul
|
5
|
+
li
|
6
|
+
= link_to "Add Prescription",
|
7
|
+
new_patient_prescription_path(patient, treatable),
|
8
|
+
remote: true,
|
9
|
+
class: %i(button add_prescription)
|
16
10
|
|
17
|
-
- if defined? historical_prescriptions
|
18
|
-
h2 Historical
|
19
11
|
= render "renalware/medications/prescriptions/table",
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
12
|
+
id: "current-prescriptions",
|
13
|
+
patient: patient,
|
14
|
+
treatable: treatable,
|
15
|
+
prescriptions: current_prescriptions,
|
16
|
+
search: current_search,
|
17
|
+
current_scope: true
|
18
|
+
|
19
|
+
- if defined? historical_prescriptions
|
20
|
+
article
|
21
|
+
header
|
22
|
+
h2 Historical
|
23
|
+
= render "renalware/medications/prescriptions/table",
|
24
|
+
id: "historical-prescriptions",
|
25
|
+
patient: patient,
|
26
|
+
treatable: treatable,
|
27
|
+
prescriptions: historical_prescriptions,
|
28
|
+
search: historical_prescriptions_search,
|
29
|
+
current_scope: false
|
@@ -6,7 +6,7 @@ tr(class="#{ "urgent" if message.urgent?}" id=message.html_identifier)
|
|
6
6
|
td= message.author
|
7
7
|
td= l(message.sent_at)
|
8
8
|
td= l(receipt.read_at)
|
9
|
-
td= default_patient_link(patient)
|
9
|
+
td.col-width-medium-with-ellipsis= default_patient_link(patient)
|
10
10
|
td= patient.nhs_number
|
11
11
|
td= patient.hospital_identifier
|
12
12
|
td.col-width-medium-with-ellipsis= message.subject
|
@@ -4,20 +4,21 @@
|
|
4
4
|
class: "button"
|
5
5
|
|
6
6
|
= within_patient_layout(title: "Modality History") do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
th Modality
|
11
|
-
th Notes
|
12
|
-
th.col-width-date Start Date
|
13
|
-
th.col-width-date.wide Termination Date
|
14
|
-
th Added by
|
15
|
-
|
16
|
-
tbody
|
17
|
-
- modalities.each do |modality|
|
7
|
+
article
|
8
|
+
table
|
9
|
+
thead
|
18
10
|
tr
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
11
|
+
th Modality
|
12
|
+
th Notes
|
13
|
+
th.col-width-date Start Date
|
14
|
+
th.col-width-date.wide Termination Date
|
15
|
+
th Added by
|
16
|
+
|
17
|
+
tbody
|
18
|
+
- modalities.each do |modality|
|
19
|
+
tr
|
20
|
+
td= modality.description.name
|
21
|
+
td= modality.notes
|
22
|
+
td= l modality.started_on
|
23
|
+
td= l modality.ended_on
|
24
|
+
td= modality.created_by.full_name
|
@@ -0,0 +1,16 @@
|
|
1
|
+
= within_admin_layout(title: "Pathology Code Groups") do
|
2
|
+
|
3
|
+
table.code-groups-table
|
4
|
+
thead
|
5
|
+
tr
|
6
|
+
th Group name
|
7
|
+
th Description
|
8
|
+
tbody
|
9
|
+
- groups.each do |group|
|
10
|
+
tr
|
11
|
+
td.actions
|
12
|
+
- if policy(group).edit?
|
13
|
+
= link_to "View", pathology_code_group_path(group)
|
14
|
+
td= group.name
|
15
|
+
td= group.description
|
16
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
= within_admin_layout(title: group.name) do
|
2
|
+
|
3
|
+
.panel.info.radius.columns
|
4
|
+
| Editing code groups here is not currently support, sorry.
|
5
|
+
| You'll need to update the database directly for now.
|
6
|
+
|
7
|
+
h5= group.description
|
8
|
+
= link_to "Edit group", edit_pathology_code_group_path(group)
|
9
|
+
|
10
|
+
br
|
11
|
+
br
|
12
|
+
|
13
|
+
article
|
14
|
+
header
|
15
|
+
h2 Codes
|
16
|
+
|
17
|
+
table.pathology-code-group-memberships.sortables
|
18
|
+
thead
|
19
|
+
/th.col-width-tiny
|
20
|
+
th.col-width-tiny Subgroup
|
21
|
+
th.col-width-small Position inside sub group
|
22
|
+
th.col-width-small Code
|
23
|
+
th Name
|
24
|
+
|
25
|
+
tbody
|
26
|
+
- group.memberships.order(:subgroup, :position_within_subgroup ).each do |membership|
|
27
|
+
tr.sortable
|
28
|
+
/td
|
29
|
+
i.fas.fa-bars
|
30
|
+
td= membership.subgroup
|
31
|
+
td= membership.position_within_subgroup
|
32
|
+
td= membership.observation_description.code
|
33
|
+
td= membership.observation_description.name
|
34
|
+
|
@@ -5,8 +5,12 @@
|
|
5
5
|
|
6
6
|
= within_patient_layout(title: "Problems") do
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
article
|
9
|
+
header
|
10
|
+
h2 Current
|
11
|
+
= render "renalware/problems/problems/current_table", problems: current_problems
|
12
|
+
|
13
|
+
article
|
14
|
+
header
|
15
|
+
h2 Archived
|
16
|
+
= render "renalware/problems/problems/archived_table", problems: archived_problems
|
@@ -3,24 +3,24 @@
|
|
3
3
|
header
|
4
4
|
h2 EQ5D
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
/ b Example WIP for charting one question over time
|
7
|
+
/ = line_chart(eq5d_summary_part.data_for_question_code(1), curve: false)
|
8
|
+
/ br
|
9
|
+
/ br
|
10
|
+
/ br
|
11
11
|
|
12
|
-
|
12
|
+
- return if eq5d_summary_part.rows.blank?
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
tr
|
18
|
-
th.col-width-date Date
|
19
|
-
- eq5d_summary_part.question_labels.each do |code, label|
|
20
|
-
th= label
|
21
|
-
tbody
|
22
|
-
- eq5d_summary_part.rows.each do |row|
|
14
|
+
.xsss
|
15
|
+
table
|
16
|
+
thead
|
23
17
|
tr
|
24
|
-
|
18
|
+
th.col-width-date Date
|
25
19
|
- eq5d_summary_part.question_labels.each do |code, label|
|
26
|
-
|
20
|
+
th= label
|
21
|
+
tbody
|
22
|
+
- eq5d_summary_part.rows.each do |row|
|
23
|
+
tr
|
24
|
+
td= row.answered_on
|
25
|
+
- eq5d_summary_part.question_labels.each do |code, label|
|
26
|
+
td= row.send(code.to_sym)
|
@@ -6,70 +6,71 @@
|
|
6
6
|
header
|
7
7
|
h2 POS-S
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
/ b Example WIP for charting one question over time
|
10
|
+
/ = line_chart(eq5d_summary_part.data_for_question_code(1), curve: false)
|
11
|
+
/ br
|
12
|
+
/ br
|
13
|
+
/ br
|
14
14
|
|
15
|
-
|
16
|
-
br
|
17
|
-
br
|
18
|
-
br
|
19
|
-
br
|
20
|
-
.xsss
|
21
|
-
table.table-header-rotated.toggleable
|
22
|
-
thead
|
23
|
-
tr
|
24
|
-
th.togglers= rows_toggler
|
25
|
-
th.col-width-date.valign-bottom Date
|
26
|
-
th.col-width-tiny.valign-bottom Total
|
27
|
-
- pos_s_summary_part.question_labels.each do |code, label|
|
28
|
-
th.rotate
|
29
|
-
div
|
30
|
-
span= label
|
15
|
+
- return if pos_s_summary_part.rows.blank?
|
31
16
|
|
32
|
-
|
33
|
-
|
34
|
-
|
17
|
+
br
|
18
|
+
br
|
19
|
+
br
|
20
|
+
br
|
21
|
+
.xsss
|
22
|
+
table.table-header-rotated.toggleable
|
23
|
+
thead
|
35
24
|
tr
|
36
|
-
|
37
|
-
|
38
|
-
|
25
|
+
th.togglers= rows_toggler
|
26
|
+
th.col-width-date.valign-bottom Date
|
27
|
+
th.col-width-tiny.valign-bottom Total
|
39
28
|
- pos_s_summary_part.question_labels.each do |code, label|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
td
|
52
|
-
td
|
53
|
-
td(class="summary-part--pos_s-patient-question-text" colspan=(pos_s_summary_part.question_labels.count ))
|
54
|
-
- superscript_char = 97
|
29
|
+
th.rotate
|
30
|
+
div
|
31
|
+
span= label
|
32
|
+
|
33
|
+
- superscript_char = 97
|
34
|
+
- pos_s_summary_part.rows.each do |row|
|
35
|
+
tbody
|
36
|
+
tr
|
37
|
+
td= row_toggler
|
38
|
+
td= row.answered_on
|
39
|
+
td= row.total_score
|
55
40
|
- pos_s_summary_part.question_labels.each do |code, label|
|
41
|
+
- value = row.send(code.to_sym)
|
56
42
|
- patient_question_text = row.try(:"#{code}_patient_question_text")
|
57
|
-
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
-
|
43
|
+
td(class="pos-s--#{value}")
|
44
|
+
- if patient_question_text
|
45
|
+
span(title="Toggle row for question text")= value
|
46
|
+
sup= superscript_char.chr
|
47
|
+
- superscript_char += 1
|
48
|
+
- else
|
49
|
+
= value
|
50
|
+
tr
|
51
|
+
td
|
52
|
+
td
|
53
|
+
td
|
54
|
+
td(class="summary-part--pos_s-patient-question-text" colspan=(pos_s_summary_part.question_labels.count ))
|
55
|
+
- superscript_char = 97
|
56
|
+
- pos_s_summary_part.question_labels.each do |code, label|
|
57
|
+
- patient_question_text = row.try(:"#{code}_patient_question_text")
|
58
|
+
- if patient_question_text
|
59
|
+
sup= superscript_char.chr
|
60
|
+
|
|
61
|
+
span= patient_question_text
|
62
|
+
|
|
63
|
+
- superscript_char += 1
|
63
64
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
65
|
+
/ Colour-coded key
|
66
|
+
dl.pos-s-key
|
67
|
+
dt.pos-s--0 0
|
68
|
+
dd Not at all
|
69
|
+
dt.pos-s--1 1
|
70
|
+
dd Slightly
|
71
|
+
dt.pos-s--2 2
|
72
|
+
dd Moderately
|
73
|
+
dt.pos-s--3 3
|
74
|
+
dd Severely
|
75
|
+
dt.pos-s--4 4
|
76
|
+
dd Overwhelmingly
|