Class: PHRMgr::Client
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- PHRMgr::Client
- Defined in:
- lib/medical_records/phr_mgr/client.rb
Overview
Core class responsible for PHR Manager API interface operations
Instance Method Summary collapse
-
#get_phrmgr_status ⇒ Hash
Run a PHR Manager refresh on the patient.
-
#initialize(icn) ⇒ Client
constructor
Initialize the client.
-
#post_phrmgr_refresh ⇒ Fixnum
Run a PHR Manager refresh on the patient.
Methods inherited from Common::Client::Base
configuration, #raise_backend_exception
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Constructor Details
#initialize(icn) ⇒ Client
Initialize the client
18 19 20 21 22 23 |
# File 'lib/medical_records/phr_mgr/client.rb', line 18 def initialize(icn) super() raise Common::Exceptions::ParameterMissing, 'ICN' if icn.blank? @icn = icn end |
Instance Method Details
#get_phrmgr_status ⇒ Hash
Run a PHR Manager refresh on the patient.
41 42 43 44 |
# File 'lib/medical_records/phr_mgr/client.rb', line 41 def get_phrmgr_status response = perform(:get, "status/#{@icn}", nil, self.class.configuration.x_auth_key_headers) response.body end |
#post_phrmgr_refresh ⇒ Fixnum
Run a PHR Manager refresh on the patient.
30 31 32 33 34 |
# File 'lib/medical_records/phr_mgr/client.rb', line 30 def post_phrmgr_refresh response = perform(:post, "refresh/#{@icn}", nil, self.class.configuration.x_auth_key_headers) # response_hash = JSON.parse(response.body) response&.status end |