Module: AthenaHealth::Endpoints::Encounters

Included in:
Client
Defined in:
lib/athena_health/endpoints/encounters.rb

Instance Method Summary collapse

Instance Method Details

#create_encounter_diagnoses(practice_id:, encounter_id:, body: {}) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/athena_health/endpoints/encounters.rb', line 57

def create_encounter_diagnoses(practice_id:, encounter_id:, body: {})
  @api.call(
    endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/diagnoses",
    method: :post,
    body: body
  )
end

#create_encounter_order_lab(practice_id:, encounter_id:, body: {}) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/athena_health/endpoints/encounters.rb', line 41

def create_encounter_order_lab(practice_id:, encounter_id:, body: {})
  @api.call(
    endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders/lab",
    method: :post,
    body: body
  )
end

#create_order_group(practice_id:, patient_id:, body: {}) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/athena_health/endpoints/encounters.rb', line 49

def create_order_group(practice_id:, patient_id:, body: {})
  @api.call(
    endpoint: "#{practice_id}/chart/#{patient_id}/ordergroups",
    method: :post,
    body: body
  )
end

#encounter_order(practice_id:, encounter_id:, order_id:) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/athena_health/endpoints/encounters.rb', line 24

def encounter_order(practice_id:, encounter_id:, order_id:)
  response = @api.call(
    endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders/#{order_id}",
    method: :get
  )

  Order.new(response)
end

#encounter_orders(practice_id:, encounter_id:) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/athena_health/endpoints/encounters.rb', line 13

def encounter_orders(practice_id:, encounter_id:)
  response = @api.call(
    endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders",
    method: :get
  )
  orders_collection = []
  response.each {|x| orders_collection << OrderCollection.new(x)}

  orders_collection
end

#encounter_summary(practice_id:, encounter_id:) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/athena_health/endpoints/encounters.rb', line 33

def encounter_summary(practice_id:, encounter_id:)
  response = @api.call(
    endpoint:  "#{practice_id}/chart/encounters/#{encounter_id}/summary",
    method: :get
  )
  EncounterSummary.new(response)
end

#find_encounter(practice_id:, encounter_id:) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/athena_health/endpoints/encounters.rb', line 4

def find_encounter(practice_id:, encounter_id:)
  response = @api.call(
    endpoint: "#{practice_id}/chart/encounter/#{encounter_id}",
    method: :get
  )

  Encounter.new(response.first)
end