Class: Redox::Models::Patient
Constant Summary
AbstractModel::HIGH_LEVEL_KEYS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #to_h
from_response, from_response_inflected, #to_json
Class Method Details
.query(params, meta: Meta.new) ⇒ Object
Instance Method Details
#add_identifier(type:, value:) ⇒ Object
25
26
27
28
29
|
# File 'lib/redox/models/patient.rb', line 25
def add_identifier(type: , value: )
self[:Identifiers] << Identifier.new({'ID' => value, 'IDType' => type})
return self
end
|
#add_insurance(data = {}) ⇒ Object
31
32
33
34
35
|
# File 'lib/redox/models/patient.rb', line 31
def add_insurance(data = {})
self[:Insurances] << Insurance.new(data)
return self
end
|
#create(meta: Meta.new) ⇒ Object
#demographics ⇒ Object
12
13
14
15
|
# File 'lib/redox/models/patient.rb', line 12
def demographics
self[:Demographics] = Demographics.new(self[:Demographics]) unless self[:Demographics].is_a?(Redox::Models::Demographics)
self[:Demographics] ||= Demographics.new
end
|
#primary_care_provider ⇒ Object
21
22
23
|
# File 'lib/redox/models/patient.rb', line 21
def primary_care_provider
self[:PCP] ||= PCP.new
end
|
#update(meta: Meta.new) ⇒ Object