Inspiration

The UN estimates that there are 29.5 million people around the world with drug use disorders.

Most of the drug problem is found in average homes where people are getting their fix from legal medication . These pills are prescribed by doctors and picked up at patients neighborhood drug stores.

Painkillers, alongside sleeping pills and anxiety medication, are among the most abused legal substances. According to the US Center for Disease Control and Prevention (CDC), more than 42,000 deaths from opioid overdose were recorded in 2016 in the US. The youth are the most at risk. Prevalence of misuse is highest among Americans aged 12 to 25.

Many abusers start by experimenting with medication available at homes. Often, these substances serve as gateway drugs that lead users to explore more dangerous ones later on. Eventually, they tend to try out pills with stronger mind-altering effects.

Addiction can prompt them to commit prescription fraud. Some attempt to con doctors to get legitimate prescriptions or have pharmacies fulfill fake prescriptions.

Painkillers, alongside sleeping pills and anxiety medication, are among the most abused legal substances. According to the US Center for Disease Control and Prevention (CDC), more than 42,000 deaths from opioid overdose were recorded in 2016 in the US. The youth are the most at risk. Prevalence of misuse is highest among Americans aged 12 to 25.

Many abusers start by experimenting with medication available at homes. Often, these substances serve as gateway drugs that lead users to explore more dangerous ones later on. Eventually, they tend to try out pills with stronger mind-altering effects.

Addiction can prompt them to commit prescription fraud. Some attempt to con doctors to get legitimate prescriptions or have pharmacies fulfill fake prescriptions.

What it does

Prescryptochain is a solution which leverages the power of blockchain, smart contracts and mobile technology to provide an easy, efficient, secure and private way to handle the medication prescription and dispensing process. We use the Hedera ecosystem as the backbone for our system, with ancillary functionality provided by google cloud serverless functions for RSA keypair generation, signature and encryption/decryption services. The system works by first generating an RSA keypair for each patient, doctor and pharmacy in the system, and each interaction is double signed and encrypted using the participants’ respective keys. These encrypted and signed prescriptions are stored on the Hedera File Service, which then are readable by a Pharmacist by only using the public keys of the patient and the issuing doctor.

How I built it

The NodeJS Express application acts as the API for the application, it accepts requests to create encrypted prescriptions in Hedera File Service. The FileId of the record is then associated with Doctor/Patient records in MongoDb. The prescription is encrypted using a patient-specific RSA public key in a Google Cloud Function.

Challenges I ran into

CORS on google cloud functions was a seemingly simple problem but difficult to resolve At the end, we made an app but we need another phone to record it, Since this is virtual hackathon, our team members are literally on opposite sides of the planet. PEM formatted keys become unusable sometimes due to the serialization and deserialization and encoding processes which often introduce extraneous characters in a bytestream.

Accomplishments that I'm proud of

Building a working system collaborating with people from literally across the world in 24 hours, and being able to incorporate blockchain to solve a pertinent problem. Getting some of the tech to work despite numerous problems and not giving up.

What I learned

Blockchain dev is not for the faint hearted! Serverless apps are great, but beware of dependencies and other such traps

What's Next for Prescryptochain?

Further develop the system for pharmacies and patients.

Share this project:

Updates