renalware-core 2.0.0.pre.rc11 → 2.0.0.pre.rc13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/app/assets/javascripts/renalware/letters.js +10 -0
- data/app/assets/stylesheets/renalware/modules/_letters.scss +0 -2
- data/app/assets/stylesheets/renalware/modules/_pathology.scss +24 -3
- data/app/assets/stylesheets/renalware/modules/_patients.scss +1 -2
- data/app/assets/stylesheets/renalware/partials/_layout.scss +3 -15
- data/app/assets/stylesheets/renalware/patient_pages.scss +43 -0
- data/app/controllers/renalware/api/ukrdc/patients_controller.rb +1 -1
- data/app/controllers/renalware/api/v1/medications/prescriptions_controller.rb +38 -0
- data/app/controllers/renalware/drugs/drugs_controller.rb +2 -6
- data/app/controllers/renalware/letters/completed_letters_controller.rb +21 -3
- data/app/controllers/renalware/letters/lists_controller.rb +9 -1
- data/app/controllers/renalware/pathology/historical_observation_results_controller.rb +1 -1
- data/app/controllers/renalware/pathology/recent_observation_results_controller.rb +1 -1
- data/app/helpers/renalware/letters_helper.rb +7 -0
- data/app/models/concerns/renalware/patient_pathology_scopes.rb +1 -1
- data/app/models/concerns/renalware/patients_ransack_helper.rb +10 -8
- data/app/models/concerns/renalware/personable.rb +1 -1
- data/app/models/renalware/admissions/admission.rb +1 -1
- data/app/models/renalware/admissions/consult.rb +1 -1
- data/app/models/renalware/admissions/request.rb +1 -1
- data/app/models/renalware/clinical/body_composition.rb +1 -1
- data/app/models/renalware/drugs/classification.rb +2 -2
- data/app/models/renalware/drugs/drug.rb +1 -1
- data/app/models/renalware/feeds/files/import_job_factory.rb +0 -1
- data/app/models/renalware/feeds/files/practices/import_job.rb +1 -0
- data/app/models/renalware/feeds/message_processor.rb +5 -4
- data/app/models/renalware/hd/diary_slot.rb +3 -2
- data/app/models/renalware/letters/archive.rb +1 -1
- data/app/models/renalware/letters/complete_letter.rb +9 -5
- data/app/models/renalware/letters/contact.rb +1 -1
- data/app/models/renalware/letters/electronic_receipt.rb +1 -1
- data/app/models/renalware/letters/letter.rb +3 -0
- data/app/models/renalware/letters/letter/approved.rb +2 -0
- data/app/models/renalware/letters/letter/draft.rb +5 -1
- data/app/models/renalware/letters/letter/pending_review.rb +2 -0
- data/app/models/renalware/letters/pdf_letter_cache.rb +27 -13
- data/app/models/renalware/letters/signature.rb +2 -2
- data/app/models/renalware/low_clearance/mdm_patients_query.rb +1 -1
- data/app/models/renalware/messaging/internal/author.rb +1 -0
- data/app/models/renalware/messaging/message.rb +1 -1
- data/app/models/renalware/pathology/measurement_unit.rb +1 -1
- data/app/models/renalware/pathology/observation.rb +7 -2
- data/app/models/renalware/pathology/observation_description.rb +8 -2
- data/app/models/renalware/pathology/observation_request.rb +1 -4
- data/app/models/renalware/patients/alert.rb +1 -1
- data/app/models/renalware/patients/bookmark.rb +1 -0
- data/app/models/renalware/patients/worry.rb +4 -1
- data/app/models/renalware/pd/peritonitis_episode_type.rb +2 -1
- data/app/models/renalware/pd/regime_bag.rb +1 -1
- data/app/models/renalware/renal/aki_alert.rb +1 -1
- data/app/models/renalware/research/study.rb +5 -2
- data/app/models/renalware/research/study_participant.rb +5 -14
- data/app/models/renalware/transplants/donation.rb +1 -1
- data/app/models/renalware/transplants/mdm_patients_query.rb +4 -2
- data/app/models/renalware/transplants/recipient_followup.rb +2 -2
- data/app/models/renalware/transplants/registrations/wait_list_query.rb +8 -2
- data/app/models/renalware/ukrdc.rb +9 -0
- data/app/models/renalware/ukrdc/patients_query.rb +24 -0
- data/app/models/renalware/ukrdc/send_patient.rb +97 -0
- data/app/models/renalware/ukrdc/send_patients.rb +91 -0
- data/app/models/renalware/ukrdc/transmission_log.rb +30 -0
- data/app/models/renalware/virology/profile.rb +1 -0
- data/app/presenters/date_presenter.rb +2 -0
- data/app/presenters/date_time_presenter.rb +2 -0
- data/app/presenters/enumerize/value_presenter.rb +2 -0
- data/app/presenters/false_class_presenter.rb +2 -0
- data/app/presenters/presenter.rb +2 -0
- data/app/presenters/renalware/accesses/assessment_presenter.rb +2 -0
- data/app/presenters/renalware/accesses/patient_presenter.rb +2 -0
- data/app/presenters/renalware/accesses/plan_presenter.rb +2 -0
- data/app/presenters/renalware/accesses/procedure_presenter.rb +2 -0
- data/app/presenters/renalware/accesses/profile_presenter.rb +2 -0
- data/app/presenters/renalware/address_presenter.rb +2 -0
- data/app/presenters/renalware/address_presenter/block.rb +2 -0
- data/app/presenters/renalware/address_presenter/short.rb +2 -0
- data/app/presenters/renalware/address_presenter/single_line.rb +2 -0
- data/app/presenters/renalware/admin/users/summary_part.rb +2 -0
- data/app/presenters/renalware/admissions/admission_presenter.rb +2 -0
- data/app/presenters/renalware/admissions/consult_presenter.rb +2 -0
- data/app/presenters/renalware/admissions/summary_part.rb +2 -0
- data/app/presenters/renalware/clinical/body_composition_presenter.rb +2 -0
- data/app/presenters/renalware/clinical/dry_weight_presenter.rb +2 -0
- data/app/presenters/renalware/clinical/dry_weights_presenter.rb +2 -0
- data/app/presenters/renalware/clinical/header_presenter.rb +2 -0
- data/app/presenters/renalware/clinical/profile_presenter.rb +2 -0
- data/app/presenters/renalware/country_presenter.rb +2 -0
- data/app/presenters/renalware/dashboard/dashboard_presenter.rb +2 -0
- data/app/presenters/renalware/directory/person_auto_complete_presenter.rb +2 -0
- data/app/presenters/renalware/events/events_presenter.rb +2 -0
- data/app/presenters/renalware/events/summary_part.rb +2 -0
- data/app/presenters/renalware/hd/dashboard_presenter.rb +2 -0
- data/app/presenters/renalware/hd/diary_presenter.rb +2 -0
- data/app/presenters/renalware/hd/diary_slot_presenter.rb +2 -0
- data/app/presenters/renalware/hd/mdm_patient_presenter.rb +2 -0
- data/app/presenters/renalware/hd/mdm_presenter.rb +2 -0
- data/app/presenters/renalware/hd/null_slot.rb +2 -0
- data/app/presenters/renalware/hd/patient_presenter.rb +2 -0
- data/app/presenters/renalware/hd/profile_document_presenter.rb +2 -0
- data/app/presenters/renalware/hd/profile_presenter.rb +2 -0
- data/app/presenters/renalware/hd/protocol/session_presenter.rb +2 -0
- data/app/presenters/renalware/hd/protocol_presenter.rb +2 -0
- data/app/presenters/renalware/hd/session_access_presenter.rb +2 -0
- data/app/presenters/renalware/hd/session_presenter.rb +2 -0
- data/app/presenters/renalware/hd/station_presenter.rb +2 -0
- data/app/presenters/renalware/hd/unmet_preferences_presenter.rb +2 -0
- data/app/presenters/renalware/letters/contact_description_presenter.rb +2 -0
- data/app/presenters/renalware/letters/contact_presenter.rb +2 -0
- data/app/presenters/renalware/letters/contacts_presenter.rb +2 -0
- data/app/presenters/renalware/letters/electronic_receipt_presenter.rb +2 -0
- data/app/presenters/renalware/letters/letter_form_presenter.rb +2 -0
- data/app/presenters/renalware/letters/letter_presenter.rb +2 -0
- data/app/presenters/renalware/letters/letter_presenter_factory.rb +2 -0
- data/app/presenters/renalware/letters/part_class_filter.rb +2 -0
- data/app/presenters/renalware/letters/practice_email_meta_data.rb +2 -0
- data/app/presenters/renalware/letters/recipient_presenter.rb +2 -0
- data/app/presenters/renalware/letters/summary_part.rb +2 -0
- data/app/presenters/renalware/low_clearance/dashboard_presenter.rb +2 -0
- data/app/presenters/renalware/low_clearance/mdm_presenter.rb +2 -0
- data/app/presenters/renalware/mdm_patient_presenter.rb +2 -0
- data/app/presenters/renalware/mdm_patients_presenter.rb +2 -0
- data/app/presenters/renalware/mdm_presenter.rb +2 -4
- data/app/presenters/renalware/medications/prescription_presenter.rb +2 -0
- data/app/presenters/renalware/medications/provider_code_presenter.rb +2 -0
- data/app/presenters/renalware/medications/route_form_presenter.rb +2 -0
- data/app/presenters/renalware/medications/summary_part.rb +37 -6
- data/app/presenters/renalware/medications/treatable_presenter.rb +2 -0
- data/app/presenters/renalware/messaging/internal/message_presenter.rb +2 -0
- data/app/presenters/renalware/messaging/internal/receipt_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/observation_presenter.rb +4 -2
- data/app/presenters/renalware/pathology/observation_set_presenter.rb +21 -8
- data/app/presenters/renalware/pathology/observations_diff.rb +2 -0
- data/app/presenters/renalware/pathology/observations_for_codes_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/patient_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/requests/global_rule_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/requests/global_rule_set_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/requests/patient_rule_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/requests/request_presenter.rb +2 -0
- data/app/presenters/renalware/pathology/requests/sample_description.rb +2 -0
- data/app/presenters/renalware/pathology/results_presenter.rb +2 -0
- data/app/presenters/renalware/patient_presenter.rb +2 -0
- data/app/presenters/renalware/pd/dashboard_presenter.rb +2 -0
- data/app/presenters/renalware/pd/delivery_interval_presenter.rb +2 -0
- data/app/presenters/renalware/pd/mdm_presenter.rb +2 -0
- data/app/presenters/renalware/pd/peritonitis_episode_presenter.rb +2 -0
- data/app/presenters/renalware/pd/training_duration_presenter.rb +2 -0
- data/app/presenters/renalware/primary_care_physician_presenter.rb +2 -0
- data/app/presenters/renalware/problems/summary_part.rb +2 -0
- data/app/presenters/renalware/renal/clinical_summary_presenter.rb +2 -0
- data/app/presenters/renalware/reporting/audit_presenter.rb +2 -0
- data/app/presenters/renalware/summary_part.rb +2 -0
- data/app/presenters/renalware/system/users_presenter.rb +2 -0
- data/app/presenters/renalware/time_of_day_presenter.rb +2 -0
- data/app/presenters/renalware/transplants/consent_presenter.rb +2 -0
- data/app/presenters/renalware/transplants/donor_dashboard_presenter.rb +2 -0
- data/app/presenters/renalware/transplants/mdm_presenter.rb +2 -0
- data/app/presenters/renalware/transplants/patient_presenter.rb +2 -0
- data/app/presenters/renalware/transplants/recipient_dashboard_presenter.rb +2 -0
- data/app/presenters/renalware/transplants/wait_list_registration_presenter.rb +2 -0
- data/app/presenters/renalware/ukrdc/pathology_observation_presenter.rb +2 -0
- data/app/presenters/renalware/ukrdc/patient_presenter.rb +58 -4
- data/app/presenters/string_presenter.rb +2 -0
- data/app/presenters/time_presenter.rb +2 -0
- data/app/presenters/true_class_presenter.rb +2 -0
- data/app/views/renalware/api/ukrdc/patients/_encounters.xml.builder +1 -3
- data/app/views/renalware/api/ukrdc/patients/_lab_orders.xml.builder +5 -6
- data/app/views/renalware/api/ukrdc/patients/_observations.xml.builder +5 -4
- data/app/views/renalware/api/ukrdc/patients/encounters/_hd_session.xml.builder +1 -1
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder +7 -1
- data/app/views/renalware/api/v1/medications/prescriptions/index.json.jbuilder +14 -0
- data/app/views/renalware/api/v1/patients/patients/show.json.jbuilder +17 -4
- data/app/views/renalware/clinics/clinic_visits/_clinic_visit.html.slim +1 -1
- data/app/views/renalware/events/events/toggled_cell/_biopsy.html.slim +1 -1
- data/app/views/renalware/events/events/toggled_cell/_investigation.html.slim +1 -1
- data/app/views/renalware/events/events/toggled_cell/_simple.html.slim +1 -1
- data/app/views/renalware/events/events/toggled_cell/_swab.html.slim +1 -1
- data/app/views/renalware/events/swabs/_list.html.slim +1 -1
- data/app/views/renalware/hd/mdm_patients/_patient.html.slim +6 -0
- data/app/views/renalware/hd/mdm_patients/_table.html.slim +6 -0
- data/app/views/renalware/layouts/_patient.html.slim +32 -30
- data/app/views/renalware/letters/completed_letters/create.js.erb +8 -0
- data/app/views/renalware/letters/completed_letters/new.html.slim +27 -0
- data/app/views/renalware/letters/lists/_letter.html.slim +18 -4
- data/app/views/renalware/letters/lists/_table.html.slim +19 -0
- data/app/views/renalware/letters/lists/show.html.slim +13 -24
- data/app/views/renalware/letters/lists/show.js.erb +11 -0
- data/app/views/renalware/medications/_summary_part.html.slim +17 -16
- data/app/views/renalware/pathology/current_observation_results/index.html.slim +9 -12
- data/app/views/renalware/patients/_layout.html.slim +27 -24
- data/app/views/renalware/patients/_side_menu.html.slim +1 -0
- data/app/views/renalware/patients/side_menu/_actions.html.slim +1 -1
- data/app/views/renalware/virology/vaccinations/_toggled_cell.html.slim +1 -1
- data/config/initializers/delayed_job.rb +3 -0
- data/config/initializers/wicked_pdf.rb +0 -1
- data/config/locales/en.yml +6 -0
- data/config/locales/renalware/hd/mdm_patients.yml +6 -0
- data/config/routes.rb +2 -4
- data/db/functions/import_practice_memberships_csv_v02.sql +50 -0
- data/db/migrate/20180221210458_add_state_index_on_modalities.rb +5 -0
- data/db/migrate/20180222090501_add_partial_index_to_bookmarks.rb +6 -0
- data/db/migrate/20180223100420_add_sent_to_ukrdc_at_to_patients.rb +5 -0
- data/db/migrate/20180226124724_add_patient_id_to_virology_profile.rb +9 -0
- data/db/migrate/20180226132410_create_ukrdc_transmission_logs.rb +15 -0
- data/db/migrate/20180301095040_update_fn_to_upsert_gp_practive_memberships.rb +9 -0
- data/db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb +32 -0
- data/db/migrate/20180306071308_remove_rogue_aki_alerts_column.rb +5 -0
- data/db/migrate/20180306080518_add_state_tracking_cols_to_letters.rb +19 -0
- data/lib/renalware/engine.rb +1 -0
- data/lib/renalware/version.rb +1 -1
- data/lib/tasks/ukrdc.rake +16 -0
- data/lib/test_support/ajax_helpers.rb +2 -2
- data/spec/factories/accesses/patients.rb +2 -0
- data/spec/factories/accesses/plans.rb +2 -0
- data/spec/factories/accesses/plans_types.rb +2 -0
- data/spec/factories/accesses/procedures.rb +2 -0
- data/spec/factories/accesses/profiles.rb +2 -0
- data/spec/factories/accesses/sites.rb +2 -0
- data/spec/factories/accesses/types.rb +2 -0
- data/spec/factories/admissions/admissions.rb +2 -0
- data/spec/factories/admissions/consult_sites.rb +2 -0
- data/spec/factories/admissions/consults.rb +2 -0
- data/spec/factories/admissions/request_reasons.rb +2 -0
- data/spec/factories/admissions/requests.rb +1 -0
- data/spec/factories/clinical/allergies.rb +2 -0
- data/spec/factories/clinical/body_compositions.rb +2 -0
- data/spec/factories/clinical/dry_weights.rb +2 -0
- data/spec/factories/clinical/patients.rb +2 -0
- data/spec/factories/clinics/appointments.rb +2 -0
- data/spec/factories/clinics/clinic_visits.rb +2 -0
- data/spec/factories/clinics/clinics.rb +2 -0
- data/spec/factories/deaths/cause.rb +2 -0
- data/spec/factories/deaths/modality_descriptions.rb +2 -0
- data/spec/factories/directory/people.rb +2 -0
- data/spec/factories/drugs/drug.rb +2 -0
- data/spec/factories/drugs/drug_types.rb +7 -0
- data/spec/factories/events/events.rb +2 -0
- data/spec/factories/events/events_types.rb +2 -0
- data/spec/factories/feeds/file.rb +2 -0
- data/spec/factories/feeds/file_types.rb +2 -0
- data/spec/factories/hd/cannulation_types.rb +2 -0
- data/spec/factories/hd/dialysates.rb +2 -0
- data/spec/factories/hd/dialysers.rb +2 -0
- data/spec/factories/hd/diaries.rb +2 -0
- data/spec/factories/hd/diurnal_period_codes.rb +2 -0
- data/spec/factories/hd/hd_session_document.rb +2 -0
- data/spec/factories/hd/modality_descriptions.rb +2 -0
- data/spec/factories/hd/patient_statistics.rb +2 -0
- data/spec/factories/hd/patients.rb +2 -0
- data/spec/factories/hd/preference_sets.rb +2 -0
- data/spec/factories/hd/profiles.rb +2 -0
- data/spec/factories/hd/schedule_definitions.rb +2 -0
- data/spec/factories/hd/sessions.rb +2 -0
- data/spec/factories/hd/slots.rb +2 -0
- data/spec/factories/hd/station_locations.rb +2 -0
- data/spec/factories/hd/stations.rb +2 -0
- data/spec/factories/hospitals/centres.rb +2 -0
- data/spec/factories/hospitals/units.rb +2 -0
- data/spec/factories/hospitals/wards.rb +2 -0
- data/spec/factories/letters/archives.rb +2 -0
- data/spec/factories/letters/contact_descriptions.rb +2 -0
- data/spec/factories/letters/contacts.rb +2 -0
- data/spec/factories/letters/descriptions.rb +2 -0
- data/spec/factories/letters/electronic_receipts.rb +2 -0
- data/spec/factories/letters/letterheads.rb +2 -0
- data/spec/factories/letters/letters.rb +2 -0
- data/spec/factories/letters/patients.rb +2 -0
- data/spec/factories/letters/primary_care_physicians.rb +2 -0
- data/spec/factories/letters/recipients.rb +2 -0
- data/spec/factories/low_clearance/modality_descriptions.rb +2 -0
- data/spec/factories/low_clearance/patients.rb +2 -0
- data/spec/factories/low_clearance/profiles.rb +2 -0
- data/spec/factories/medications/medication_route.rb +2 -0
- data/spec/factories/medications/prescription.rb +2 -0
- data/spec/factories/medications/prescription_terminations.rb +2 -0
- data/spec/factories/medications/prescription_version.rb +2 -0
- data/spec/factories/messaging/internal/authors.rb +2 -0
- data/spec/factories/messaging/internal/messages.rb +2 -0
- data/spec/factories/messaging/internal/receipts.rb +2 -0
- data/spec/factories/messaging/internal/recipients.rb +2 -0
- data/spec/factories/messaging/patients.rb +2 -0
- data/spec/factories/modalities/modalities.rb +2 -0
- data/spec/factories/modalities/modality_descriptions.rb +2 -0
- data/spec/factories/modalities/modality_reasons.rb +2 -0
- data/spec/factories/pathology/consultant.rb +2 -0
- data/spec/factories/pathology/lab.rb +2 -0
- data/spec/factories/pathology/measurement_units.rb +2 -0
- data/spec/factories/pathology/observation_descriptions.rb +6 -0
- data/spec/factories/pathology/observation_requests.rb +3 -1
- data/spec/factories/pathology/observations.rb +2 -0
- data/spec/factories/pathology/patients.rb +2 -0
- data/spec/factories/pathology/request_descriptions.rb +2 -0
- data/spec/factories/pathology/requests/drug_category.rb +2 -0
- data/spec/factories/pathology/requests/global_rule.rb +2 -0
- data/spec/factories/pathology/requests/global_rule_set.rb +2 -0
- data/spec/factories/pathology/requests/patient_rule.rb +2 -0
- data/spec/factories/pathology/requests/request.rb +2 -0
- data/spec/factories/patients/alerts.rb +2 -0
- data/spec/factories/patients/bookmarks.rb +2 -0
- data/spec/factories/patients/ethnicities.rb +2 -0
- data/spec/factories/patients/languages.rb +2 -0
- data/spec/factories/patients/patients.rb +2 -0
- data/spec/factories/patients/practice_memberships.rb +2 -0
- data/spec/factories/patients/practices.rb +2 -0
- data/spec/factories/patients/primary_care_physicians.rb +2 -0
- data/spec/factories/patients/religions.rb +2 -0
- data/spec/factories/patients/users.rb +2 -0
- data/spec/factories/pd/assessments.rb +2 -0
- data/spec/factories/pd/bag_types.rb +2 -0
- data/spec/factories/pd/episode_types.rb +2 -0
- data/spec/factories/pd/exit_site_infections.rb +2 -0
- data/spec/factories/pd/fluid_descriptions.rb +2 -0
- data/spec/factories/pd/infection_organisms.rb +2 -0
- data/spec/factories/pd/modality_descriptions.rb +2 -0
- data/spec/factories/pd/organism_codes.rb +2 -0
- data/spec/factories/pd/patients.rb +2 -0
- data/spec/factories/pd/pd_regimes.rb +2 -0
- data/spec/factories/pd/peritonitis_episode_type_descriptions.rb +2 -0
- data/spec/factories/pd/peritonitis_episodes.rb +2 -0
- data/spec/factories/pd/pet_adequacies.rb +2 -0
- data/spec/factories/pd/regime_bags.rb +2 -0
- data/spec/factories/pd/systems.rb +2 -0
- data/spec/factories/pd/training_sessions.rb +2 -0
- data/spec/factories/pd/training_sites.rb +2 -0
- data/spec/factories/pd/training_types.rb +2 -0
- data/spec/factories/problems/problems.rb +2 -0
- data/spec/factories/renal/aki_alert_actions.rb +2 -0
- data/spec/factories/renal/aki_alerts.rb +2 -0
- data/spec/factories/renal/patients.rb +2 -0
- data/spec/factories/renal/prd_description.rb +2 -0
- data/spec/factories/renal/profiles.rb +2 -0
- data/spec/factories/reporting/audits.rb +2 -0
- data/spec/factories/research/studies.rb +2 -0
- data/spec/factories/research/study_participants.rb +2 -0
- data/spec/factories/shared/accountable.rb +2 -0
- data/spec/factories/snippets/snippets.rb +2 -0
- data/spec/factories/snippets/users.rb +2 -0
- data/spec/factories/system/addresses.rb +6 -0
- data/spec/factories/system/countries.rb +2 -0
- data/spec/factories/system/roles.rb +2 -0
- data/spec/factories/system/templates.rb +2 -0
- data/spec/factories/system/users.rb +2 -0
- data/spec/factories/transplants/donations.rb +2 -0
- data/spec/factories/transplants/donor_stage.rb +2 -0
- data/spec/factories/transplants/donor_stage_position.rb +2 -0
- data/spec/factories/transplants/donor_stage_status.rb +2 -0
- data/spec/factories/transplants/live_donor_modality_description.rb +2 -0
- data/spec/factories/transplants/modality_descriptions.rb +2 -0
- data/spec/factories/transplants/patients.rb +2 -0
- data/spec/factories/transplants/recipient_followups.rb +2 -0
- data/spec/factories/transplants/recipient_operations.rb +2 -0
- data/spec/factories/transplants/registration_status_descriptions.rb +2 -0
- data/spec/factories/transplants/registration_statuses.rb +2 -0
- data/spec/factories/transplants/registrations.rb +2 -0
- data/spec/factories/virology/vaccinations.rb +2 -0
- data/spec/support/capybara.rb +2 -0
- data/spec/support/capybara_helper.rb +2 -0
- data/spec/support/database_functions_spec_helper.rb +2 -0
- data/spec/support/date_helpers.rb +2 -0
- data/spec/support/devise_spec_helper.rb +2 -0
- data/spec/support/drugs_spec_helper.rb +2 -0
- data/spec/support/factory_bot.rb +2 -0
- data/spec/support/json_helpers.rb +2 -0
- data/spec/support/letters_spec_helper.rb +9 -0
- data/spec/support/login_macros.rb +2 -0
- data/spec/support/matchers/document.rb +2 -0
- data/spec/support/matchers/validate_timeliness_of.rb +2 -0
- data/spec/support/pathology_spec_helper.rb +2 -0
- data/spec/support/patients_spec_helper.rb +2 -0
- data/spec/support/poltergeist.rb +2 -0
- data/spec/support/pundit_matcher.rb +2 -0
- data/spec/support/roles_spec_helper.rb +2 -0
- data/spec/support/select2_spec_helper.rb +2 -0
- data/spec/support/select_date_spec_helper.rb +2 -0
- data/spec/support/shared_contexts/a_global_rule_set.rb +2 -0
- data/spec/support/shared_examples/accountable_examples.rb +2 -0
- data/spec/support/shared_examples/paranoia_examples.rb +2 -1
- data/spec/support/shared_examples/supersedable_examples.rb +2 -0
- data/spec/support/translations.rb +2 -0
- data/spec/support/travel.rb +2 -0
- data/spec/support/webmock.rb +2 -0
- metadata +39 -6
- data/app/presenters/renalware/pathology/historical_observation_results/html_table_view.rb +0 -64
- data/app/presenters/renalware/pathology/historical_observation_results/presenter.rb +0 -86
- data/app/presenters/renalware/pathology/recent_observation_results/html_table_view.rb +0 -39
- data/app/presenters/renalware/pathology/recent_observation_results/presenter.rb +0 -107
@@ -17,4 +17,10 @@ tr
|
|
17
17
|
td= patient.transport_summary
|
18
18
|
td= patient.current_observation_set.hgb_result
|
19
19
|
td= l(patient.current_observation_set.hgb_observed_at)
|
20
|
+
td.show-for-xlarge-up= patient.current_observation_set.phos_result
|
21
|
+
td.show-for-xlarge-up= l(patient.current_observation_set.phos_observed_at)
|
22
|
+
td.show-for-xlarge-up= patient.current_observation_set.pth_result
|
23
|
+
td.show-for-xlarge-up= l(patient.current_observation_set.pth_observed_at)
|
24
|
+
td.show-for-xlarge-up= patient.current_observation_set.urr_result
|
25
|
+
td.show-for-xlarge-up= l(patient.current_observation_set.urr_observed_at)
|
20
26
|
td.actions= link_to t(".view"), view_proc.call(patient)
|
@@ -16,6 +16,12 @@ table#patients.mdm-patients.columns
|
|
16
16
|
th.at-least.col-width-small= t(".transport_type")
|
17
17
|
th.col-width-tiny= sort_link(path, :hgb, t(".hgb"))
|
18
18
|
th.col-width-date= sort_link(path, :hgb_date, t(".hgb_date"))
|
19
|
+
th.show-for-xlarge-up.col-width-tiny= sort_link(path, :phos, t(".phos"))
|
20
|
+
th.show-for-xlarge-up.col-width-date= sort_link(path, :phos_date, t(".phos_date"))
|
21
|
+
th.show-for-xlarge-up.col-width-tiny= sort_link(path, :pth, t(".pth"))
|
22
|
+
th.show-for-xlarge-up.col-width-date= sort_link(path, :pth_date, t(".pth_date"))
|
23
|
+
th.show-for-xlarge-up.col-width-tiny= sort_link(path, :urr, t(".urr"))
|
24
|
+
th.show-for-xlarge-up.col-width-date= sort_link(path, :urr_date, t(".urr_date"))
|
19
25
|
th.col-width-tiny
|
20
26
|
tbody
|
21
27
|
= render partial: "patient",
|
@@ -1,39 +1,41 @@
|
|
1
|
+
- content_for(:css) do
|
2
|
+
= stylesheet_link_tag "renalware/patient_pages", media: :all
|
3
|
+
|
1
4
|
- content_for(:header) do
|
2
5
|
= render "renalware/patients/header", patient: current_patient
|
3
6
|
|
4
7
|
- generate_page_title(local_assigns: local_assigns,
|
5
8
|
patient: current_patient)
|
6
9
|
|
7
|
-
.patient-
|
8
|
-
.
|
9
|
-
|
10
|
-
= render "renalware/patients/mini_profile", patient: current_patient
|
11
|
-
= render "renalware/clinical/header", patient: current_patient
|
12
|
-
= render "renalware/patients/alerts/list", patient: current_patient
|
13
|
-
.row.collapse
|
14
|
-
- if local_assigns[:title].present?
|
15
|
-
ul.page-heading.columns.small-12
|
16
|
-
li
|
17
|
-
h1
|
18
|
-
= breadcrumbs_and_title(breadcrumbs: local_assigns[:breadcrumbs],
|
19
|
-
title: local_assigns[:title])
|
20
|
-
li.page-actions
|
21
|
-
/ Output any page-level actions
|
22
|
-
= yield(:actions)
|
10
|
+
nav.patient-side-nav.full-screenable
|
11
|
+
.layout-wrapper
|
12
|
+
= render "renalware/patients/side_menu", patient: current_patient
|
23
13
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
14
|
+
.patient-content.full-screenable
|
15
|
+
.layout-wrapper
|
16
|
+
= render "renalware/patients/mini_profile", patient: current_patient
|
17
|
+
= render "renalware/clinical/header", patient: current_patient
|
18
|
+
= render "renalware/patients/alerts/list", patient: current_patient
|
19
|
+
.row.collapse
|
20
|
+
- if local_assigns[:title].present?
|
21
|
+
ul.page-heading.columns.small-12
|
22
|
+
li
|
23
|
+
h1
|
24
|
+
= breadcrumbs_and_title(breadcrumbs: local_assigns[:breadcrumbs],
|
25
|
+
title: local_assigns[:title])
|
26
|
+
li.page-actions
|
27
|
+
/ Output any page-level actions
|
28
|
+
= yield(:actions)
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
= yield(:below_content)
|
30
|
+
- if content_for?(:page_navigation)
|
31
|
+
.page-navigation= yield(:page_navigation)
|
32
|
+
- else
|
33
|
+
- unless local_assigns[:skip_top_navigation].present?
|
34
|
+
- partial = local_assigns[:navigation_partial] || "navigation"
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
/ Be sure to pass on any locals passed to us, along with the patient
|
37
|
+
/ if not already provided
|
38
|
+
= render_if_exists partial, local_assigns.reverse_merge!(patient: current_patient)
|
39
|
+
.row
|
40
|
+
= yield
|
41
|
+
= yield(:below_content)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// We have just 'created' a Letter Completion resource on the server
|
2
|
+
// (in other words we have updated the letter state to Completed!) and now we
|
3
|
+
// need to refresh the view the user was on. This could be any page
|
4
|
+
// were the letter is listed or displayed. So look for a URL stored
|
5
|
+
// somewhere on the page in a data attribute and if found make an AJAX call
|
6
|
+
// which will probably reload e.g. a letters table or something like that.
|
7
|
+
url = $(".reveal-modal").data("refresh-url");
|
8
|
+
if(url) { $.getScript(url); }
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.modal
|
2
|
+
.modal__header
|
3
|
+
h2= "Was printing successful?"
|
4
|
+
/= render "renalware/shared/modal_close_link"
|
5
|
+
.modal__body
|
6
|
+
dl.dl-horizontal
|
7
|
+
dt Patient
|
8
|
+
dd= letter.patient.to_s
|
9
|
+
dt Letter
|
10
|
+
dd= letter.description
|
11
|
+
dt Date
|
12
|
+
dd= l(letter.issued_on)
|
13
|
+
dt Author
|
14
|
+
dd= letter.author
|
15
|
+
br
|
16
|
+
.modal__footer
|
17
|
+
= link_to "No - leave in the Print Queue",
|
18
|
+
"#",
|
19
|
+
class: "button secondary reveal-modal-close",
|
20
|
+
"aria-label" => "Close"
|
21
|
+
|
|
22
|
+
= link_to "Yes - remove from the Print Queue",
|
23
|
+
patient_letters_letter_completed_path(letter.patient, letter),
|
24
|
+
method: :post,
|
25
|
+
remote: true,
|
26
|
+
data: { disable_with: "Updating..." },
|
27
|
+
class: "button primary right"
|
@@ -1,14 +1,28 @@
|
|
1
1
|
tr(class=letter.state.dasherize)
|
2
2
|
td.noprint
|
3
|
+
- if letter.approved?
|
4
|
+
/ The Print link will:
|
5
|
+
/ - open a new tab with the PDF, ready to print
|
6
|
+
/ - display a modal on this page (ready for when the user returns here after
|
7
|
+
/ printing) that asks if they want to mark the letters as printed or not.
|
8
|
+
/ See letters.js where it binds to .printing-pdf.
|
9
|
+
/ See also completed letters controller and the comments in
|
10
|
+
/ ./show.js.erb and and ./show.html.slim
|
11
|
+
= link_to patient_letters_letter_print_path(letter),
|
12
|
+
target: "_blank",
|
13
|
+
class: "printing-pdf button secondary compact",
|
14
|
+
data: { \
|
15
|
+
"modal-url" => new_patient_letters_letter_completed_path(letter.patient, letter) \
|
16
|
+
} do
|
17
|
+
i.fa.fa-print
|
18
|
+
| Print
|
19
|
+
|
|
3
20
|
= link_to "Toggle",
|
4
21
|
"#quick-preview-#{letter.id}",
|
5
22
|
data: { behaviour: "toggler" }
|
6
23
|
= pipe_separator
|
7
24
|
= link_to "View", patient_letters_letter_path(letter.patient, letter)
|
8
|
-
|
9
|
-
= link_to "Print (PDF)".html_safe,
|
10
|
-
patient_letters_letter_print_path(letter),
|
11
|
-
target: "print"
|
25
|
+
|
12
26
|
td.col-width-medium-with-ellipsis= letter.type
|
13
27
|
td.state
|
14
28
|
span= letter.state_description
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.letters-table
|
2
|
+
table.report.letters
|
3
|
+
thead
|
4
|
+
tr
|
5
|
+
th.noprint.col-width-medium
|
6
|
+
th Type
|
7
|
+
th= sort_link([:renalware, q], :type, "State")
|
8
|
+
th.col-width-medium= sort_link([:renalware, q], :patient_family_name, "Patient")
|
9
|
+
th.col-width-nhs-no= sort_link([:renalware, q], :patient_nhs_number, "NHS No")
|
10
|
+
th= sort_link([:renalware, q], :enclosures, "Enc.")
|
11
|
+
th.col-width-date = sort_link([:renalware, q], :issued_on, "Date", default_order: :desc)
|
12
|
+
th= sort_link([:renalware, q], :author_family_name, "Author")
|
13
|
+
th= sort_link([:renalware, q], :created_by_family_name, "Typist")
|
14
|
+
th.col-width-small Recipient
|
15
|
+
th Description
|
16
|
+
tbody
|
17
|
+
= render partial: "letter", collection: letters
|
18
|
+
|
19
|
+
= paginate letters
|
@@ -10,7 +10,7 @@
|
|
10
10
|
.small-6.medium-1.large-1.columns
|
11
11
|
= f.input :enclosures_present, as: :select, label: "Enclosure"
|
12
12
|
.small-6.medium-3.large-2.columns
|
13
|
-
= f.input :state_eq, collection:
|
13
|
+
= f.input :state_eq, collection: state_options_for_receptionists, label: "State"
|
14
14
|
.small-6.medium-3.large-2.columns
|
15
15
|
= f.input :author_id_eq, as: :user_picker, collection: authors, label: "Author"
|
16
16
|
.small-6.medium-3.large-2.columns
|
@@ -20,29 +20,18 @@
|
|
20
20
|
span= " or "
|
21
21
|
= link_to t("helpers.reset"), letters_list_path
|
22
22
|
|
23
|
-
.row
|
24
|
-
.columns
|
25
|
-
= button_to "/", class: "button secondary" do
|
26
|
-
i.fa.fa-print
|
27
|
-
| Print All
|
28
|
-
|
29
23
|
.row
|
30
24
|
.columns.small-12
|
31
|
-
table
|
32
|
-
thead
|
33
|
-
tr
|
34
|
-
th.noprint
|
35
|
-
th Type
|
36
|
-
th= sort_link([:renalware, q], :type, "State")
|
37
|
-
th.col-width-medium= sort_link([:renalware, q], :patient_family_name, "Patient")
|
38
|
-
th.col-width-nhs-no= sort_link([:renalware, q], :patient_nhs_number, "NHS No")
|
39
|
-
th= sort_link([:renalware, q], :enclosures, "Enc.")
|
40
|
-
th.col-width-date = sort_link([:renalware, q], :issued_on, "Date", default_order: :desc)
|
41
|
-
th= sort_link([:renalware, q], :author_family_name, "Author")
|
42
|
-
th= sort_link([:renalware, q], :created_by_family_name, "Typist")
|
43
|
-
th.col-width-small Recipient
|
44
|
-
th Description
|
45
|
-
tbody
|
46
|
-
= render partial: "letter", collection: letters
|
25
|
+
= render "table", letters: letters, q: q
|
47
26
|
|
48
|
-
|
27
|
+
/ The modal dialog container for the dialog which will ask the user
|
28
|
+
/ if they want to mark the letter as printed. We load this dialog via ajax.
|
29
|
+
/ See letters/completed_letters/new.html.slim for th dialog content.
|
30
|
+
/ See also
|
31
|
+
/ - letters/completed_letters/create.js.erb
|
32
|
+
/ - ./show.js.erb
|
33
|
+
/ - letters.js
|
34
|
+
/ for the complete works. Using ujs for these sort of dialog -> -> post -> page refresh
|
35
|
+
/ cycles is a bit complex and we could move to using something like stimulus
|
36
|
+
/ to keep thing a bit simpler
|
37
|
+
#letter-print-modal.reveal-modal.small(data-reveal data-refresh-url=request.original_fullpath)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// After a user has printed a letter and chosen Yes to
|
2
|
+
// mark the Letter as printed, we will have made a POST to completed_letters
|
3
|
+
// to set the letter status and completed_letters/create.js.erb will then load.
|
4
|
+
// It looks for a URL to use to refresh the letter page content (see that partial)
|
5
|
+
// and makes an AJAX get to that URL. This is the template for that AJX get call.
|
6
|
+
// We close the print confirmation dialog and and refresh the letter table content.
|
7
|
+
$(".reveal-modal").foundation('reveal', 'close');
|
8
|
+
$(".letters-table").replaceWith("<%= escape_javascript(
|
9
|
+
render "table", letters: letters, q: q) %>");
|
10
|
+
// We add this next class for testing so we know the table as refreshed
|
11
|
+
$(".letters-table").addClass("ajax-refreshed");
|
@@ -1,18 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
- cache(summary_part) do
|
2
|
+
.summary-part--prescriptions
|
3
|
+
#current-prescriptions
|
4
|
+
article
|
5
|
+
header
|
6
|
+
h2
|
7
|
+
= link_to "Current Prescriptions (#{summary_part.current_prescriptions.length})",
|
8
|
+
patient_prescriptions_path(summary_part.patient)
|
8
9
|
|
9
|
-
|
10
|
-
|
10
|
+
= link_to patient_prescriptions_path(summary_part.patient), class: "button" do
|
11
|
+
| Add
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
ul.no-bullet
|
14
|
+
- summary_part.current_prescriptions.each do |prescription|
|
15
|
+
li class="drug-#{drug_types_colour_tag(prescription.drug_types)}"
|
16
|
+
= "#{prescription.drug.name}, "
|
17
|
+
= "#{prescription.dose}, "
|
18
|
+
= "#{prescription.medication_route.code} #{prescription.frequency} - "
|
19
|
+
= l(prescription.prescribed_on)
|
@@ -1,14 +1,11 @@
|
|
1
1
|
= within_patient_layout title: "Current Pathology Results",
|
2
2
|
navigation_partial: "renalware/pathology/navigation" do
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
td= l(observation.observed_at&.to_date)
|
13
|
-
td= observation.result
|
14
|
-
th= observation.description
|
3
|
+
- observation_set.each_display_group do |observations, group_number|
|
4
|
+
.small-3.columns.end
|
5
|
+
table.current-observations.columns.auto-layout.last
|
6
|
+
tbody
|
7
|
+
- observations.each do |observation|
|
8
|
+
tr
|
9
|
+
th= observation.description
|
10
|
+
td= observation.result
|
11
|
+
td= l(observation.observed_at&.to_date)
|
@@ -1,31 +1,34 @@
|
|
1
1
|
- content_for(:header) do
|
2
2
|
= render "renalware/patients/header", patient: current_patient
|
3
3
|
|
4
|
+
- content_for(:css) do
|
5
|
+
= stylesheet_link_tag "renalware/patients", media: :all
|
6
|
+
|
4
7
|
- title = breadcrumbs_and_title(breadcrumbs: local_assigns[:breadcrumbs],
|
5
8
|
title: local_assigns[:title])
|
9
|
+
|
6
10
|
- patient_page_title(title: title, patient: current_patient)
|
7
11
|
|
8
|
-
.patient-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
= render "renalware/patients/side_menu", patient: current_patient
|
12
|
+
nav.patient-side-nav
|
13
|
+
= render "renalware/patients/side_menu", patient: current_patient
|
14
|
+
|
15
|
+
.patient-content
|
16
|
+
= render "renalware/patients/mini_profile", patient: current_patient
|
17
|
+
.row
|
18
|
+
.page-heading.columns.small-12
|
19
|
+
h1= title
|
20
|
+
.actions
|
21
|
+
/ Output any page-level actions
|
22
|
+
= yield(:actions)
|
23
|
+
|
24
|
+
- if content_for?(:page_navigation)
|
25
|
+
.page-navigation= yield(:page_navigation)
|
26
|
+
- else
|
27
|
+
- unless local_assigns[:skip_top_navigation].present?
|
28
|
+
- partial = local_assigns[:navigation_partial] || "navigation"
|
29
|
+
|
30
|
+
/ Be sure to pass on any locals passed to us,
|
31
|
+
/ along with the patient if not already provided
|
32
|
+
= render_if_exists partial, local_assigns.reverse_merge!(patient: current_patient)
|
33
|
+
|
34
|
+
= yield
|
@@ -32,7 +32,7 @@ li.link.action
|
|
32
32
|
|
33
33
|
- if policy(patient).debug?
|
34
34
|
li.link.action
|
35
|
-
= link_to "Debug: UKRDC XML", api_ukrdc_patient_path(patient)
|
35
|
+
= link_to "Debug: UKRDC XML", api_ukrdc_patient_path(patient, changes_since: "2000-01-01")
|
36
36
|
|
37
37
|
- cache do
|
38
38
|
= render "renalware/admissions/requests/modal_dialog_placeholder"
|