Class: OpenFdaApi::Device

Inherits:
Endpoint show all
Defined in:
lib/open_fda_api/device.rb

Overview

Interact with the Device API Endpoint:

- 501(k)
- Classification
- Recall Enforcement Reports
- Adverse Events
- Pre-market Approval
- Recalls
- Registrations and Listings
- Covid19 Serological Testing Evaluations
- Unique Device Identifier

Instance Attribute Summary

Attributes inherited from Endpoint

#client

Instance Method Summary collapse

Methods inherited from Endpoint

#build_inputs, #build_query, #initialize, #make_request

Constructor Details

This class inherits a constructor from OpenFdaApi::Endpoint

Instance Method Details

#adverse_events(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



21
22
23
24
25
26
# File 'lib/open_fda_api/device.rb', line 21

def adverse_events(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "event.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {})
  make_request(endpoint, query)
end

#classification(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



34
35
36
37
38
39
# File 'lib/open_fda_api/device.rb', line 34

def classification(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "classification.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#covid19_serological_tests(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



112
113
114
115
116
117
# File 'lib/open_fda_api/device.rb', line 112

def covid19_serological_tests(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "covid19serology.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#premarket_510ks(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



47
48
49
50
51
52
# File 'lib/open_fda_api/device.rb', line 47

def premarket_510ks(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "510k.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#premarket_approval(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



73
74
75
76
77
78
# File 'lib/open_fda_api/device.rb', line 73

def premarket_approval(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "pma.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#recall_enforcement_reports(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



60
61
62
63
64
65
# File 'lib/open_fda_api/device.rb', line 60

def recall_enforcement_reports(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "enforcement.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#recalls(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



86
87
88
89
90
91
# File 'lib/open_fda_api/device.rb', line 86

def recalls(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "recall.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#registrations_and_listings(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



99
100
101
102
103
104
# File 'lib/open_fda_api/device.rb', line 99

def registrations_and_listings(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "registrationlisting.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end

#unique_device_identifier(search: [], sort: [], count: [], skip: 0, limit: 1) ⇒ Object

Returns Response from the API parsed as JSON.

Parameters:

Returns:

  • Response from the API parsed as JSON



125
126
127
128
129
130
# File 'lib/open_fda_api/device.rb', line 125

def unique_device_identifier(search: [], sort: [], count: [], skip: 0, limit: 1)
  endpoint = "udi.json"
  inputs   = build_inputs(search: search, sort: sort, count: count, skip: skip, limit: limit)
  query    = build_query(inputs, {}) # TODO: Upload valid fields
  make_request(endpoint, query)
end