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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12743efe3022797cbd71c4fb23984b44a284402082931ea9bbe3ab5a1f79e213
|
4
|
+
data.tar.gz: d32c248cd4e9deeea71825ffa7b1861799ed7dfb898907f3829ddf9774b34e19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7bfa6f1841c58d694eaf9c1d57b82c2b4d3f457e4e7459b77c78804512811fcee100547ea07ba655f03d2b00ae108d6c823aad37e2d35240b3b6d6a94bee74f
|
7
|
+
data.tar.gz: 96257b76518db3e49489cd6784faa93fb3357fb160a4f8b8da5925a583687a208029265293277465a1765849d4d65c19d3c186cc771365a0b6286e53b3e29b11
|
data/README.md
CHANGED
@@ -15,6 +15,15 @@ Renalware.Letters = (function() {
|
|
15
15
|
$("#letter-form").change(hideOrShowContactSelector);
|
16
16
|
}
|
17
17
|
|
18
|
+
var bindOnLetterAboutToPrint = function() {
|
19
|
+
$(document).on("click", "table.letters .printing-pdf", function(e) {
|
20
|
+
var modal = $("#letter-print-modal");
|
21
|
+
url = $(this).data("modal-url");
|
22
|
+
modal.load(url).foundation('reveal', 'open');
|
23
|
+
true;
|
24
|
+
});
|
25
|
+
}
|
26
|
+
|
18
27
|
var bindOnSalutationChange = function() {
|
19
28
|
|
20
29
|
$("#letter-form").on("click", ".has_salutation", function(e) {
|
@@ -92,6 +101,7 @@ Renalware.Letters = (function() {
|
|
92
101
|
initNewContactAsMainRecipient();
|
93
102
|
initNewContactAsCC();
|
94
103
|
initInsertEventNotesIntoTextEditor();
|
104
|
+
bindOnLetterAboutToPrint();
|
95
105
|
}
|
96
106
|
};
|
97
107
|
})();
|
@@ -19,20 +19,41 @@ table#observations {
|
|
19
19
|
background-color: $white;
|
20
20
|
}
|
21
21
|
|
22
|
-
td {
|
22
|
+
td, th {
|
23
23
|
border: 1px solid #ddd;
|
24
24
|
font-size: 0.8rem;
|
25
25
|
}
|
26
26
|
|
27
27
|
&.transposed {
|
28
|
-
tr {
|
29
|
-
|
28
|
+
tr {
|
29
|
+
display: block; float: left;
|
30
|
+
}
|
31
|
+
th, td {
|
32
|
+
display: block;
|
33
|
+
}
|
30
34
|
}
|
31
35
|
}
|
32
36
|
|
33
37
|
.current-observations {
|
34
38
|
float: left;
|
35
39
|
margin-right: 1em;
|
40
|
+
|
41
|
+
tbody {
|
42
|
+
td, th {
|
43
|
+
font-size: .9rem;
|
44
|
+
}
|
45
|
+
|
46
|
+
th {
|
47
|
+
&:first-child {
|
48
|
+
width: 4rem;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
td {
|
52
|
+
&:last-child {
|
53
|
+
width: 8rem;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
36
57
|
}
|
37
58
|
|
38
59
|
#observation-requests {
|
@@ -1,19 +1,4 @@
|
|
1
1
|
html {
|
2
|
-
overflow: auto;
|
3
|
-
|
4
|
-
body {
|
5
|
-
overflow: hidden;
|
6
|
-
|
7
|
-
main {
|
8
|
-
.main-content {
|
9
|
-
width: 100%;
|
10
|
-
height: 100%;
|
11
|
-
overflow-y: auto;
|
12
|
-
position: absolute;
|
13
|
-
padding-bottom: 20rem;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
17
2
|
body.overflow {
|
18
3
|
overflow: auto;
|
19
4
|
}
|
@@ -90,6 +75,9 @@ section.display {
|
|
90
75
|
}
|
91
76
|
|
92
77
|
.non-patient-page {
|
78
|
+
padding-top: 1rem;
|
79
|
+
padding-bottom: 3rem;
|
80
|
+
|
93
81
|
.page-heading {
|
94
82
|
margin-bottom: 0.5rem;
|
95
83
|
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// CSS used only in the patient layout
|
2
|
+
html {
|
3
|
+
body {
|
4
|
+
display: flex;
|
5
|
+
flex-direction: column;
|
6
|
+
|
7
|
+
> header {
|
8
|
+
flex: 0 0 auto;
|
9
|
+
}
|
10
|
+
|
11
|
+
main {
|
12
|
+
flex: 1 1 auto;
|
13
|
+
display: flex;
|
14
|
+
height: 100%;
|
15
|
+
min-height: 0;
|
16
|
+
width: 100%;
|
17
|
+
position: relative;
|
18
|
+
|
19
|
+
.patient-side-nav {
|
20
|
+
overflow-y: auto;
|
21
|
+
min-height: 100%;
|
22
|
+
height: 100%;
|
23
|
+
padding-bottom: 0;
|
24
|
+
}
|
25
|
+
|
26
|
+
.patient-content {
|
27
|
+
}
|
28
|
+
|
29
|
+
.layout-wrapper {
|
30
|
+
padding-bottom: 3rem;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
&.collapse-patient-menu .patient-side-nav {
|
35
|
+
margin-left: -15rem;
|
36
|
+
left: 0;
|
37
|
+
}
|
38
|
+
|
39
|
+
.full-screenable {
|
40
|
+
transition: margin .2s ease 0s;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -19,7 +19,7 @@ module Renalware
|
|
19
19
|
def patient_presenter
|
20
20
|
patient = Renalware::Patient.find_by!(secure_id: params[:id])
|
21
21
|
authorize patient
|
22
|
-
Renalware::UKRDC::PatientPresenter.new(patient)
|
22
|
+
Renalware::UKRDC::PatientPresenter.new(patient, changes_since: params[:changes_since])
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require_dependency "renalware/patients"
|
2
|
+
require_dependency "renalware/api"
|
3
|
+
|
4
|
+
module Renalware
|
5
|
+
module API
|
6
|
+
module V1
|
7
|
+
module Medications
|
8
|
+
class PrescriptionsController < TokenAuthenticatedApiController
|
9
|
+
def index
|
10
|
+
render locals: {
|
11
|
+
patient: patient,
|
12
|
+
prescriptions: current_prescriptions_presenter
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def current_prescriptions_presenter
|
19
|
+
CollectionPresenter.new(
|
20
|
+
current_prescriptions,
|
21
|
+
Renalware::Medications::PrescriptionPresenter
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def current_prescriptions
|
26
|
+
Renalware::Medications::PrescriptionsQuery.new(
|
27
|
+
relation: patient.prescriptions.current
|
28
|
+
).call
|
29
|
+
end
|
30
|
+
|
31
|
+
def patient
|
32
|
+
Patient.find_by!(secure_id: params[:patient_id])
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -53,10 +53,8 @@ module Renalware
|
|
53
53
|
def update
|
54
54
|
@drug = Drug.find(params[:id])
|
55
55
|
authorize @drug
|
56
|
-
|
57
56
|
if @drug.update(drug_params)
|
58
|
-
redirect_to drugs_drugs_path,
|
59
|
-
notice: t(".success", model_name: "drug")
|
57
|
+
redirect_to drugs_drugs_path, notice: t(".success", model_name: "drug")
|
60
58
|
else
|
61
59
|
flash.now[:error] = t(".failed", model_name: "drug")
|
62
60
|
render :edit
|
@@ -65,9 +63,7 @@ module Renalware
|
|
65
63
|
|
66
64
|
def destroy
|
67
65
|
authorize Drug.destroy(params[:id])
|
68
|
-
|
69
|
-
redirect_to drugs_drugs_path,
|
70
|
-
notice: t(".success", model_name: "drug")
|
66
|
+
redirect_to drugs_drugs_path, notice: t(".success", model_name: "drug")
|
71
67
|
end
|
72
68
|
|
73
69
|
private
|
@@ -5,12 +5,30 @@ module Renalware
|
|
5
5
|
class CompletedLettersController < Letters::BaseController
|
6
6
|
before_action :load_patient
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
# HTML GET for insertion into modal dialog
|
9
|
+
def new
|
10
|
+
render layout: false, locals: {
|
11
|
+
letter: letter
|
12
|
+
}
|
13
|
+
end
|
10
14
|
|
15
|
+
def create
|
11
16
|
CompleteLetter.build(letter).call(by: current_user)
|
12
17
|
|
13
|
-
|
18
|
+
respond_to do |format|
|
19
|
+
format.html do
|
20
|
+
redirect_to patient_letters_letter_path(@patient, letter), notice: t(".success")
|
21
|
+
end
|
22
|
+
format.js do
|
23
|
+
render locals: { letter: letter }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def letter
|
31
|
+
@letter ||= @patient.letters.approved.find(params[:letter_id])
|
14
32
|
end
|
15
33
|
end
|
16
34
|
end
|
@@ -9,12 +9,20 @@ module Renalware
|
|
9
9
|
query = LetterQuery.new(q: params[:q])
|
10
10
|
letters = find_and_authorize_letters(query)
|
11
11
|
|
12
|
-
|
12
|
+
locals = {
|
13
13
|
letters: letters,
|
14
14
|
authors: User.author.ordered,
|
15
15
|
typists: User.ordered,
|
16
16
|
q: query.search
|
17
17
|
}
|
18
|
+
respond_to do |format|
|
19
|
+
format.html do
|
20
|
+
render locals: locals
|
21
|
+
end
|
22
|
+
format.js do
|
23
|
+
render locals: locals, layout: false
|
24
|
+
end
|
25
|
+
end
|
18
26
|
end
|
19
27
|
|
20
28
|
private
|
@@ -9,7 +9,7 @@ module Renalware
|
|
9
9
|
def index
|
10
10
|
observations_table = CreateObservationsGroupedByDateTable.new(
|
11
11
|
patient: patient,
|
12
|
-
observation_descriptions:
|
12
|
+
observation_descriptions: ObservationDescription.in_display_order,
|
13
13
|
page: page || 1,
|
14
14
|
per_page: 25
|
15
15
|
).call
|
@@ -9,7 +9,7 @@ module Renalware
|
|
9
9
|
def index
|
10
10
|
observations_table = CreateObservationsGroupedByDateTable.new(
|
11
11
|
patient: patient,
|
12
|
-
observation_descriptions:
|
12
|
+
observation_descriptions: ObservationDescription.in_display_order,
|
13
13
|
page: page || 1,
|
14
14
|
per_page: per_page || 100
|
15
15
|
).call
|
@@ -40,5 +40,12 @@ module Renalware
|
|
40
40
|
[label, state]
|
41
41
|
end
|
42
42
|
end
|
43
|
+
|
44
|
+
def state_options_for_receptionists
|
45
|
+
Letters::Letter.states.map do |state|
|
46
|
+
label = I18n.t(state.to_sym, scope: "enums.letter.for_receptionists.state")
|
47
|
+
[label, state]
|
48
|
+
end
|
49
|
+
end
|
43
50
|
end
|
44
51
|
end
|
@@ -22,7 +22,7 @@ module Renalware
|
|
22
22
|
# = sort_link(<url>, :cre_observed_at, "CRE date")
|
23
23
|
#
|
24
24
|
def self.extended(base)
|
25
|
-
%i(hgb ure cre).each do |code|
|
25
|
+
%i(hgb ure cre urr phos pth).each do |code|
|
26
26
|
base.ransacker(code) { pathology_result_sort_predicate(code) }
|
27
27
|
base.ransacker(:"#{code}_date") { pathology_date_sort_predicate(code) }
|
28
28
|
end
|
@@ -18,8 +18,9 @@ module Renalware
|
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
|
-
def remove_spaces_if_nhs_number
|
22
|
-
query.gsub
|
21
|
+
def remove_spaces_if_nhs_number(query)
|
22
|
+
return query.gsub(/\s+/, "") if nhs_number?(query)
|
23
|
+
query
|
23
24
|
end
|
24
25
|
|
25
26
|
# Returns true if the argument with spaces removed is a 10 digit number
|
@@ -29,15 +30,16 @@ module Renalware
|
|
29
30
|
index.present?
|
30
31
|
end
|
31
32
|
|
32
|
-
def sanitize_query
|
33
|
-
query
|
34
|
-
|
35
|
-
|
33
|
+
def sanitize_query(query)
|
34
|
+
query
|
35
|
+
.strip
|
36
|
+
.tr(",", " ")
|
37
|
+
.gsub(" ", " ")
|
36
38
|
end
|
37
39
|
|
38
40
|
def sql_and_params(query)
|
39
|
-
sanitize_query
|
40
|
-
remove_spaces_if_nhs_number
|
41
|
+
query = sanitize_query(query)
|
42
|
+
query = remove_spaces_if_nhs_number(query)
|
41
43
|
|
42
44
|
if query.include?(" ")
|
43
45
|
[full_name_sql, full_name_params(query)]
|
@@ -21,7 +21,7 @@ module Renalware
|
|
21
21
|
validates :reason_for_admission, presence: true
|
22
22
|
validates :admission_type, presence: true
|
23
23
|
|
24
|
-
belongs_to :patient
|
24
|
+
belongs_to :patient, touch: true
|
25
25
|
belongs_to :hospital_ward, class_name: "Hospitals::Ward"
|
26
26
|
belongs_to :summarised_by, class_name: "User"
|
27
27
|
belongs_to :modality_at_admission, class_name: "Modalities::Modality"
|
@@ -14,7 +14,7 @@ module Renalware
|
|
14
14
|
if: ->(consult){ consult.consult_site_id.blank? && consult.hospital_ward_id.blank? }
|
15
15
|
}
|
16
16
|
|
17
|
-
belongs_to :patient
|
17
|
+
belongs_to :patient, touch: true
|
18
18
|
belongs_to :consult_site, class_name: "Admissions::ConsultSite"
|
19
19
|
belongs_to :hospital_ward, class_name: "Hospitals::Ward"
|
20
20
|
belongs_to :seen_by, class_name: "User"
|
@@ -7,7 +7,7 @@ module Renalware
|
|
7
7
|
include PatientScope
|
8
8
|
include Accountable
|
9
9
|
|
10
|
-
belongs_to :patient, class_name: "Renalware::Clinical::Patient"
|
10
|
+
belongs_to :patient, class_name: "Renalware::Clinical::Patient", touch: true
|
11
11
|
belongs_to :assessor, class_name: "User", foreign_key: "assessor_id"
|
12
12
|
belongs_to :modality_description, class_name: "Modalities::Description"
|
13
13
|
|