renalware-core 2.0.0.pre.rc6 → 2.0.0.pre.rc7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -1
  3. data/app/controllers/renalware/events/investigations_controller.rb +10 -0
  4. data/app/controllers/renalware/transplants/donor_dashboards_controller.rb +1 -7
  5. data/app/controllers/renalware/transplants/recipient_dashboards_controller.rb +1 -21
  6. data/app/models/renalware/events/investigation.rb +31 -0
  7. data/app/models/renalware/feeds/hl7_message.rb +29 -34
  8. data/app/models/renalware/feeds/message_parser.rb +2 -1
  9. data/app/models/renalware/pathology/create_observation_requests.rb +25 -0
  10. data/app/models/renalware/pathology/message_listener.rb +7 -5
  11. data/app/models/renalware/pathology/{message_param_parser.rb → observation_requests_attributes_builder.rb} +31 -27
  12. data/app/models/renalware/patients/practice_search_query.rb +1 -1
  13. data/app/policies/renalware/events/investigation_policy.rb +8 -0
  14. data/app/presenters/renalware/pathology/observation_presenter.rb +1 -1
  15. data/app/presenters/renalware/transplants/consent_presenter.rb +1 -1
  16. data/app/presenters/renalware/transplants/donor_dashboard_presenter.rb +35 -0
  17. data/app/presenters/renalware/transplants/mdm_presenter.rb +2 -0
  18. data/app/presenters/renalware/transplants/patient_presenter.rb +2 -0
  19. data/app/presenters/renalware/transplants/recipient_dashboard_presenter.rb +39 -0
  20. data/app/presenters/renalware/transplants/wait_list_registration_presenter.rb +2 -0
  21. data/app/views/renalware/api/ukrdc/patients/_documents.xml.builder +12 -9
  22. data/app/views/renalware/api/ukrdc/patients/_sending_facility.xml.builder +4 -4
  23. data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder +1 -1
  24. data/app/views/renalware/api/ukrdc/patients/lab_orders/_result_item.xml.builder +1 -1
  25. data/app/views/renalware/api/ukrdc/patients/show.xml.builder +1 -5
  26. data/app/views/renalware/events/events/_event.html.slim +7 -1
  27. data/app/views/renalware/events/events/_table.html.slim +2 -1
  28. data/app/views/renalware/events/events/cell/_investigation.html.slim +9 -0
  29. data/app/views/renalware/events/events/inputs/_investigation.html.slim +4 -0
  30. data/app/views/renalware/events/events/toggled_cell/_investigation.html.slim +11 -0
  31. data/app/views/renalware/events/investigations/_list.html.slim +12 -0
  32. data/app/views/renalware/events/investigations/edit.html.slim +13 -0
  33. data/app/views/renalware/transplants/donor_dashboards/show.html.slim +27 -20
  34. data/app/views/renalware/transplants/recipient_dashboards/_page_actions.html.slim +4 -0
  35. data/app/views/renalware/transplants/recipient_dashboards/show.html.slim +22 -17
  36. data/config/locales/renalware/events/investigation.en.yml +58 -0
  37. data/config/locales/renalware/transplants/donor_dashboard.en.yml +1 -0
  38. data/config/locales/renalware/transplants/recipient_dashboards.en.yml +1 -0
  39. data/config/routes.rb +5 -0
  40. data/db/migrate/20180119121243_create_trigger_to_preprocess_hl7_msg.rb +5 -3
  41. data/db/migrate/20180125201356_make_obs_set_trigger_change_updated_at.rb +191 -0
  42. data/db/migrate/20180126142314_add_uuid_to_letters.rb +6 -0
  43. data/db/seeds/default/events/event_types.csv +1 -0
  44. data/lib/renalware/configuration.rb +1 -0
  45. data/lib/renalware/version.rb +1 -1
  46. data/lib/test_support/text_editor_helpers.rb +6 -0
  47. data/spec/factories/events/events.rb +24 -1
  48. data/spec/factories/events/events_types.rb +17 -2
  49. data/spec/support/database_functions_spec_helper.rb +6 -0
  50. metadata +18 -4
  51. data/app/models/renalware/pathology/create_observations.rb +0 -22
@@ -1,22 +0,0 @@
1
- require_dependency "renalware/pathology"
2
-
3
- #
4
- # Create pathology observations for an existing patient from HL7 message content.
5
- #
6
- module Renalware
7
- module Pathology
8
- class CreateObservations
9
- def call(params)
10
- patient = find_patient(params.fetch(:patient_id))
11
- observation_params = params.fetch(:observation_request)
12
- patient.observation_requests.create!(observation_params)
13
- end
14
-
15
- private
16
-
17
- def find_patient(id)
18
- ::Renalware::Pathology::Patient.find_by(id: id) || NullObject.instance
19
- end
20
- end
21
- end
22
- end