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.
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.
- 🔌 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
- MetaMask installed in your browser
- Testnet ETH (Sepolia) — get from Sepolia PoW Faucet
- EHRConsent contract deployed on testnet
(ReplaceCONTRACT_ADDRESSandABIin/public/index.js)
git clone https://github.com/nyan-dev/ehr-mvp-ui.git
cd ehr-mvp-ui- Install dependencies (If you add npm packages later)
npm install- Configure contract details Edit /public/index.js:
const CONTRACT_ADDRESS = "0xYourDeployedAddress";
const CONTRACT_ABI = [ /* Your Contract ABI JSON */ ];- Run locally You can simply open public/index.html in your browser, or serve locally for hot reload:
npm install -g serve
serve public- 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
| 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.