Module: DockHealthApi

Extended by:
Forwardable
Defined in:
lib/dock_health_api.rb,
lib/dock_health_api/client.rb,
lib/dock_health_api/config.rb,
lib/dock_health_api/object.rb,
lib/dock_health_api/version.rb,
lib/dock_health_api/crud/get.rb,
lib/dock_health_api/crud/put.rb,
lib/dock_health_api/resource.rb,
lib/dock_health_api/crud/list.rb,
lib/dock_health_api/crud/create.rb,
lib/dock_health_api/crud/delete.rb,
lib/dock_health_api/crud/update.rb,
lib/dock_health_api/resources/task.rb,
lib/dock_health_api/resources/user.rb,
lib/dock_health_api/resources/patient.rb,
lib/dock_health_api/resources/webhook.rb,
lib/dock_health_api/resources/tasklist.rb,
lib/dock_health_api/resources/developer.rb,
lib/dock_health_api/resources/usergroup.rb,
lib/dock_health_api/resources/customfield.rb,
lib/dock_health_api/resources/customstatus.rb,
lib/dock_health_api/resources/organization.rb

Defined Under Namespace

Modules: Crud Classes: Client, Config, CustomField, CustomStatus, Developer, Object, Organization, Patient, Resource, Task, TaskList, User, UserGroup, Webhook

Constant Summary collapse

VERSION =
"0.5.9"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



36
37
38
# File 'lib/dock_health_api.rb', line 36

def config
  @config
end

Class Method Details

.iframe_tokenObject



55
56
57
# File 'lib/dock_health_api.rb', line 55

def iframe_token
  receive_iframe_token.token
end

.iframe_url(arg = {}) ⇒ Object



59
60
61
62
63
64
65
66
67
# File 'lib/dock_health_api.rb', line 59

def iframe_url(arg={})
  receive_iframe_token
  dock_user_id = arg[:user_id]
  view_type = arg[:view_type]
  target_type = arg[:target_type]
  target_id = arg[:target_id]

  iframe_base_url+"authToken=#{iframe_token}&dockOrganizationId=#{org_id}&dockUserId=#{dock_user_id}&viewType=#{view_type}&targetType=#{target_type}&targetId=#{target_id}"
end

.patient_url(arg = {}) ⇒ Object



69
70
71
72
73
74
75
76
77
# File 'lib/dock_health_api.rb', line 69

def patient_url(arg={})
  receive_iframe_token
  view_type = "PATIENT"
  target_type = "PATIENT"
  dock_user_id = arg[:user_id]
  target_id = arg[:patient_id]

  iframe_base_url+"authToken=#{iframe_token}&dockOrganizationId=#{org_id}&dockUserId=#{dock_user_id}&viewType=#{view_type}&targetType=#{target_type}&targetId=#{target_id}"
end

.receive_iframe_tokenObject



51
52
53
# File 'lib/dock_health_api.rb', line 51

def receive_iframe_token
  @receive_iframe_token ||= Client.instance.iframe_token_connection
end

.tasklist_url(arg = {}) ⇒ Object



87
88
89
90
91
92
93
94
# File 'lib/dock_health_api.rb', line 87

def tasklist_url(arg={})
  receive_iframe_token
  view_type = "LIST"
  target_type = "LIST"
  target_id = arg[:tasklist_id]

  iframe_base_url+"authToken=#{iframe_token}&dockOrganizationId=#{org_id}&dockUserId=#{user_id}&viewType=#{view_type}&targetType=#{target_type}&targetId=#{target_id}"
end

.user_url(arg = {}) ⇒ Object



80
81
82
83
84
85
# File 'lib/dock_health_api.rb', line 80

def user_url(arg={})
  receive_iframe_token
  dock_user_id = arg[:user_id]

  iframe_base_url+"authToken=#{iframe_token}&dockOrganizationId=#{org_id}&dockUserId=#{dock_user_id}"
end