Using Blockchain to Solve the Opioid Epidemic

Sohan Rasul
9 min readApr 4, 2022

Utilizing blockchain technology to create accountability, transparency, and decentralization in opioid prescription tracking.

The Problem:

It is widely known that the United States (US) is in the midst of an opioid epidemic. Opioids are a class of drugs that consists of heroin, as well as legal pain relievers like oxycodone, hydrocodone, codeine, and morphine. Pain-relieving opioids can be safe when prescribed for the right reasons and duration.

These opioids can easily be misused, however, due to the production of euphoria and the relief of pain. Due to these effects, regular use (even through valid prescriptions) can yield dependence and addiction. In turn, the abuse of pain relievers often leads to overdose and death. Every day in the United States, over 115 Americans die after overdosing on opioids. Moreover, the DEA states that up to 80% of heroin addictions begin with the misuse of prescription opioids. By calculating the costs of healthcare, addiction treatment, lost productivity, and criminal justice involvement, The US Centers for Disease Control and Prevention estimates that prescription opioid misuse has a total economic burden of $78.5 billion per year on the United States.

Unfortunately, the current prescription tracking system in the US lacks the technical infrastructure to address this crisis effectively. In particular, the prescription opioid marketplace is rife with:

  • data hoarding
  • doctor shopping
  • provider ignorance
  • vulnerable and centralized data
  • overprescription

Attacking the opioid crisis in the US requires an approach to prescription monitoring that not only makes prescriptions safer, but also incentivizes providers to write fewer prescriptions. Providers today are economically incentivized to prescribe opioids to patients. As a result, providers often spend less face-time with patients, thereby lowering costs associated with patient treatment, while increasing their financial returns.

Similarly, pharmacies today are incentivized to produce and distribute opioids because the more opioids sold, the greater their revenue, which also increases shareholder value. Patients themselves are also incentivized to consume opioids. For example, physical therapy in the treatment of pain can be extremely frustrating and filled with disappointment. Opioids provide short-term relief, though they often lead to patient addiction. This self-reinforcing cycle can be ameliorated by a technical approach that realigns incentives for providers, pharmacies, and patients.

Key Challenges Faced by Current Approaches:

PDMPs →With the widespread problem of opioid misuse in the United States, federal, state, and local governments have begun efforts to implement prescription drug monitoring programs (PDMPs). The agency responsible for administration of the PDMP varies by state and includes state’s regulatory, administrative, and law enforcement agencies. However, they still do not fix the fundamental problems with how doctors and others are incentivized regarding opioids.

Figure 1

Figure 1 depicts a scenario where a patient attempts to request opioid prescription (e.g., for pain management). In this conventional approach, the patient is required to present a state-issued ID as proof of their identity. Providers (Provider A and Pharmacist B) within the same state are able to exchange prescription data of the same patient using their provided ID through case reporting enabled by state-wide PDMPs. The state-by-state siloed implementation of PDMPs, however, limits interoperability across state lines. As a result, when the same patient visits another provider (Pharmacist C), Pharmacist C is unaware of the patient’s previous prescription activities, which creates a loophole in the system that patients with opioid addiction can exploit to doctor shop across states and obtain more than the required opioid dosage.

Although PDMPs provide an important contribution in the fight against opioid abuse, therefore, the following challenges remain largely unresolved:

1. Lack of interoperability between states: PDMPs create one statewide electronic database to contain data related to the dispensing of particular substances (Diversion, 2016). While these databases are a necessary first step, their state-by-state implementation restricts the interoperability of states.

2. Vulnerability of centralized databases: Maintaining one central database introduces the risk of losing all data in one incident or cyber-attack.

3. Reliability and Consistency of Information: Physicians using current PDMP databases are often dissatisfied with data reliability and consistency

The Solution:

My Idea→ A decentralized app (Dapp) that tracks opioid prescription using distributed ledger technology.

To provide a technical platform for more effective sharing of opioid-related activities, I propose an application that is a distributed ledger technology (DLT)-based DApp designed to operate within a networked consortium of healthcare professionals. Theoretically, it allows a trusted network of stakeholders (e.g., hospitals and pharmacies) to store opioid transaction records in a secure and accountable manner.

By securely disseminating knowledge that a prescription has been filled by a patient, it helps remedy various problems in the current US opioid system and create a ton of benefits like:

  • Eradicating lack of communication between providers causing duplicated opioid orders of the same patient.
  • Opioid data on the dapp is shared with the networked consortium in a secure fashion with no single point of failure that could corrupt the entire system.
  • Healthcare professionals, such as providers and pharmacists, are incentivized to participate in the consortium through access to data that will increase the quality and transparency of care.
  • Proper analysis of this data enables patients to receive care that is more appropriate to their condition(s).
  • It can also create personalized logs for each individual patient to help them identify past prescription activities.

Technical overview:

It is a web app built atop an Ethereum blockchain alongside existing provider databases (simulated for the prototype). The smart contracts accept messages (e.g., a prescription transaction or a request to view a patient’s prescription history) from the web app. It then persists and/or delivers data (e.g., data related to shared access or a specific data access request) used for prescription tracking.

The web app provides a portal for care provider users, with its server component handling and encapsulating all blockchain communications. Each provider database is registered into the blockchain consortium if it sets up or connects to a server. Its design enables the connection of traditionally siloed provider databases with each other in a decentralized manner, regardless of the physical location of the database owner entity.

Technical Components:

Three key components:

  1. A standardized Postgres database simulator with API keys to permission access
  2. An Ethereum smart contract to log access requests and responses on the blockchain
  3. A Python-based web app to provide users with a familiar experience.
Figure 2

As shown in Figure 2, each block contains a bundle of requests and responses and is chained in a network-wide sequential order. When a provider needs to access a patient’s prescription information, a data request is sent to each provider in the registry with that patient’s biometric-based identifier. Each provider responds with a binary (i.e., “yes” or “no”) message indicating whether they possess data for the corresponding patient. Each “yes” response will also contain an API access key that grants the requesting provider temporary access to that patient’s data in the responder’s database.

When a provider requests data on a patient, it sends a data request to each provider in the registry, which is also simultaneously recorded on the Ethereum blockchain with a timestamp. Each provider then sends a response that is also logged on the blockchain. If the provider holds data related to the requested patient an encrypted API access key is attached to the response. Only the requesting provider can decrypt this key to retrieve the data. Maintaining the history of each data request and response on the blockchain allows it track which provider has accessed another provider’s database at any given time.

Using the web-app seen in Figure 3, both patients and providers can be on-boarded to use the system to maximize awareness of prescription-related activities. The web app also allows providers to request data on a patient once the correct biometric-based identifier of that patient has been provided. When a data request has been transmitted through the web app portal, the web server instantiates a new request object in the smart contract component, which is in turn saved on the Ethereum blockchain. The request is then broadcasted to each provider registered in the system and their responses are logged into response objects saved in the same smart contract.

Figure 3

Outcomes of the Solution:

  1. It creates a system for stakeholders to securely monitor and track patient opioid prescription data across state lines. As a result, it increases provider access to prescription-related data and ensures the integrity of all parties involved in each prescription transaction and legitimacy of opioid prescriptions to prevent opioid misuse.
  2. Figure 2 shows how it enables providers to verify patient identity via a biometric-based authentication mechanism that maps to a network-wide unique patient identifier. Upon authenticating the patient, all providers in this scenario can then securely share prescription activities of that patient (given proper authorization) through the smart contact log of its decentralized design. This approach better equips providers with knowledge about the patient’s prescription request and fulfillment history in (near) real-time, thereby helping determine whether it is safe to prescribe opioids to the patient.
  3. It improves interoperability through enabling providers residing in different states with a new way to share prescription information. In particular, rather than permanently sharing all data, it enables the distribution of temporary API access tokens. Data can then be supplied from the local provider via secure APIs, thereby enabling more interoperable data sharing.
  4. Allows providers to maintain control of the data they generate. Even if corrupted data enters a single local database, the collection of databases as a whole will remain untainted. This design minimizes the scope of any issue that jeopardizes the consistency of the overall database. Instead of storing patient data in its blockchain component, it only stores timestamped records of transactions. The fact that a transaction took place will be immutable and permanent, rather than storing actual information about what the transaction was (i.e., some event occurred that was relevant to Patient X and Provider Y). This design enables the dapp to grant providers permission viewing.
  5. The decentralization property of blockchain technology can facilitate the identity verification process by standardizing identity representations. Smart contract=based public key infrastructure (PKI) has been proposed as a useful mechanism to create and manage identities and has been preliminarily prototyped as a global registry. For provider users, it employs PKI-based identifiers in conjunction with a registry model created via a smart contract component to enable authenticated and encrypted communications between providers.
  6. By allowing local providers to store their generated data, it enables data updates as soon as it is recorded in the local system. thereby eliminating a step in submitting prescription records. In addition to streamlining the process by logging transactions, providers will now be more accountable for transactions that do occur., which will have the following two-part effect:
  • Prescribing doctors (or their surrogate) will feel more responsible for the transactions they sign off on. Providers will likewise be more precautious in writing a prescription for opioids if they believe each transaction can be observed and audited in a tamper-proof manner. The number and frequency of prescriptions can also be utilized to alert when doctors abuse their licenses.
  • If doctors are more precautious in writing opioid prescriptions they may be less inclined to write as many opioid scripts. In turn, this reduction in scripts will lower the number of opioids in legal circulation and hopefully incentivize safer medical practices.

Simply put, the opioid epidemic is deadly and there needs to be a better approach to solving it. While providing aid to those who are impacted by these drugs is extremely important, there needs to be a better, universal drug monitoring system to prevent the overprescription of these drugs that allows them to get into the wrong person’s hands like the one proposed in this article.

If you enjoyed the read, feel free to check out my other articles and connect with me on Linkedin!

--

--