Class: Redox::Request::PatientAdmin

Inherits:
Object
  • Object
show all
Defined in:
lib/redox/request/patient_admin.rb

Constant Summary collapse

CREATE_META =
Redox::Models::Meta.new(EventType: 'NewPatient', DataModel: 'PatientAdmin')
UPDATE_META =
Redox::Models::Meta.new(EventType: 'PatientUpdate', DataModel: 'PatientAdmin')

Class Method Summary collapse

Class Method Details

.create(patient:, meta: Redox::Models::Meta.new) ⇒ Object



7
8
9
10
# File 'lib/redox/request/patient_admin.rb', line 7

def self.create(patient: , meta: Redox::Models::Meta.new)
  meta = CREATE_META.merge(meta)
  return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(patient, meta))))
end

.update(patient:, meta: Redox::Models::Meta.new) ⇒ Object



12
13
14
15
# File 'lib/redox/request/patient_admin.rb', line 12

def self.update(patient: , meta: Redox::Models::Meta.new)
  meta = UPDATE_META.merge(meta)
  return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(patient, meta))))
end