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.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/app/controllers/renalware/events/investigations_controller.rb +10 -0
- data/app/controllers/renalware/transplants/donor_dashboards_controller.rb +1 -7
- data/app/controllers/renalware/transplants/recipient_dashboards_controller.rb +1 -21
- data/app/models/renalware/events/investigation.rb +31 -0
- data/app/models/renalware/feeds/hl7_message.rb +29 -34
- data/app/models/renalware/feeds/message_parser.rb +2 -1
- data/app/models/renalware/pathology/create_observation_requests.rb +25 -0
- data/app/models/renalware/pathology/message_listener.rb +7 -5
- data/app/models/renalware/pathology/{message_param_parser.rb → observation_requests_attributes_builder.rb} +31 -27
- data/app/models/renalware/patients/practice_search_query.rb +1 -1
- data/app/policies/renalware/events/investigation_policy.rb +8 -0
- data/app/presenters/renalware/pathology/observation_presenter.rb +1 -1
- data/app/presenters/renalware/transplants/consent_presenter.rb +1 -1
- data/app/presenters/renalware/transplants/donor_dashboard_presenter.rb +35 -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 +39 -0
- data/app/presenters/renalware/transplants/wait_list_registration_presenter.rb +2 -0
- data/app/views/renalware/api/ukrdc/patients/_documents.xml.builder +12 -9
- data/app/views/renalware/api/ukrdc/patients/_sending_facility.xml.builder +4 -4
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_lab_order.xml.builder +1 -1
- data/app/views/renalware/api/ukrdc/patients/lab_orders/_result_item.xml.builder +1 -1
- data/app/views/renalware/api/ukrdc/patients/show.xml.builder +1 -5
- data/app/views/renalware/events/events/_event.html.slim +7 -1
- data/app/views/renalware/events/events/_table.html.slim +2 -1
- data/app/views/renalware/events/events/cell/_investigation.html.slim +9 -0
- data/app/views/renalware/events/events/inputs/_investigation.html.slim +4 -0
- data/app/views/renalware/events/events/toggled_cell/_investigation.html.slim +11 -0
- data/app/views/renalware/events/investigations/_list.html.slim +12 -0
- data/app/views/renalware/events/investigations/edit.html.slim +13 -0
- data/app/views/renalware/transplants/donor_dashboards/show.html.slim +27 -20
- data/app/views/renalware/transplants/recipient_dashboards/_page_actions.html.slim +4 -0
- data/app/views/renalware/transplants/recipient_dashboards/show.html.slim +22 -17
- data/config/locales/renalware/events/investigation.en.yml +58 -0
- data/config/locales/renalware/transplants/donor_dashboard.en.yml +1 -0
- data/config/locales/renalware/transplants/recipient_dashboards.en.yml +1 -0
- data/config/routes.rb +5 -0
- data/db/migrate/20180119121243_create_trigger_to_preprocess_hl7_msg.rb +5 -3
- data/db/migrate/20180125201356_make_obs_set_trigger_change_updated_at.rb +191 -0
- data/db/migrate/20180126142314_add_uuid_to_letters.rb +6 -0
- data/db/seeds/default/events/event_types.csv +1 -0
- data/lib/renalware/configuration.rb +1 -0
- data/lib/renalware/version.rb +1 -1
- data/lib/test_support/text_editor_helpers.rb +6 -0
- data/spec/factories/events/events.rb +24 -1
- data/spec/factories/events/events_types.rb +17 -2
- data/spec/support/database_functions_spec_helper.rb +6 -0
- metadata +18 -4
- 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
|