Skip to content

nyan-dev/ehr-consent-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Context: This is a front-end side project exploring blockchain-based consent management in healthcare. It is not part of the thesis research — the thesis focuses on ML anomaly detection. See related links below.

🏥 ehr-consent-prototype

Minimal web UI for blockchain‑secured Electronic Health Record (EHR) consent management.
One‑page HTML/JS app (ethers.js) to:

  • Connect a wallet (MetaMask)
  • Grant / revoke consent
  • Create / view health records
    via the EHRConsent smart contract.

Designed for testnets (e.g. Sepolia)
Deployable free on Vercel.


🚀 Live Demo

ehr-mvp-ui.vercel.app


📦 Features

  • 🔌 Wallet connect (MetaMask)
  • ✅ Grant / revoke consent on‑chain
  • 📝 Create health records tied to patient address
  • 👀 View stored records directly from blockchain
  • ⚡ Zero backend — fully client‑side

📋 Prerequisites

  • MetaMask installed in your browser
  • Testnet ETH (Sepolia) — get from Sepolia PoW Faucet
  • EHRConsent contract deployed on testnet
    (Replace CONTRACT_ADDRESS and ABI in /public/index.js)

🛠 Getting Started

1. Clone the repo

git clone https://github.com/nyan-dev/ehr-mvp-ui.git
cd ehr-mvp-ui
  1. Install dependencies (If you add npm packages later)
npm install
  1. Configure contract details Edit /public/index.js:
const CONTRACT_ADDRESS = "0xYourDeployedAddress";
const CONTRACT_ABI = [ /* Your Contract ABI JSON */ ];
  1. Run locally You can simply open public/index.html in your browser, or serve locally for hot reload:
npm install -g serve
serve public
  1. Deploy to Vercel
vercel --prod

🧩 Tech Stack ethers.js

HTML + Vanilla JS

Vercel for hosting

📚 Usage Flow Connect Wallet Authorizes MetaMask to interact with the contract

Grant Consent Allows a clinician address to view records

Create Record Saves hashed health record metadata on‑chain

View Records Fetches list of records from blockchain for connected account

📄 License MIT License — see LICENSE for details.

🙌 Acknowledgements Ethereum community for testnets & tooling

Open‑source contributors


Related Repositories

Repo Role
This repo Front-end side project — blockchain EHR consent UI
Anomaly-Detection-Ensemble ML thesis core — unsupervised anomaly detection in Medicare claims
Anomaly-Detection-IF-LOF-OCSVM Baseline algorithm comparison (IF, LOF, OCSVM)

For a 2–3 minute walkthrough of the live demo, see DEMO.md.

About

Front-end prototype for blockchain-based EHR consent management. HTML/JS + ethers.js + EHRConsent smart contract on Ethereum testnet. Skeleton/demo only.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors