Class: Renalware::Patients::Ingestion::UpdateMasterPatientIndex

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/patients/ingestion/update_master_patient_index.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rw_patientObject (readonly)

Returns the value of attribute rw_patient.



11
12
13
# File 'app/models/renalware/patients/ingestion/update_master_patient_index.rb', line 11

def rw_patient
  @rw_patient
end

Class Method Details

.call(hl7_message) ⇒ Object



15
16
17
# File 'app/models/renalware/patients/ingestion/update_master_patient_index.rb', line 15

def self.call(hl7_message)
  new(hl7_message).call
end

Instance Method Details

#callObject



19
20
21
22
23
24
# File 'app/models/renalware/patients/ingestion/update_master_patient_index.rb', line 19

def call
  return unless hl7_message.adt?

  @rw_patient = find_patient_in_renalware
  update_or_create_abridged_patient
end