Class: Updox::Models::Patient
- Defined in:
- lib/updox/models/patient.rb
Constant Summary collapse
- SYNC_ENDPOINT =
'/PatientsSync'.freeze
- SYNC_LIST_TYPE =
'patients'.freeze
Constants inherited from Model
Model::ITEM_TYPE, Model::LIST_NAME, Model::LIST_TYPE
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Model
#error_message, from_response, request, #response_code, #response_message, #successful?, sync
Class Method Details
.exists?(patient_id, account_id:) ⇒ Boolean
35 36 37 |
# File 'lib/updox/models/patient.rb', line 35 def self.exists?(patient_id, account_id: ) request(endpoint: MESSAGE_COUNT_ENDPOINT, body: { patientId: patient_id }, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT).successful? end |
Instance Method Details
#save(account_id:) ⇒ Object
31 32 33 |
# File 'lib/updox/models/patient.rb', line 31 def save(account_id: ) self.class.sync([self], account_id: account_id) end |