Inspiration

US healthcare system has many problems, and one of them is the chronic shortage of doctors

What it does

We allow patients and doctors to schedule appointments based on a fairness and compatibility score metric. We ensure optimal time usage by using micropayments to bill the patient per minute and not per hour, and consequently the doctors are able to see more patients in an hour than have idle time between appointments. The micropayments system is made possible by an innovative way of using blockchain.

In our project, we use Polar, an open-source platform that uses the lightning network to create instant micropayments between a patient and a doctor. The lightning network Polar scales blockchains and authorizes instant payments by keeping the majority of transactions off-chain, and utilizes the security of the existing blockchain system as an arbitration layer.

How we built it

First, the patients and doctors set up profiles on our system. Then, the patient requests an appointment by specifying their condition, availability and insurance or budget. Doctors are able to see appointment requests and then are able to pick them up according to their convenience. The system then automates the appointment scheduling and payment mechanism.

We accomplish this by using payment channels, where two parties will commit funds to the payment channel and pay each other by updating the redeemable balance by either party in the channel. This is a fast process and helps users avoid needing a block confirmation before services can be paid for. Payment channels are secure since any attempt to cheat the agreed-upon balance in the channel will result in forfeiture of funds by the liable party. The use of off-chain payments allows for micropayments and small-value transactions with very low fees, for which the on-chain transaction fees would be too expensive to be worth using. Furthermore, the Lightning Network allows for efficient payments as they can be made nearly as quickly as packets can be sent.

When a user sets up a scheduling appointment with a doctor of their choice, an outgoing channel is immediately made with the recipient as the doctor. When the outgoing channel is created, an initial deposit will be taken from the patient and stored in the channel. Depending on how long the patient's appointment with the doctor is, the doctor will create an invoice with the amount of their choice after the appointment ends. The patient will then pay the invoice from the money they had deposited, and the channel will be subsequently closed. Once the channel has closed the doctor will immediately receive the funds from the channel, and the patient will be returned whatever is left of their initial deposit.

Challenges we ran into

Throughout the course of building the payment system, there were countless errors we were getting when setting up the environment for each node. After troubleshooting, the error was found and fixed, allowing the payment system to work perfectly.

Accomplishments that we're proud of

A working prototype

What we learned

micropayments multimodal payment channels

Open Source Software Used

Polar https://github.com/jamaljsr/polar Expo https://github.com/expo

What's next for RapidCare

field testing

Built With

Share this project:

Updates