Undergraduate Thesis Project (Skripsi S1)
Blockchain-Based Data Integrity System for Electronic Medical Records
Compliance with PMK No. 24/2022 (Indonesian Health Regulation)
Registered with Direktorat Jenderal Kekayaan Intelektual (DJKI)
- Type: Program Komputer (Computer Software)
- Certificate Number: EC002025168178
- Registration Number: 001008438
- Title: Implementasi Teknologi Blockchain untuk Pengelolaan Rekam Medis Elektronik Pasien Instalasi Gawat Darurat
- Registration Date: October 31, 2025
- Creators: Frandi Andika
- Copyright Holders: Frandi Andika, Daniel Febrian Sengkey, Alwin M. Sambul.
- Protection Period: 50 years from first publication
- Legal Basis: UU No. 28 Tahun 2014 tentang Hak Cipta
This project is officially protected under Indonesian copyright law, demonstrating its innovation and originality in blockchain-based healthcare systems.
A comprehensive Electronic Medical Records (EMR) system that leverages blockchain technology to ensure medical data integrity and immutability. This full-stack application implements a two-tier blockchain architecture where individual clinical data is hashed and stored on the Ethereum blockchain, providing cryptographic verification and tamper-evident audit trails.
- Full-Stack EMR System: Complete patient management, clinical workflows, and medical documentation
- Blockchain Integration: Ethereum smart contracts for data integrity verification
- Two-Tier Architecture:
- TIER 1: Individual clinical data hashing (vital signs, diagnoses, treatments)
- TIER 2: Encounter-level finalization for complete visit integrity
- Multi-Role Access: Admin, Doctor, and Nurse roles with RBAC
- Healthcare Compliance: Designed according to Indonesian health regulations (PMK No. 24/2022)
- Edit Audit Trail: Complete version history with hash chaining for legitimate data corrections
Hybrid architecture: React frontend, Node.js/Express backend with PostgreSQL, and Ethereum smart contracts for cryptographic hash verification
Two-tier blockchain implementation: TIER 1 hashes individual clinical data, TIER 2 finalizes complete encounter integrity
π₯οΈ View User Interface & Features (Click to expand)
Doctor Dashboard - Overview & Quick Actions
Patient Management - Registration & Data
Create New Encounter - Patient Visit Initialization
Clinical Documentation - Vital Signs, Diagnosis, Treatments
Admin Dashboard - System Monitoring & Blockchain Management
Blockchain Verification - Encounter Finalization & Hash Comparison
Backend Hash Generation - Console Logs Showing Cryptographic Process
skripsi-code/
βββ backend-emr/ # Backend API (Node.js + Express)
β βββ emr-api/ # RESTful API with blockchain integration
βββ frontend-emr/ # Frontend Application (React + Vite)
βββ blockchain/ # Smart Contracts (Solidity + Hardhat)
βββ docs/ # Documentation and thesis materials
| Component | Technology Stack | Purpose |
|---|---|---|
| Backend API | Node.js, Express.js, Supabase (PostgreSQL) | RESTful API, authentication, clinical workflows |
| Frontend | React 18, Vite, Tailwind CSS, Material Tailwind | User interface for multi-role access |
| Blockchain | Solidity, Hardhat, Ethers.js, Sepolia Testnet | Smart contracts for data integrity |
| Database | PostgreSQL (via Supabase) | Patient records, clinical data, audit trails |
- Node.js v18+ and npm
- PostgreSQL database (or Supabase account)
- Ethereum Wallet with Sepolia testnet ETH (for blockchain features)
- Alchemy/Infura API key (for Ethereum RPC access)
-
Clone the repository
git clone https://github.com/Frax404NF/emr-blockchain-system.git cd emr-blockchain-system -
Setup Backend API
cd backend-emr/emr-api npm install cp .env.example .env # Edit .env with your credentials npm run dev
-
Setup Frontend
cd frontend-emr npm install cp .env.example .env # Edit .env with backend API URL npm run dev
-
Setup Blockchain (Optional for development)
cd blockchain npm install cp .env.example .env # Edit .env with your wallet private key and Alchemy API key # For local development npx hardhat node # For Sepolia testnet deployment npx hardhat run scripts/deploy-sepolia.js --network sepolia
Each component has detailed documentation in its respective directory:
- Backend API Documentation - API endpoints, database schema, blockchain integration
- Frontend Documentation - Component structure, routing, state management
- Blockchain Documentation - Smart contract architecture, deployment guides
- Modular Architecture: Clean separation of concerns (MVC pattern)
- Modern JavaScript: ES6+ with async/await, arrow functions
- Comprehensive Error Handling: Try/catch blocks with detailed logging
- Security Best Practices: Environment-based configuration, no exposed credentials
- Well-Documented: JSDoc comments for critical functions and smart contracts
- RESTful API Design: Standard HTTP methods and status codes
- Never commit
.envfiles - They contain sensitive credentials - Rotate credentials before going public if previously exposed
- Use test networks - This project uses Sepolia testnet, not mainnet
- Private keys - Keep blockchain private keys secure; they control wallet funds
- No production data - This is a thesis/educational project
Each component requires environment variables. Copy .env.example to .env and configure:
- Backend: Database credentials, JWT secret, blockchain RPC URL
- Frontend: Backend API URL
- Blockchain: Wallet private key, Alchemy/Infura API key
cd backend-emr/emr-api
npm test # Run all tests
npm run test:unit # Unit tests only
npm run test:integration # Integration tests onlycd frontend-emr
npm test # Run tests
npm run test:coverage # With coverage reportcd blockchain
npx hardhat test # Run all contract tests
npx hardhat coverage # Coverage report- Title: Blockchain-Based Data Integrity System for Electronic Medical Records
- Focus: Healthcare data security using cryptographic hashing and smart contracts
- Compliance: Indonesian Health Ministry Regulation (PMK No. 24/2022)
- Innovation: Two-tier blockchain architecture for clinical data verification
- Two-tier blockchain architecture for granular data integrity
- Edit audit trail system with hash chaining for legitimate corrections
- Healthcare regulation compliance mapping to technical implementation
- Performance optimization for clinical workflows with blockchain overhead
- Node.js 18.x, Express.js 4.x
- Supabase (PostgreSQL)
- JWT Authentication, Joi Validation
- Ethers.js for blockchain interaction
- React 18, Vite, React Router v7
- Tailwind CSS, Material Tailwind
- Axios, React Context API
- Hot Toast for notifications
- Solidity ^0.8.28
- Hardhat development environment
- Ethereum Sepolia Testnet
- Alchemy RPC provider
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright Protection: This software is registered with DJKI Indonesia (EC002025168178) and protected under UU No. 28 Tahun 2014 tentang Hak Cipta for 50 years from publication.
- Ethereum Sepolia Testnet: https://sepolia.etherscan.io/
- Sepolia Faucet: https://sepoliafaucet.com/
- Supabase: https://supabase.com/
- Hardhat Documentation: https://hardhat.org/
This is an educational/research project developed as part of an undergraduate thesis. It is NOT intended for production use with real patient data. The system demonstrates concepts of blockchain integration with healthcare systems but would require additional security audits, compliance certifications, and regulatory approvals for real-world deployment.
This is an academic project, but suggestions and feedback are welcome! Please note this is primarily for thesis/portfolio purposes.
This repository is made public for several important reasons:
- π Educational Resource: To serve as a learning reference for students and developers interested in blockchain integration with healthcare systems
- Knowledge Sharing: Contributing to the Indonesian tech community by sharing implementation patterns and solutions
- Peer Review: Inviting constructive feedback, suggestions, and code reviews from the developer community
- Collaboration Opportunity: Open to discussions, improvements, and potential collaborations on blockchain healthcare solutions
- Academic Transparency: Demonstrating real-world application of blockchain technology in compliance with healthcare regulations
- Portfolio Showcase: Highlighting capabilities in full-stack development, blockchain integration, and system architecture
We believe in open-source education and collaborative learning. If you find this project helpful, have suggestions for improvements, or spot any issues, please feel free to:
- Open an issue for bugs or suggestions
- Submit a pull request for improvements
- Star the repository if you find it valuable
- Share with others who might benefit from it
Note: While feedback is welcome, please remember this is a thesis project completed in 2025 and represents work done within academic constraints and timelines.
Frandi Andika (Frax404NF)
Undergraduate Computer Science Student
Universitas Sam Ratulangi
Supervisors: Ir. Daniel F. Sengkey, ST, M.Eng., Ir. Alwin M. Sambul, ST, M.Eng, Ph.D.
Last Updated: December 2025
Status: Thesis Project - Educational Use Only






