Medication Pricing
Coming Soon in a future release
Overview
The getMedicationPricing method enables users to retrieve various pricing options from multiple vendors for the specified drug.
Method Signature
getMedicationPricing signature
suspend fun getMedicationPricing(request: MedicationPricingRequest) : BWellResult.ResourceCollection<MedicationPricing>
Return Type
BwellResult.ResourceCollection<> containing list of MedicationPricing. Type of MedicationPricing is described below.
Medication Pricing
data class MedicationPricing(
val price: Money? = null,
val pharmacy: String,
val drugUrl: String,
val couponUrl: String
)
-
price - Instance of Money, representing the price of the medication.
-
pharmacy - The name of the pharmacy offering the medication.
-
couponUrl - URL to the pharmacy's page for the medication.
-
drugUrl - URL to the GoodRx page for the medication
Money Data
data class Money(
val value: Number?,
val currency: CurrencyCode?
)
-
value - Numerical value of the price.
-
currency - ISO 4217 currency code representing the monetary currency. [Current only USD is supported]
Parameters
- medicationStatementId (
String): Filters based on the type of the document reference
Special Features (e.g., Filters)
- medicationStatementId: The medication statement ID for the medication whose pricing needs to be fetched.
Example Usage
// Creating the request
val medicationPricingRequest = MedicationPricingRequest.Builder()
.medicationStatementId(medicationStatementId)
.build()
// Fetching medication pricing
val medicationPricingResult = BWellSdk.health.getMedicationPricing(medicationPricingRequest)
// Accessing the first pricing object
val result = medicationPricingResult?.data?.first() <---- Result will be of type MedicationPricing
Compliance
The pricing data is being fetched using a GoodRx API, to meet with the compliance the end user of who is consuming the content provided by the GoodRx, should either show GoodRx logo or include a link stating “Powered by GoodRx”. Both the link or the logo should link back to the GoodRx page. More requirements mentioned here GoodRx API Usage Guide.
Updated about 2 months ago
