Class: Renalware::Patients::Ingestion::CommandFactory
- Inherits:
-
Object
- Object
- Renalware::Patients::Ingestion::CommandFactory
- Defined in:
- app/models/renalware/patients/ingestion/command_factory.rb
Overview
Responsible for making commands to process messages based on the message type.
Instance Method Summary collapse
-
#for(message) ⇒ Object
rubocop:disable Metrics/CyclomaticComplexity Note that for now most of these mapped methods will only try and update the patient info and master patient index, and not actually try and create an admission/transfer etc.
Instance Method Details
#for(message) ⇒ Object
rubocop:disable Metrics/CyclomaticComplexity Note that for now most of these mapped methods will only try and update the patient info and master patient index, and not actually try and create an admission/transfer etc
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/models/renalware/patients/ingestion/command_factory.rb', line 16 def for() case .action when :add_person_information then make_add_patient() when :update_person_information then make_update_patient() when :admit_patient then make_admit_patient() when :update_admission then make_update_admission() when :cancel_admission then make_cancel_admission() when :transfer_patient then make_transfer_patient() when :discharge_patient then make_discharge_patient() when :cancel_discharge then make_cancel_discharge() # when :merge_patient then make_merge_patient(message) # complex so ignore for now. # when :add_consultant then make_add_consultant(message) else noop end end |