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
data/spec/support/capybara.rb
CHANGED
data/spec/support/factory_bot.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module LettersSpecHelper
|
2
4
|
def build_letter(state: :draft, to:, patient:, **args)
|
3
5
|
trait = "#{state}_letter".to_sym
|
@@ -9,6 +11,11 @@ module LettersSpecHelper
|
|
9
11
|
attributes = build_main_recipient_attributes(to)
|
10
12
|
letter.main_recipient = build(:letter_recipient, :main, attributes)
|
11
13
|
|
14
|
+
# We shouldn't have to do this but for some reason in RSpec tests if the second test in a suite
|
15
|
+
# creates a letter it can end up with type of nil - something in Rails is not setting it.
|
16
|
+
# Hence this unpleasant hack:
|
17
|
+
letter.type ||= letter.class.sti_name
|
18
|
+
|
12
19
|
letter
|
13
20
|
end
|
14
21
|
|
@@ -18,6 +25,7 @@ module LettersSpecHelper
|
|
18
25
|
letter
|
19
26
|
end
|
20
27
|
|
28
|
+
# rubocop:disable Metrics/MethodLength
|
21
29
|
def build_main_recipient_attributes(to)
|
22
30
|
case to
|
23
31
|
when :patient
|
@@ -33,4 +41,5 @@ module LettersSpecHelper
|
|
33
41
|
}
|
34
42
|
end
|
35
43
|
end
|
44
|
+
# rubocop:enable Metrics/MethodLength
|
36
45
|
end
|
data/spec/support/poltergeist.rb
CHANGED
data/spec/support/travel.rb
CHANGED
data/spec/support/webmock.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renalware-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.rc13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -318,6 +318,20 @@ dependencies:
|
|
318
318
|
- - "~>"
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: 5.2.3
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: gpgme
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - "~>"
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: 2.0.16
|
328
|
+
type: :runtime
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - "~>"
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: 2.0.16
|
321
335
|
- !ruby/object:Gem::Dependency
|
322
336
|
name: hashdiff
|
323
337
|
requirement: !ruby/object:Gem::Requirement
|
@@ -997,6 +1011,7 @@ files:
|
|
997
1011
|
- app/assets/stylesheets/renalware/partials/_tooltip.scss
|
998
1012
|
- app/assets/stylesheets/renalware/partials/_typography.scss
|
999
1013
|
- app/assets/stylesheets/renalware/partials/_utilities.scss
|
1014
|
+
- app/assets/stylesheets/renalware/patient_pages.scss
|
1000
1015
|
- app/assets/stylesheets/renalware/pdf.scss
|
1001
1016
|
- app/assets/stylesheets/renalware/print/pathology_request_forms.scss
|
1002
1017
|
- app/assets/stylesheets/renalware/protocol_pdf.scss
|
@@ -1016,6 +1031,7 @@ files:
|
|
1016
1031
|
- app/controllers/renalware/admissions/requests_controller.rb
|
1017
1032
|
- app/controllers/renalware/api/token_authenticated_api_controller.rb
|
1018
1033
|
- app/controllers/renalware/api/ukrdc/patients_controller.rb
|
1034
|
+
- app/controllers/renalware/api/v1/medications/prescriptions_controller.rb
|
1019
1035
|
- app/controllers/renalware/api/v1/patients/patients_controller.rb
|
1020
1036
|
- app/controllers/renalware/application_controller.rb
|
1021
1037
|
- app/controllers/renalware/base_controller.rb
|
@@ -1688,6 +1704,11 @@ files:
|
|
1688
1704
|
- app/models/renalware/transplants/registration_status_description.rb
|
1689
1705
|
- app/models/renalware/transplants/registrations/wait_list_query.rb
|
1690
1706
|
- app/models/renalware/transplants/version.rb
|
1707
|
+
- app/models/renalware/ukrdc.rb
|
1708
|
+
- app/models/renalware/ukrdc/patients_query.rb
|
1709
|
+
- app/models/renalware/ukrdc/send_patient.rb
|
1710
|
+
- app/models/renalware/ukrdc/send_patients.rb
|
1711
|
+
- app/models/renalware/ukrdc/transmission_log.rb
|
1691
1712
|
- app/models/renalware/user.rb
|
1692
1713
|
- app/models/renalware/version.rb
|
1693
1714
|
- app/models/renalware/virology.rb
|
@@ -1821,15 +1842,11 @@ files:
|
|
1821
1842
|
- app/presenters/renalware/medications/treatable_presenter.rb
|
1822
1843
|
- app/presenters/renalware/messaging/internal/message_presenter.rb
|
1823
1844
|
- app/presenters/renalware/messaging/internal/receipt_presenter.rb
|
1824
|
-
- app/presenters/renalware/pathology/historical_observation_results/html_table_view.rb
|
1825
|
-
- app/presenters/renalware/pathology/historical_observation_results/presenter.rb
|
1826
1845
|
- app/presenters/renalware/pathology/observation_presenter.rb
|
1827
1846
|
- app/presenters/renalware/pathology/observation_set_presenter.rb
|
1828
1847
|
- app/presenters/renalware/pathology/observations_diff.rb
|
1829
1848
|
- app/presenters/renalware/pathology/observations_for_codes_presenter.rb
|
1830
1849
|
- app/presenters/renalware/pathology/patient_presenter.rb
|
1831
|
-
- app/presenters/renalware/pathology/recent_observation_results/html_table_view.rb
|
1832
|
-
- app/presenters/renalware/pathology/recent_observation_results/presenter.rb
|
1833
1850
|
- app/presenters/renalware/pathology/requests/global_rule_presenter.rb
|
1834
1851
|
- app/presenters/renalware/pathology/requests/global_rule_set_presenter.rb
|
1835
1852
|
- app/presenters/renalware/pathology/requests/patient_rule_presenter.rb
|
@@ -1971,6 +1988,7 @@ files:
|
|
1971
1988
|
- app/views/renalware/api/ukrdc/patients/observations/_standing_blood_pressure.xml.builder
|
1972
1989
|
- app/views/renalware/api/ukrdc/patients/observations/_weight.xml.builder
|
1973
1990
|
- app/views/renalware/api/ukrdc/patients/show.xml.builder
|
1991
|
+
- app/views/renalware/api/v1/medications/prescriptions/index.json.jbuilder
|
1974
1992
|
- app/views/renalware/api/v1/patients/patients/show.json.jbuilder
|
1975
1993
|
- app/views/renalware/base/_black_hole.html.slim
|
1976
1994
|
- app/views/renalware/base/_modality_missing_warning.html.slim
|
@@ -2173,6 +2191,8 @@ files:
|
|
2173
2191
|
- app/views/renalware/layouts/letter.pdf.slim
|
2174
2192
|
- app/views/renalware/layouts/pdf.pdf.slim
|
2175
2193
|
- app/views/renalware/letters/_summary_part.html.slim
|
2194
|
+
- app/views/renalware/letters/completed_letters/create.js.erb
|
2195
|
+
- app/views/renalware/letters/completed_letters/new.html.slim
|
2176
2196
|
- app/views/renalware/letters/contacts/_contact.html.slim
|
2177
2197
|
- app/views/renalware/letters/contacts/_edit.html.slim
|
2178
2198
|
- app/views/renalware/letters/contacts/_form.html.slim
|
@@ -2217,7 +2237,9 @@ files:
|
|
2217
2237
|
- app/views/renalware/letters/letters/new.html.slim
|
2218
2238
|
- app/views/renalware/letters/letters/show.html.slim
|
2219
2239
|
- app/views/renalware/letters/lists/_letter.html.slim
|
2240
|
+
- app/views/renalware/letters/lists/_table.html.slim
|
2220
2241
|
- app/views/renalware/letters/lists/show.html.slim
|
2242
|
+
- app/views/renalware/letters/lists/show.js.erb
|
2221
2243
|
- app/views/renalware/letters/parts/_allergies.html.slim
|
2222
2244
|
- app/views/renalware/letters/parts/_clinical_observations.html.slim
|
2223
2245
|
- app/views/renalware/letters/parts/_prescriptions.html.slim
|
@@ -2780,6 +2802,7 @@ files:
|
|
2780
2802
|
- db/functions/generate_secure_id_v01.sql
|
2781
2803
|
- db/functions/import_gps_csv_v01.sql
|
2782
2804
|
- db/functions/import_practice_memberships_csv_v01.sql
|
2805
|
+
- db/functions/import_practice_memberships_csv_v02.sql
|
2783
2806
|
- db/functions/import_practices_csv_v01.sql
|
2784
2807
|
- db/functions/preprocess_hl7_message_v01.sql
|
2785
2808
|
- db/functions/preprocess_hl7_message_v02.sql
|
@@ -3135,6 +3158,15 @@ files:
|
|
3135
3158
|
- db/migrate/20180213171805_add_display_order_cols_to_observation_descriptions.rb
|
3136
3159
|
- db/migrate/20180214124317_add_cols_to_aki_alerts.rb
|
3137
3160
|
- db/migrate/20180216132741_disable_some_audits.rb
|
3161
|
+
- db/migrate/20180221210458_add_state_index_on_modalities.rb
|
3162
|
+
- db/migrate/20180222090501_add_partial_index_to_bookmarks.rb
|
3163
|
+
- db/migrate/20180223100420_add_sent_to_ukrdc_at_to_patients.rb
|
3164
|
+
- db/migrate/20180226124724_add_patient_id_to_virology_profile.rb
|
3165
|
+
- db/migrate/20180226132410_create_ukrdc_transmission_logs.rb
|
3166
|
+
- db/migrate/20180301095040_update_fn_to_upsert_gp_practive_memberships.rb
|
3167
|
+
- db/migrate/20180305134959_add_display_group_to_observation_desriptions.rb
|
3168
|
+
- db/migrate/20180306071308_remove_rogue_aki_alerts_column.rb
|
3169
|
+
- db/migrate/20180306080518_add_state_tracking_cols_to_letters.rb
|
3138
3170
|
- db/seeds.rb
|
3139
3171
|
- db/seeds/default/accesses/access_pd_catheter_insertion_techniques.csv
|
3140
3172
|
- db/seeds/default/accesses/access_pd_catheter_insertion_techniques.rb
|
@@ -3285,6 +3317,7 @@ files:
|
|
3285
3317
|
- lib/tasks/cucumber.rake
|
3286
3318
|
- lib/tasks/cucumber_web.rake
|
3287
3319
|
- lib/tasks/feeds/files.rake
|
3320
|
+
- lib/tasks/ukrdc.rake
|
3288
3321
|
- lib/templates/slim/scaffold/_form.html.slim
|
3289
3322
|
- lib/test_support/ajax_helpers.rb
|
3290
3323
|
- lib/test_support/autocomplete_helpers.rb
|
@@ -1,64 +0,0 @@
|
|
1
|
-
require_dependency "renalware/pathology"
|
2
|
-
|
3
|
-
module Renalware
|
4
|
-
module Pathology
|
5
|
-
# Responsible for rendering a HTML table to format historical observation results.
|
6
|
-
#
|
7
|
-
class HistoricalObservationResults::HTMLTableView < SimpleDelegator
|
8
|
-
def render(view_model)
|
9
|
-
header, *body = view_model
|
10
|
-
|
11
|
-
content_tag(:table, id: "observations") do
|
12
|
-
concat(format_header(header))
|
13
|
-
concat(format_body(body))
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def format_header(cells)
|
20
|
-
content_tag(:thead) do
|
21
|
-
content_tag(:tr) do
|
22
|
-
cells.each do |cell|
|
23
|
-
concat(format_header_cell(cell))
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def format_body(rows)
|
30
|
-
content_tag(:tbody) do
|
31
|
-
rows.each do |row|
|
32
|
-
concat(content_tag(:tr) do
|
33
|
-
row.each do |cell|
|
34
|
-
concat(format_body_cell(cell))
|
35
|
-
end
|
36
|
-
end)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def format_header_cell(cell)
|
42
|
-
content_tag(:th, cell, class: cell.html_class, title: cell.title)
|
43
|
-
end
|
44
|
-
|
45
|
-
def format_body_cell(cell)
|
46
|
-
if cell.respond_to?(:cancelled?)
|
47
|
-
if cell.cancelled?
|
48
|
-
# content = cell.cancelled ? "CANCL" : cell.to_s
|
49
|
-
content_tag(:td, class: cell.html_class, style: "text-align: center") do
|
50
|
-
tooltip_with_block(label: cell.comment) do
|
51
|
-
content_tag(:i, "", class: "fa fa-warning centre")
|
52
|
-
end
|
53
|
-
end
|
54
|
-
else
|
55
|
-
content_tag(:td, cell, class: cell.html_class)
|
56
|
-
end
|
57
|
-
else
|
58
|
-
# A date?
|
59
|
-
content_tag(:td, cell, class: cell.html_class)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
require_dependency "renalware/pathology"
|
2
|
-
|
3
|
-
module Renalware
|
4
|
-
module Pathology
|
5
|
-
# Reponsible for building the view model for historical observation results.
|
6
|
-
#
|
7
|
-
class HistoricalObservationResults::Presenter < ResultsPresenter
|
8
|
-
# @return [Array] see example below for composition of array
|
9
|
-
#
|
10
|
-
# Example:
|
11
|
-
#
|
12
|
-
# [
|
13
|
-
# ["observed_on", "HGB", "MCV", "WBC"]
|
14
|
-
# [Date.parse("2011-10-10")], Observation.new(result: "2"), Observation.new(result: "3")],
|
15
|
-
# [Date.parse("2011-10-09")], Observation.new(result: "5"), nil],
|
16
|
-
# [Date.parse("2011-10-10")], nil, Observation.new(result: "4")],
|
17
|
-
# ]
|
18
|
-
#
|
19
|
-
def present(*args)
|
20
|
-
super
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
# @section header
|
26
|
-
|
27
|
-
def build_header
|
28
|
-
presentation = []
|
29
|
-
presentation << [build_date_cell, *build_descriptions]
|
30
|
-
end
|
31
|
-
|
32
|
-
def build_date_cell
|
33
|
-
HeaderPresenter.new("date")
|
34
|
-
end
|
35
|
-
|
36
|
-
def build_descriptions
|
37
|
-
@results.observation_descriptions.map { |description| HeaderPresenter.new(description) }
|
38
|
-
end
|
39
|
-
|
40
|
-
# @section body
|
41
|
-
|
42
|
-
def build_body
|
43
|
-
@results.map { |observations_by_date| build_row(observations_by_date) }
|
44
|
-
end
|
45
|
-
|
46
|
-
def build_row(observations_by_date)
|
47
|
-
observed_on = build_date(observations_by_date)
|
48
|
-
observations = build_observations(observations_by_date)
|
49
|
-
|
50
|
-
[observed_on, *observations]
|
51
|
-
end
|
52
|
-
|
53
|
-
def build_date(observations_by_date)
|
54
|
-
observed_on = observations_by_date.keys.first
|
55
|
-
DatePresenter.new(observed_on)
|
56
|
-
end
|
57
|
-
|
58
|
-
def build_observations(observations_by_date)
|
59
|
-
observations = observations_by_date.values.first
|
60
|
-
observations.map { |observation| ObservationPresenter.new(observation) }
|
61
|
-
end
|
62
|
-
|
63
|
-
# @section presenters
|
64
|
-
|
65
|
-
class HeaderPresenter < SimpleDelegator
|
66
|
-
def title
|
67
|
-
to_s
|
68
|
-
end
|
69
|
-
|
70
|
-
def html_class
|
71
|
-
to_s.downcase
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
class DatePresenter < HeaderPresenter
|
76
|
-
def to_s
|
77
|
-
I18n.l(self)
|
78
|
-
end
|
79
|
-
|
80
|
-
def html_class
|
81
|
-
"date"
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|