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
31
32
33
34
35
|
# File 'lib/redox/models/patient.rb', line 31
def add_identifier(type: , value: )
self[:Identifiers] << Identifier.new({'ID' => value, 'IDType' => type})
return self
end
|
#add_insurance(data = {}) ⇒ Object
37
38
39
40
41
|
# File 'lib/redox/models/patient.rb', line 37
def add_insurance(data = {})
self[:Insurances] << Insurance.new(data)
return self
end
|
#create(meta: Meta.new) ⇒ Object
#demographics ⇒ Object
14
15
16
17
|
# File 'lib/redox/models/patient.rb', line 14
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
23
24
25
|
# File 'lib/redox/models/patient.rb', line 23
def primary_care_provider
self[:PCP] ||= PCP.new
end
|
#update(meta: Meta.new) ⇒ Object