Module: CoverMyMeds::Indicators
Constant Summary collapse
- CURRENT_VERSION =
1
Instance Method Summary collapse
- #post_indicators(prescription: prescription, patient: patient, payer: {}, prescriber: {}, version: CURRENT_VERSION) ⇒ Object
- #search_indicators(prescriptions: prescriptions, patient: {}, payer: {}, prescriber: {}, version: CURRENT_VERSION) ⇒ Object
Methods included from HostAndPath
Instance Method Details
#post_indicators(prescription: prescription, patient: patient, payer: {}, prescriber: {}, version: CURRENT_VERSION) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/cover_my_meds/client/indicators.rb', line 7 def post_indicators(prescription: prescription, patient: patient, payer: {}, prescriber: {}, version: CURRENT_VERSION) params = { prescription: prescription, prescriber: prescriber, patient: patient, payer: payer } data = indicators_request POST, params: { v: version, headers: { content_type: :json } } do params.to_json end Hashie::Mash.new(data) end |
#search_indicators(prescriptions: prescriptions, patient: {}, payer: {}, prescriber: {}, version: CURRENT_VERSION) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/cover_my_meds/client/indicators.rb', line 15 def search_indicators(prescriptions: prescriptions, patient: {}, payer: {}, prescriber: {}, version: CURRENT_VERSION) params = { prescriptions: Array(prescriptions), prescriber: prescriber, patient: patient, payer: payer } data = indicators_request POST, path: 'search/', params: { v: version, headers: { content_type: :json } } do params.to_json end Hashie::Mash.new(data) end |