renalware-core 2.0.0.pre.beta4 → 2.0.0.pre.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/app/assets/javascripts/renalware/application.js.erb +3 -0
- data/app/assets/javascripts/renalware/dialogs.js.erb +3 -1
- data/app/assets/javascripts/renalware/forms.js +0 -17
- data/app/assets/javascripts/renalware/keyboard_shortcuts.js +4 -0
- data/app/assets/javascripts/renalware/messaging.js +15 -0
- data/app/assets/javascripts/renalware/modality_codes.js +1 -0
- data/app/assets/javascripts/renalware/pdf.js +6 -3
- data/app/assets/javascripts/renalware/renal.js +2 -1
- data/app/assets/javascripts/renalware/session_timeout_redirect.js.erb +10 -4
- data/app/assets/javascripts/renalware/toggler.js +5 -0
- data/app/assets/stylesheets/renalware/base/_variables.scss +3 -1
- data/app/assets/stylesheets/renalware/lib/_foundation_and_overrides.scss +1 -1
- data/app/assets/stylesheets/renalware/lib/_select2-foundation5-overrides.scss +22 -1
- data/app/assets/stylesheets/renalware/lib/_select2-foundation5.scss +7 -4
- data/app/assets/stylesheets/renalware/modules/_dashboard.scss +1 -0
- data/app/assets/stylesheets/renalware/modules/_messaging.scss +55 -0
- data/app/assets/stylesheets/renalware/modules/_patients.scss +70 -0
- data/app/assets/stylesheets/renalware/partials/_button.scss +10 -0
- data/app/assets/stylesheets/renalware/partials/_forms.scss +9 -1
- data/app/assets/stylesheets/renalware/partials/_lists.scss +6 -1
- data/app/assets/stylesheets/renalware/partials/_navigation.scss +36 -1
- data/app/assets/stylesheets/renalware/partials/_simple_form.scss +1 -1
- data/app/assets/stylesheets/renalware/partials/_tables.scss +40 -1
- data/app/controllers/renalware/accesses/assessments_controller.rb +2 -2
- data/app/controllers/renalware/accesses/procedures_controller.rb +2 -2
- data/app/controllers/renalware/accesses/profiles_controller.rb +2 -2
- data/app/controllers/renalware/admin/users_controller.rb +1 -1
- data/app/controllers/renalware/base_controller.rb +1 -1
- data/app/controllers/renalware/clinical/body_compositions_controller.rb +1 -14
- data/app/controllers/renalware/clinical/dry_weights_controller.rb +1 -1
- data/app/controllers/renalware/clinics/clinic_visits_controller.rb +3 -3
- data/app/controllers/renalware/concerns/pdf_renderable.rb +0 -1
- data/app/controllers/renalware/deaths_controller.rb +1 -1
- data/app/controllers/renalware/devise/sessions_controller.rb +24 -0
- data/app/controllers/renalware/directory/people_controller.rb +30 -20
- data/app/controllers/renalware/drugs/drugs_controller.rb +2 -2
- data/app/controllers/renalware/events/events_controller.rb +19 -4
- data/app/controllers/renalware/events/types_controller.rb +2 -2
- data/app/controllers/renalware/hd/cannulation_types_controller.rb +2 -2
- data/app/controllers/renalware/hd/current_profile_controller.rb +1 -1
- data/app/controllers/renalware/hd/dialysers_controller.rb +2 -2
- data/app/controllers/renalware/hd/preference_sets_controller.rb +1 -1
- data/app/controllers/renalware/hd/sessions_controller.rb +1 -1
- data/app/controllers/renalware/hd/stations_controller.rb +79 -0
- data/app/controllers/renalware/hospitals/units_controller.rb +4 -3
- data/app/controllers/renalware/letters/contacts_controller.rb +3 -3
- data/app/controllers/renalware/letters/letters_controller.rb +2 -2
- data/app/controllers/renalware/medications/drug_types/prescriptions_controller.rb +3 -0
- data/app/controllers/renalware/messaging/messages_controller.rb +73 -0
- data/app/controllers/renalware/messaging/receipts_controller.rb +55 -0
- data/app/controllers/renalware/messaging/sent_messages_controller.rb +22 -0
- data/app/controllers/renalware/modalities/descriptions_controller.rb +31 -17
- data/app/controllers/renalware/modalities/modalities_controller.rb +21 -13
- data/app/controllers/renalware/pathology/current_observation_results_controller.rb +1 -1
- data/app/controllers/renalware/pathology/historical_observation_results_controller.rb +1 -1
- data/app/controllers/renalware/pathology/patient_rules_controller.rb +2 -2
- data/app/controllers/renalware/pathology/recent_observation_results_controller.rb +1 -1
- data/app/controllers/renalware/pathology/requests/requests_controller.rb +1 -1
- data/app/controllers/renalware/patients/alerts_controller.rb +61 -0
- data/app/controllers/renalware/patients/clinical_summaries_controller.rb +15 -0
- data/app/controllers/renalware/patients/patients_controller.rb +109 -0
- data/app/controllers/renalware/patients/primary_care_physicians_controller.rb +3 -2
- data/app/controllers/renalware/patients/worry_controller.rb +13 -2
- data/app/controllers/renalware/patients/worryboard_controller.rb +15 -1
- data/app/controllers/renalware/pd/bag_types_controller.rb +2 -2
- data/app/controllers/renalware/pd/exit_site_infections_controller.rb +2 -2
- data/app/controllers/renalware/pd/peritonitis_episodes_controller.rb +1 -1
- data/app/controllers/renalware/pd/pet_adequacy_results_controller.rb +2 -2
- data/app/controllers/renalware/pd/regimes_controller.rb +2 -2
- data/app/controllers/renalware/problems/problems_controller.rb +2 -2
- data/app/controllers/renalware/system/errors_controller.rb +20 -0
- data/app/controllers/renalware/system/mock_errors_controller.rb +12 -0
- data/app/controllers/renalware/transplants/donations_controller.rb +2 -2
- data/app/controllers/renalware/transplants/donor_operations_controller.rb +2 -2
- data/app/controllers/renalware/transplants/donor_workups_controller.rb +1 -1
- data/app/controllers/renalware/transplants/recipient_followups_controller.rb +2 -2
- data/app/controllers/renalware/transplants/recipient_operations_controller.rb +2 -2
- data/app/controllers/renalware/transplants/recipient_workups_controller.rb +1 -1
- data/app/controllers/renalware/transplants/registration_statuses_controller.rb +2 -2
- data/app/controllers/renalware/transplants/registrations_controller.rb +1 -1
- data/app/documents/renalware/renal/profile_document.rb +1 -0
- data/app/documents/renalware/smoking_status.rb +9 -0
- data/app/helpers/renalware/application_helper.rb +1 -1
- data/app/helpers/renalware/navigation_helper.rb +1 -1
- data/app/models/concerns/renalware/accountable.rb +16 -1
- data/app/models/concerns/renalware/broadcasting.rb +33 -0
- data/app/models/renalware/clinical/modality_description.rb +3 -0
- data/app/models/renalware/deaths/modality_description.rb +3 -0
- data/app/models/renalware/directory/person.rb +1 -1
- data/app/models/renalware/events/event.rb +3 -1
- data/app/models/renalware/events/event_query.rb +29 -0
- data/app/models/renalware/events/line_change_event_query.rb +25 -0
- data/app/models/renalware/events/patient_listener.rb +8 -0
- data/app/models/renalware/events/simple.rb +1 -1
- data/app/models/renalware/hd/diurnal_period_code.rb +9 -0
- data/app/models/renalware/hd/mdm_patients_query.rb +1 -0
- data/app/models/renalware/hd/modality_description.rb +3 -0
- data/app/models/renalware/hd/patient_listener.rb +20 -0
- data/app/models/renalware/hd/patients_with_unmet_preferences_query.rb +2 -0
- data/app/models/renalware/hd/session/closed.rb +2 -2
- data/app/models/renalware/hd/station.rb +24 -0
- data/app/models/renalware/hospitals/unit.rb +1 -0
- data/app/models/renalware/letters/draft_letter.rb +1 -1
- data/app/models/renalware/letters/letter_params_processor.rb +2 -2
- data/app/models/renalware/letters/letter_query.rb +1 -1
- data/app/models/renalware/letters/part/recent_pathology_results.rb +9 -4
- data/app/models/renalware/letters/patient_listener.rb +16 -0
- data/app/models/renalware/letters/revise_letter.rb +1 -1
- data/app/models/renalware/medications/patient_listener.rb +11 -0
- data/app/models/renalware/medications/prescriptions_by_drug_type_query.rb +2 -1
- data/app/models/renalware/medications/terminate_all_patient_prescriptions.rb +24 -0
- data/app/models/renalware/messaging/author.rb +9 -0
- data/app/models/renalware/messaging/message.rb +19 -0
- data/app/models/renalware/messaging/message_factory.rb +18 -0
- data/app/models/renalware/messaging/message_form.rb +34 -0
- data/app/models/renalware/messaging/message_form_builder.rb +50 -0
- data/app/models/renalware/messaging/patient.rb +13 -0
- data/app/models/renalware/messaging/receipt.rb +19 -0
- data/app/models/renalware/messaging/recipient.rb +10 -0
- data/app/models/renalware/messaging/recipient_options.rb +85 -0
- data/app/models/renalware/messaging/send_message.rb +22 -0
- data/app/models/renalware/messaging.rb +21 -0
- data/app/models/renalware/modalities/change_patient_modality.rb +112 -0
- data/app/models/renalware/modalities/description.rb +9 -5
- data/app/models/renalware/modalities/modality.rb +4 -10
- data/app/models/renalware/pathology/measurement_unit.rb +10 -0
- data/app/models/renalware/pathology/observation_description.rb +2 -0
- data/app/models/renalware/pathology/requests/global_algorithm.rb +1 -1
- data/app/models/renalware/pathology/requests/high_risk_rule_set.rb +1 -1
- data/app/models/renalware/patient.rb +14 -8
- data/app/models/renalware/patients/alert.rb +15 -0
- data/app/models/renalware/patients/patient_search.rb +13 -0
- data/app/models/renalware/patients/summary.rb +13 -0
- data/app/models/renalware/patients/worry_query.rb +27 -0
- data/app/models/renalware/pd/modality_description.rb +3 -0
- data/app/models/renalware/pd.rb +1 -1
- data/app/models/renalware/transplants/mdm_patients_query.rb +1 -0
- data/app/policies/renalware/hd/station_policy.rb +9 -0
- data/app/policies/renalware/messaging/message_policy.rb +11 -0
- data/app/policies/renalware/messaging/receipt_policy.rb +19 -0
- data/app/policies/renalware/modalities/description_policy.rb +22 -0
- data/app/policies/renalware/patients/alert_policy.rb +8 -0
- data/app/presenters/renalware/clinical/profile_presenter.rb +6 -1
- data/app/presenters/renalware/dashboard/dashboard_presenter.rb +18 -8
- data/app/presenters/renalware/events/events_presenter.rb +37 -0
- data/app/presenters/renalware/hd/station_presenter.rb +10 -0
- data/app/presenters/renalware/messaging/internal_message_presenter.rb +19 -0
- data/app/presenters/renalware/messaging/receipt_presenter.rb +11 -0
- data/app/presenters/renalware/pd/dashboard_presenter.rb +7 -0
- data/app/presenters/renalware/pd/mdm_presenter.rb +4 -0
- data/app/views/renalware/admin/users/edit.html.slim +34 -34
- data/app/views/renalware/admin/users/index.html.slim +9 -3
- data/app/views/renalware/clinical/body_compositions/_form.html.slim +1 -1
- data/app/views/renalware/clinical/body_compositions/_list.html.slim +1 -1
- data/app/views/renalware/clinical/body_compositions/edit.html.slim +2 -2
- data/app/views/renalware/clinics/clinic_visits/_form.html.slim +2 -2
- data/app/views/renalware/dashboard/bookmarks/_bookmark.html.slim +4 -5
- data/app/views/renalware/dashboard/bookmarks/_table.html.slim +1 -2
- data/app/views/renalware/dashboard/dashboards/_content.html.slim +7 -1
- data/app/views/renalware/dashboard/letters/_letter.html.slim +1 -1
- data/app/views/renalware/deaths/edit.html.slim +23 -26
- data/app/views/renalware/deaths/index.html.slim +0 -1
- data/app/views/renalware/devise/registrations/edit.html.slim +2 -2
- data/app/views/renalware/devise/sessions/new.html.slim +1 -1
- data/app/views/renalware/directory/people/_address_form.html.slim +13 -11
- data/app/views/renalware/directory/people/_filters.html.slim +9 -0
- data/app/views/renalware/directory/people/_form.html.slim +12 -14
- data/app/views/renalware/directory/people/_person.html.slim +1 -1
- data/app/views/renalware/directory/people/_table.html.slim +10 -0
- data/app/views/renalware/directory/people/edit.html.slim +4 -4
- data/app/views/renalware/directory/people/index.html.slim +7 -29
- data/app/views/renalware/directory/people/new.html.slim +4 -4
- data/app/views/renalware/directory/people/show.html.slim +27 -40
- data/app/views/renalware/drugs/drugs/_filters.html.slim +11 -0
- data/app/views/renalware/drugs/drugs/_form.html.slim +1 -3
- data/app/views/renalware/drugs/drugs/edit.html.slim +3 -1
- data/app/views/renalware/drugs/drugs/index.html.slim +7 -16
- data/app/views/renalware/drugs/drugs/new.html.slim +3 -1
- data/app/views/renalware/events/events/_filters.html.slim +21 -0
- data/app/views/renalware/events/events/_list.html.slim +5 -0
- data/app/views/renalware/events/events/_table.html.slim +3 -3
- data/app/views/renalware/events/events/index.html.slim +3 -2
- data/app/views/renalware/events/events/simple/_event.html.slim +10 -0
- data/app/views/renalware/events/events/simple/_list.html.slim +5 -0
- data/app/views/renalware/events/events/simple/_table.html.slim +15 -0
- data/app/views/renalware/events/events/toggled_cell/_simple.html.slim +2 -0
- data/app/views/renalware/hd/current_profile/_form.html.slim +64 -28
- data/app/views/renalware/hd/mdm_patients/_table.html.slim +26 -0
- data/app/views/renalware/hd/mdm_patients/index.html.slim +3 -33
- data/app/views/renalware/hd/stations/_form.html.slim +11 -0
- data/app/views/renalware/hd/stations/_station.html.slim +6 -0
- data/app/views/renalware/hd/stations/_table.html.slim +9 -0
- data/app/views/renalware/hd/stations/edit.html.slim +8 -0
- data/app/views/renalware/hd/stations/index.html.slim +14 -0
- data/app/views/renalware/hd/stations/new.html.slim +8 -0
- data/app/views/renalware/hospitals/units/_form.html.slim +16 -15
- data/app/views/renalware/hospitals/units/edit.html.slim +3 -1
- data/app/views/renalware/hospitals/units/index.html.slim +8 -3
- data/app/views/renalware/hospitals/units/new.html.slim +3 -1
- data/app/views/renalware/layouts/_patient.html.slim +1 -0
- data/app/views/renalware/letters/letters/_table.html.slim +1 -1
- data/app/views/renalware/letters/letters/author.html.slim +1 -3
- data/app/views/renalware/letters/parts/_problems.html.slim +10 -7
- data/app/views/renalware/letters/parts/_recent_pathology_results.html.slim +11 -8
- data/app/views/renalware/mdm_patients/_table.html.slim +23 -0
- data/app/views/renalware/mdm_patients/index.html.slim +5 -28
- data/app/views/renalware/medications/prescriptions/_current.html.slim +2 -2
- data/app/views/renalware/medications/prescriptions/_recently_stopped.html.slim +1 -1
- data/app/views/renalware/messaging/messages/_form.html.slim +31 -0
- data/app/views/renalware/messaging/messages/_message.html.slim +19 -0
- data/app/views/renalware/messaging/messages/_modal_dialog_placeholder.html.slim +2 -0
- data/app/views/renalware/messaging/messages/_send_message_link.html.slim +11 -0
- data/app/views/renalware/messaging/messages/_send_reply_link.html.slim +12 -0
- data/app/views/renalware/messaging/messages/_table.html.slim +13 -0
- data/app/views/renalware/messaging/messages/create.js.erb +13 -0
- data/app/views/renalware/messaging/messages/new.html.slim +5 -0
- data/app/views/renalware/messaging/messages/new.js.erb +7 -0
- data/app/views/renalware/messaging/messages/sent.html.slim +4 -0
- data/app/views/renalware/messaging/receipts/_receipt.html.slim +45 -0
- data/app/views/renalware/messaging/receipts/_table.html.slim +16 -0
- data/app/views/renalware/messaging/receipts/mark_as_read.js.erb +6 -0
- data/app/views/renalware/messaging/receipts/read.html.slim +5 -0
- data/app/views/renalware/messaging/receipts/unread.html.slim +5 -0
- data/app/views/renalware/messaging/shared/_key.html.slim +3 -0
- data/app/views/renalware/messaging/shared/_messages_type_tabs.html.slim +7 -0
- data/app/views/renalware/modalities/descriptions/_form.html.slim +12 -10
- data/app/views/renalware/modalities/descriptions/edit.html.slim +6 -1
- data/app/views/renalware/modalities/descriptions/index.html.slim +16 -11
- data/app/views/renalware/modalities/descriptions/new.html.slim +6 -1
- data/app/views/renalware/navigation/_user.html.slim +1 -0
- data/app/views/renalware/pathology/requests/requests/new.html.slim +1 -1
- data/app/views/renalware/patients/_layout.html.slim +0 -1
- data/app/views/renalware/patients/_person_form_fields.html.slim +1 -0
- data/app/views/renalware/patients/{_prescriptions.html.slim → _prescriptions.html.slim.dead} +0 -0
- data/app/views/renalware/patients/_side_menu.html.slim +1 -1
- data/app/views/renalware/patients/alerts/_alert.html.slim +12 -0
- data/app/views/renalware/patients/alerts/_create_alert_link.html.slim +8 -0
- data/app/views/renalware/patients/alerts/_form.html.slim +14 -0
- data/app/views/renalware/patients/alerts/_list.html.slim +4 -0
- data/app/views/renalware/patients/alerts/_modal_dialog_placeholder.html.slim +2 -0
- data/app/views/renalware/patients/alerts/create.js.erb +3 -0
- data/app/views/renalware/patients/alerts/destroy.js.erb +2 -0
- data/app/views/renalware/patients/alerts/new.html.slim +5 -0
- data/app/views/renalware/patients/alerts/new.js.erb +4 -0
- data/app/views/renalware/patients/bookmarks/_delete.html.slim +4 -3
- data/app/views/renalware/patients/bookmarks/_new.html.slim +4 -2
- data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_events.html.slim +0 -0
- data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_letters.html.slim +0 -0
- data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_prescriptions.html.slim +0 -0
- data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_problems.html.slim +0 -0
- data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/show.html.slim +1 -1
- data/app/views/renalware/patients/{_form.html.slim → patients/_form.html.slim} +0 -0
- data/app/views/renalware/patients/{_patient.html.slim → patients/_patient.html.slim} +0 -0
- data/app/views/renalware/patients/{_table.html.slim → patients/_table.html.slim} +1 -1
- data/app/views/renalware/patients/{edit.html.slim → patients/edit.html.slim} +1 -1
- data/app/views/renalware/patients/{index.html.slim → patients/index.html.slim} +0 -0
- data/app/views/renalware/patients/{new.html.slim → patients/new.html.slim} +1 -1
- data/app/views/renalware/patients/{show → patients/show}/_contact_details.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_hospital_numbers.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_letter_preferences.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_patient_demographics.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_person.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_primary_care_physician.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_referral.html.slim +0 -0
- data/app/views/renalware/patients/{show → patients/show}/_ukrdc_preferences.html.slim +0 -0
- data/app/views/renalware/patients/{show.html.slim → patients/show.html.slim} +7 -7
- data/app/views/renalware/patients/side_menu/_actions.html.slim +27 -0
- data/app/views/renalware/patients/side_menu/_general.html.slim +4 -2
- data/app/views/renalware/patients/side_menu/_modalities.html.slim +2 -2
- data/app/views/renalware/patients/side_menu/{_options.html.slim → _options.html.slim.redundant} +5 -0
- data/app/views/renalware/patients/side_menu/_transplants.html.slim +2 -1
- data/app/views/renalware/patients/worries/_delete.html.slim +4 -3
- data/app/views/renalware/patients/worries/_new.html.slim +23 -4
- data/app/views/renalware/patients/worryboard/_filters.html.slim +15 -0
- data/app/views/renalware/patients/worryboard/_table.html.slim +13 -6
- data/app/views/renalware/patients/worryboard/_worry.html.slim +6 -4
- data/app/views/renalware/patients/worryboard/show.html.slim +3 -5
- data/app/views/renalware/pd/dashboards/show.html.slim +11 -2
- data/app/views/renalware/pd/mdm/_top.html.slim +6 -1
- data/app/views/renalware/renal/profiles/_form.html.slim +2 -1
- data/app/views/renalware/renal/profiles/show.html.slim +1 -1
- data/app/views/renalware/shared/documents/_smoking_status.html.slim +1 -0
- data/app/views/renalware/shared/documents/_smoking_status_input.html.slim +5 -0
- data/app/views/renalware/{errors → system/errors}/internal_server_error.html.slim +0 -0
- data/app/views/renalware/{errors → system/errors}/not_found.html.slim +0 -0
- data/app/views/renalware/transplants/mdm_patients/_filters.html.slim +6 -7
- data/config/cucumber.yml +5 -2
- data/config/initializers/renalware.rb +13 -0
- data/config/initializers/simple_form_foundation.rb +3 -1
- data/config/locales/renalware/dashboard/dashboard.yml +0 -1
- data/config/locales/renalware/errors.en.yml +15 -14
- data/config/locales/renalware/events/events.yml +5 -0
- data/config/locales/renalware/hd/mdm_patients.yml +1 -1
- data/config/locales/renalware/hospitals/unit.yml +1 -0
- data/config/locales/renalware/mdm.yml +1 -1
- data/config/locales/renalware/messaging/messages.en.yml +29 -0
- data/config/locales/renalware/patients/alerts.en.yml +10 -0
- data/config/locales/renalware/patients/side_menu.en.yml +7 -4
- data/config/locales/renalware/patients/worries.en.yml +1 -1
- data/config/routes.rb +25 -6
- data/config/spring.rb +2 -0
- data/db/migrate/20170725120242_add_units_to_pathology_observation_descriptions.rb +19 -0
- data/db/migrate/20170809080925_add_notes_to_patient_worries.rb +5 -0
- data/db/migrate/20170810092953_create_messaging_messages.rb +13 -0
- data/db/migrate/20170810093532_create_messaging_receipts.rb +9 -0
- data/db/migrate/20170821100353_add_replying_to_message_id_to_messages.rb +12 -0
- data/db/migrate/20170823084127_create_patient_alerts.rb +16 -0
- data/db/migrate/20170824113401_add_stations_to_hospital_units.rb +8 -0
- data/db/migrate/20170830085137_create_hd_unit_stations.rb +17 -0
- data/db/migrate/20170830171726_create_hd_diurnal_period_codes.rb +10 -0
- data/db/seeds/default/hd/diurnal_period_codes.csv +4 -0
- data/db/seeds/default/hd/diurnal_period_codes.rb +13 -0
- data/db/seeds/default/hd/seeds.rb +1 -0
- data/db/seeds/default/pathology/measurement_units.csv +38 -0
- data/db/seeds/default/pathology/measurement_units.rb +13 -0
- data/db/seeds/default/pathology/pathology_observation_descriptions.csv +1741 -1741
- data/db/seeds/default/pathology/pathology_observation_descriptions.rb +8 -10
- data/db/seeds/default/pathology/seeds.rb +1 -0
- data/db/seeds/default/seeds.rb +0 -1
- data/db/seeds/default/system/roles.rb +1 -1
- data/{app/models → lib}/renalware/breadcrumb.rb +0 -0
- data/lib/renalware/configuration.rb +2 -0
- data/{app/models → lib}/renalware/failure.rb +0 -0
- data/{app/models → lib}/renalware/month_period.rb +0 -0
- data/{app/models → lib}/renalware/remembered_preferences.rb +0 -0
- data/{app/models → lib}/renalware/service_result.rb +0 -0
- data/{app/models → lib}/renalware/success.rb +0 -0
- data/lib/renalware/version.rb +1 -1
- data/lib/subscription_registry.rb +5 -0
- metadata +152 -61
- data/app/controllers/renalware/clinical_summaries_controller.rb +0 -13
- data/app/controllers/renalware/errors_controller.rb +0 -18
- data/app/controllers/renalware/mock_errors_controller.rb +0 -10
- data/app/controllers/renalware/patients_controller.rb +0 -107
- data/app/models/renalware/patient_search.rb +0 -11
- data/app/models/renalware/patient_summary.rb +0 -6
- data/app/views/renalware/admin/users/_header.html.slim +0 -6
- data/app/views/renalware/clinical/body_compositions/_row.html.slim +0 -15
- data/app/views/renalware/clinical/body_compositions/index.html.slim +0 -12
- data/app/views/renalware/deaths/_navigation.html.slim +0 -3
- data/app/views/renalware/directory/people/_header.html.slim +0 -5
- data/app/views/renalware/drugs/drugs/_header.html.slim +0 -5
- data/app/views/renalware/hospitals/units/_header.html.slim +0 -5
- data/db/seeds/default/hospitals/dialysis_units.csv +0 -7
- data/db/seeds/default/hospitals/dialysis_units.rb +0 -17
- data/db/seeds/default/hospitals/hospital_centres.csv +0 -86
- data/db/seeds/default/hospitals/hospitals.rb +0 -17
- data/db/seeds/default/hospitals/seeds.rb +0 -2
@@ -1,11 +1,14 @@
|
|
1
1
|
.list.investigations
|
2
2
|
h3 Recent Investigations
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
- if recent_pathology_results.any?
|
5
|
+
p
|
6
|
+
- recent_pathology_results.each do |pathology_result|
|
7
|
+
- description, observation, date = pathology_result
|
8
|
+
- if observation.result.present?
|
9
|
+
span #{date}: #{description} #{observation.result};
|
10
|
+
- else
|
11
|
+
span #{description};
|
12
|
+
|
|
13
|
+
- else
|
14
|
+
p None
|
@@ -0,0 +1,23 @@
|
|
1
|
+
table#patients.mdm-patients.columns
|
2
|
+
thead
|
3
|
+
tr
|
4
|
+
th.col-width-tiny
|
5
|
+
th.col-width-large= sort_link([:renalware, presenter.q], :family_name, t(".name"))
|
6
|
+
th.col-width-nhs-no= t(".nhs_no")
|
7
|
+
th.col-width-reference-no= t(".hosp_no")
|
8
|
+
th.col-width-tiny= t(".sex")
|
9
|
+
th.col-width-tiny= t(".age")
|
10
|
+
th.col-width-tiny= t(".modality")
|
11
|
+
th.col-width-tiny= t(".hgb")
|
12
|
+
th.col-width-date= t(".hgb_date")
|
13
|
+
th.col-width-tiny= t(".ure")
|
14
|
+
th.col-width-date= t(".ure_date")
|
15
|
+
th.col-width-tiny= t(".cre")
|
16
|
+
th.col-width-date
|
17
|
+
= sort_link([:renalware, presenter.q], :patient_current_key_observation_set_cre_date, t(".cre_date"))
|
18
|
+
th.col-width-tiny= t(".mdrd")
|
19
|
+
th.col-width-date= t(".esrf")
|
20
|
+
|
21
|
+
tbody
|
22
|
+
- presenter.patients.each do |patient|
|
23
|
+
= render "patient", patient: patient, view_proc: presenter.view_proc, q: presenter.q
|
@@ -1,32 +1,9 @@
|
|
1
|
-
.
|
2
|
-
h1.page-heading.columns= presenter.page_title
|
1
|
+
= within_admin_layout(title: presenter.page_title)
|
3
2
|
|
4
|
-
.row
|
5
|
-
|
6
|
-
|
7
|
-
.row
|
8
|
-
table#patients.mdm-patients.columns
|
9
|
-
thead
|
10
|
-
tr
|
11
|
-
th.col-width-tiny
|
12
|
-
th.col-width-large= sort_link([:renalware, presenter.q], :family_name, t(".name"))
|
13
|
-
th.col-width-nhs-no= t(".nhs_no")
|
14
|
-
th.col-width-reference-no= t(".hosp_no")
|
15
|
-
th.col-width-tiny= t(".sex")
|
16
|
-
th.col-width-tiny= t(".age")
|
17
|
-
th.col-width-tiny= t(".modality")
|
18
|
-
th.col-width-tiny= t(".hgb")
|
19
|
-
th.col-width-date= t(".hgb_date")
|
20
|
-
th.col-width-tiny= t(".ure")
|
21
|
-
th.col-width-date= t(".ure_date")
|
22
|
-
th.col-width-tiny= t(".cre")
|
23
|
-
th.col-width-date
|
24
|
-
= sort_link([:renalware, presenter.q], :patient_current_key_observation_set_cre_date, t(".cre_date"))
|
25
|
-
th.col-width-tiny= t(".mdrd")
|
26
|
-
th.col-width-date= t(".esrf")
|
3
|
+
.row
|
4
|
+
.columns
|
5
|
+
= render_if_exists "filters", presenter: presenter
|
27
6
|
|
28
|
-
|
29
|
-
- presenter.patients.each do |patient|
|
30
|
-
= render "patient", patient: patient, view_proc: presenter.view_proc, q: presenter.q
|
7
|
+
= render "table", presenter: presenter
|
31
8
|
|
32
9
|
= paginate presenter.patients
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/ This is the send message modal dialog content
|
2
|
+
= simple_form_for form,
|
3
|
+
html: { autocomplete: "off"},
|
4
|
+
remote: true,
|
5
|
+
url: messaging_messages_path(patient_id: patient) do |f|
|
6
|
+
h2= t(".title")
|
7
|
+
=f.input :replying_to_message_id, as: :hidden
|
8
|
+
|
9
|
+
/ NB the inline styling here prevents an initial flash and re-jiggle of dropdown content which
|
10
|
+
/ is subsequently hidden by select2 after 100 ms or so.
|
11
|
+
=f.input :recipient_ids,
|
12
|
+
label: t(".recipient_ids"),
|
13
|
+
collection: recipient_options,
|
14
|
+
as: :grouped_select,
|
15
|
+
group_method: :users,
|
16
|
+
group_label_method: :name,
|
17
|
+
label_method: :to_s,
|
18
|
+
value_method: :id,
|
19
|
+
input_html: { class: "searchable_select",
|
20
|
+
id: "message_recipient_ids",
|
21
|
+
multiple: "multiple",
|
22
|
+
style: "visibility: hidden; height: 2.5rem" }
|
23
|
+
=f.input :subject
|
24
|
+
=f.input :urgent, as: :boolean, boolean_style: :inline
|
25
|
+
=f.input :body, as: :text, input_html: { rows: 7 }
|
26
|
+
=f.submit "Send", class: :button
|
27
|
+
span= " or "
|
28
|
+
=link_to t(".cancel"),
|
29
|
+
"#",
|
30
|
+
"aria-label" => "Close",
|
31
|
+
class: "reveal-modal-close"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
tr(class="#{ "urgent" if message.urgent?}" id=message.html_identifier)
|
2
|
+
td=l(message.sent_at)
|
3
|
+
td= link_to(message.patient, patient_clinical_summary_path(message.patient))
|
4
|
+
td= message.patient.hospital_identifier
|
5
|
+
td= message.subject
|
6
|
+
td= message.recipients.map(&:to_s).join(",")
|
7
|
+
td
|
8
|
+
= link_to "View",
|
9
|
+
"##{message.html_preview_identifier}",
|
10
|
+
data: { behaviour: "toggler" },
|
11
|
+
class: :right
|
12
|
+
= content_tag(:tr,
|
13
|
+
id: "#{message.html_preview_identifier}",
|
14
|
+
style: "display: none",
|
15
|
+
class: "#{ "urgent" if message.urgent?}")
|
16
|
+
td(colspan=6)
|
17
|
+
.message-preview
|
18
|
+
.subject= message.subject
|
19
|
+
.body= message.body
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/ This partial is pulled in when the whole page renders, and creates the link and
|
2
|
+
/ associated modal dialog wiring sending a message.
|
3
|
+
- patient = Renalware::Messaging.cast_patient(patient)
|
4
|
+
- url = new_messaging_message_path(patient_id: patient, format: :html)
|
5
|
+
|
6
|
+
/ Link to launch the modal dialog
|
7
|
+
=link_to(url,
|
8
|
+
id: "send-patient-message",
|
9
|
+
data: { "reveal-id" => "send-message-modal", "reveal-ajax" => "true" }) do
|
10
|
+
i.fa.fa-link-annotation.fa-envelope
|
11
|
+
= link_text
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/ This partial is pulled in when the whole page renders, and creates the link and
|
2
|
+
/ associated modal dialog wiring sending a message.
|
3
|
+
- patient = Renalware::Messaging.cast_patient(patient)
|
4
|
+
- url = new_messaging_message_path(patient_id: patient,
|
5
|
+
replying_to_message_id: replying_to_message_id,
|
6
|
+
format: :html)
|
7
|
+
/ Link to launch the modal dialog
|
8
|
+
=link_to(url,
|
9
|
+
data: { "reveal-id" => "send-message-modal", "reveal-ajax" => "true" },
|
10
|
+
class: "button secondary") do
|
11
|
+
i.fa.fa-link-annotation.fa-reply
|
12
|
+
= link_text
|
@@ -0,0 +1,13 @@
|
|
1
|
+
table.messages.messages-sent.has_togglable_content
|
2
|
+
thead
|
3
|
+
tr
|
4
|
+
th.col-width-date-time= t(".sent_at")
|
5
|
+
th.col-width-large= t(".patient_name")
|
6
|
+
th.col-width-reference-no= t(".hosp_no")
|
7
|
+
th= t(".subject")
|
8
|
+
th= t(".recipients")
|
9
|
+
td
|
10
|
+
tbody
|
11
|
+
= render partial: "message", collection: messages
|
12
|
+
= paginate messages
|
13
|
+
= render "renalware/messaging/messages/modal_dialog_placeholder"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# We render this view when the message has been successfully sent.
|
2
|
+
// TODO: the flash here is not really working
|
3
|
+
%>
|
4
|
+
<%= refresh(".flash-message", partial: "renalware/shared/flash_messages", locals: local_assigns) %>
|
5
|
+
$("#send-message-modal").foundation('reveal', 'close');
|
6
|
+
<%#
|
7
|
+
Remove the message that has now been marked as read from the table.
|
8
|
+
We need to remove the real row and the (initially hidden) preview row also.
|
9
|
+
%>
|
10
|
+
<% if original_message.present? %>
|
11
|
+
$("#<%= original_message.html_identifier %>, #<%= original_message.html_preview_identifier %>")
|
12
|
+
.fadeOut(300, function(){ $(this).remove();});
|
13
|
+
<% end %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/ Invoked by Foundation Reveal from a Send Message link in the patient LH nav
|
2
|
+
/ which is marked up as using data-reveal-ajax=true and link to this action
|
3
|
+
/ and a format of html (would otherwise default to js)
|
4
|
+
/ We render the modal content html here and foundation will display the modal itself.
|
5
|
+
= render "form", form: form, patient: patient, recipient_options: recipient_options
|
@@ -0,0 +1,7 @@
|
|
1
|
+
// We render this view if there was a validation error submitting the foundation reveal modal.
|
2
|
+
// Replace the original content so that error messages are displayed.
|
3
|
+
var modal = $("#send-message-modal")
|
4
|
+
$(modal).html("<%= j(render 'form', form: form, patient: patient, recipient_options: recipient_options) %>");
|
5
|
+
// TODO: The re-initializing of select2 in a modal should be a global handler
|
6
|
+
$('.searchable_select', modal).select2();
|
7
|
+
Renalware.Messaging.init();
|
@@ -0,0 +1,45 @@
|
|
1
|
+
- message = receipt.message
|
2
|
+
|
3
|
+
tr(class="#{ "urgent" if message.urgent?}" id=message.html_identifier)
|
4
|
+
td
|
5
|
+
= pluralize(message.age_in_days, "day")
|
6
|
+
/ td.state.show-for-large-up
|
7
|
+
/ - if message.urgent?
|
8
|
+
/ span Urgent
|
9
|
+
td= message.author
|
10
|
+
td= l(message.sent_at)
|
11
|
+
td= link_to(message.patient, patient_clinical_summary_path(message.patient))
|
12
|
+
td= message.patient.hospital_identifier
|
13
|
+
td.col-width-large-with-ellipsis= message.subject
|
14
|
+
td
|
15
|
+
= link_to "View",
|
16
|
+
"##{message.html_preview_identifier}",
|
17
|
+
data: { behaviour: "toggler" },
|
18
|
+
class: :right
|
19
|
+
= content_tag(:tr,
|
20
|
+
id: "#{message.html_preview_identifier}",
|
21
|
+
style: "display: none",
|
22
|
+
class: "#{ "urgent" if message.urgent?}")
|
23
|
+
td(colspan=5)
|
24
|
+
.message-preview
|
25
|
+
.subject= message.subject
|
26
|
+
.body= message.body
|
27
|
+
td.nowrap(colspan=2)
|
28
|
+
ul.actions
|
29
|
+
li= link_to "Keep as unread",
|
30
|
+
"#message-preview-#{message.id}",
|
31
|
+
data: { behaviour: "toggler" },
|
32
|
+
class: "button secondary keep-as-unread"
|
33
|
+
|
34
|
+
li= render partial: "renalware/messaging/messages/send_reply_link",
|
35
|
+
locals: { patient: message.patient,
|
36
|
+
link_text: "Reply",
|
37
|
+
replying_to_message_id: message.id }
|
38
|
+
|
39
|
+
li= link_to(mark_as_read_messaging_message_receipt_path(message, receipt),
|
40
|
+
class: "button mark-as-read",
|
41
|
+
method: :patch,
|
42
|
+
remote: true) do
|
43
|
+
i.fa.fa-check
|
44
|
+
| Mark as read
|
45
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
table.auto-layout.align-top.messages.has-togglable-rows
|
2
|
+
thead
|
3
|
+
tr
|
4
|
+
th.col-width-tinyish= t(".age")
|
5
|
+
/th.col-width-tiny.show-for-large-up
|
6
|
+
th.col-width-medium= t(".from")
|
7
|
+
th.col-width-date-time= t(".sent_at")
|
8
|
+
th.col-width-large= t(".patient_name")
|
9
|
+
th.col-width-reference-no= t(".hosp_no")
|
10
|
+
th= t(".subject")
|
11
|
+
td.col-width-small
|
12
|
+
|
13
|
+
tbody
|
14
|
+
= render partial: "renalware/messaging/receipts/receipt", collection: receipts
|
15
|
+
|
16
|
+
= render "renalware/messaging/messages/modal_dialog_placeholder"
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<%#
|
2
|
+
Remove the message that has now been marked as read from the table (provided we are viewing a table
|
3
|
+
of unread messages). We need to remove the real row and the (initially hidden) preview row also.
|
4
|
+
%>
|
5
|
+
$("#<%= receipt.message.html_identifier %>, #<%= receipt.message.html_preview_identifier %>",
|
6
|
+
".unread-messages").fadeOut(300, function(){ $(this).remove();});
|
@@ -1,12 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
= render "renalware/shared/errors", model: @modality_description
|
1
|
+
/= render "header"
|
2
|
+
= render "renalware/shared/errors", model: modality_description
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
= simple_form_for modality_description,
|
5
|
+
url: url,
|
6
|
+
as: :modalities_description,
|
7
|
+
html: { autocomplete: "off" },
|
8
|
+
wrapper: :horizontal_form do |f|
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
= f.input :name, wrapper: :horizontal_medium
|
11
|
+
|
12
|
+
= f.button :submit
|
13
|
+
span= " or "
|
14
|
+
= link_to "Cancel", modalities_descriptions_path
|
@@ -1,20 +1,25 @@
|
|
1
|
-
|
2
|
-
=
|
1
|
+
= content_for(:actions) do
|
2
|
+
= link_to t("new_record.link_title"),
|
3
|
+
new_modalities_description_path,
|
4
|
+
class: "button"
|
5
|
+
|
6
|
+
= within_admin_layout(title: "Modalities") do
|
3
7
|
|
4
|
-
.row
|
5
8
|
table.modality-codes
|
6
9
|
thead
|
7
10
|
tr
|
8
11
|
th.col-width-small
|
9
12
|
th Name
|
10
13
|
tbody
|
11
|
-
-
|
14
|
+
- modality_descriptions.each do |description|
|
12
15
|
tr
|
13
16
|
td
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
- if policy(description).edit?
|
18
|
+
= link_to "Edit", edit_modalities_description_path(description.id)
|
19
|
+
- if policy(description).destroy?
|
20
|
+
= pipe_separator
|
21
|
+
= link_to "Delete",
|
22
|
+
modalities_description_path(description.id),
|
23
|
+
method: :delete,
|
24
|
+
data: { confirm: "Are you sure you want to delete this modal?" }
|
25
|
+
td= description.name
|
@@ -7,7 +7,7 @@ html lang="en"
|
|
7
7
|
|
8
8
|
= stylesheet_link_tag "renalware/application", media: :all
|
9
9
|
= stylesheet_link_tag "renalware/print/pathology_request_forms", media: :all
|
10
|
-
= javascript_include_tag "renalware/
|
10
|
+
= javascript_include_tag "renalware/modernizr"
|
11
11
|
|
12
12
|
= csrf_meta_tag
|
13
13
|
|
data/app/views/renalware/patients/{_prescriptions.html.slim → _prescriptions.html.slim.dead}
RENAMED
File without changes
|
@@ -3,4 +3,4 @@ ul.side-nav
|
|
3
3
|
= render "renalware/patients/side_menu/general", patient: patient
|
4
4
|
= render "renalware/patients/side_menu/modalities", patient: patient
|
5
5
|
= render "renalware/patients/side_menu/transplants", patient: patient
|
6
|
-
= render "renalware/patients/side_menu/
|
6
|
+
= render "renalware/patients/side_menu/actions", patient: patient
|
@@ -0,0 +1,12 @@
|
|
1
|
+
tr.alerts--alert(class=("urgent" if alert.urgent ) id="alert-#{alert.id}")
|
2
|
+
td.icon
|
3
|
+
td.notes
|
4
|
+
span(title=alert.notes)= alert.notes
|
5
|
+
td.author= alert.created_by.username
|
6
|
+
td.col-width-date= l(alert.created_at.to_date)
|
7
|
+
td.actions
|
8
|
+
= link_to(patient_alert_path(alert.patient, alert),
|
9
|
+
remote: true,
|
10
|
+
method: :delete,
|
11
|
+
data: { confirm: "Are you sure you want to remove this alert?" }) do
|
12
|
+
i.fa.fa-trash-o
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/ This partial is pulled in when the whole page renders, and creates the link and
|
2
|
+
/ associated modal dialog wiring sending a message.
|
3
|
+
- url = new_patient_alert_path(patient_id: patient, format: :html)
|
4
|
+
|
5
|
+
/ Link to launch the modal dialog
|
6
|
+
=link_to(url, data: { "reveal-id" => "create-alert-modal", "reveal-ajax" => "true" }) do
|
7
|
+
i.fa.fa-link-annotation.fa-exclamation-circle
|
8
|
+
= link_text
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/ This is the create alert modal dialog content
|
2
|
+
= simple_form_for alert,
|
3
|
+
html: { autocomplete: "off"},
|
4
|
+
remote: true,
|
5
|
+
url: patient_alerts_path(patient_id: patient) do |f|
|
6
|
+
h2= t(".title")
|
7
|
+
=f.input :urgent, as: :boolean, boolean_style: :inline
|
8
|
+
=f.input :notes
|
9
|
+
=f.submit "Create alert", class: :button
|
10
|
+
span= " or "
|
11
|
+
=link_to t(".cancel"),
|
12
|
+
"#",
|
13
|
+
"aria-label" => "Close",
|
14
|
+
class: "reveal-modal-close"
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/ Invoked by Foundation Reveal from a Create Alert link in the patient LH nav
|
2
|
+
/ which is marked up as using data-reveal-ajax=true and link to this action
|
3
|
+
/ and a format of html (would otherwise default to js)
|
4
|
+
/ We render the modal content html here and foundation will display the modal itself.
|
5
|
+
= render "form", patient: patient, alert: alert
|
@@ -0,0 +1,4 @@
|
|
1
|
+
// We render this view if there was a validation error submitting the foundation reveal modal.
|
2
|
+
// Replace the original content so that error messages are displayed.
|
3
|
+
var modal = $("#create-alert-modal")
|
4
|
+
$(modal).html("<%= j(render 'form', patient: patient, alert: alert) %>");
|
@@ -1,5 +1,7 @@
|
|
1
1
|
/ Link to launch the modal dialog
|
2
|
-
= link_to(
|
2
|
+
= link_to("#", data: { "reveal-id" => "add-patient-bookmark-modal" }) do
|
3
|
+
i.fa.fa-link-annotation.fa-bookmark-o
|
4
|
+
= link_text
|
3
5
|
|
4
6
|
/ The modal dialog
|
5
7
|
#add-patient-bookmark-modal.reveal-modal.medium(data-reveal)
|
@@ -7,7 +9,7 @@
|
|
7
9
|
html: { autocomplete: "off" },
|
8
10
|
url: patient_bookmarks_path(patient_id: patient) do |f|
|
9
11
|
h2= t(".title")
|
10
|
-
=f.input :urgent, as: :boolean
|
12
|
+
=f.input :urgent, as: :boolean, boolean_style: :inline
|
11
13
|
=f.input :notes, as: :text, input_html: { autofocus: :autofocus }
|
12
14
|
=f.submit t(".save"), class: :button
|
13
15
|
span= " or "
|
data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_events.html.slim
RENAMED
File without changes
|
data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_letters.html.slim
RENAMED
File without changes
|
data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_prescriptions.html.slim
RENAMED
File without changes
|
data/app/views/renalware/{clinical_summaries → patients/clinical_summaries}/_problems.html.slim
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|