How shalinigpt/healthcare works
The “Patient 360” project is a blockchain-based healthcare record management system, built on the Ethereum platform. It is designed to manage and retrieve patient records and associated medical documents in a distributed, secure manner using smart contracts and the IPFS (InterPlanetary File System) for storing immutable documents like prescriptions, lab reports, and X-rays.
Project Type and Overall Purpose
• This is a full-stack decentralized application (DApp) that leverages Ethereum blockchain smart contracts for patient and medical record management.
• The Node.js application code (files such as Patient360.js, app.js, mine.js) interacts with the Ethereum blockchain.
• IPFS is integrated for storing non-blockchain data (medical documents) referenced in the blockchain via hexadecimal hashes.
File Structure
• Top-level files include Patient360.js, app.js, mine.js, and g1.json (likely a configuration or deployment file).
• The data folder contains subdirectories for geth, indicating that a local Ethereum node is used (through the Geth client) for blockchain operations.
• The presence of node_modules emphasizes that Node.js is the underlying runtime for executing blockchain interaction logic.
• Readme.txt (or README content provided) reveals the purpose, smart contract functions, and the interaction with IPFS.
Main Components
a. Blockchain Layer (Ethereum):
– Represent the Ethereum network, specifically noting the use of Geth.
– Include components such as the blockchain ledger, which maintains smart contract state and transaction history.
– List smart contract functionalities like addPatient, getPatient, addMedicalRecord, getMedicalRecord, and getMedicalRecordDetails.
b. Application (Node.js Back-End):
– Nodes running Patient360.js, app.js, and mine.js that invoke the smart contract methods.
– Indicate the interface that sends transactions and queries to the Ethereum blockchain.
c. IPFS Storage Component:
– A separate component for IPFS where medical documents (like prescriptions and lab reports) are stored.
– Show that the smart contract stores the IPFS hash for each document.
d. Data Storage and Ethereum Node (Geth):
– Include the geth node and its data directories to represent the actual backing of the blockchain state.
– This illustrates how data persists on the blockchain network maintained by geth.
Relationships and Interactions
• That when a new patient is added or a medical record is created, the Node.js application sends a transaction to the blockchain.
• Interaction between the geth node (Ethereum client) and the Node.js application, highlighting how blockchain transactions are processed and stored.
Architectural Patterns/Design Principles
• Separation of concerns:
– Smart contract layer handles immutable record storage.
– Application layer (Node.js) manages business logic and interacts with both the blockchain and IPFS.
– Data integrity and security are enforced by the blockchain whereas data storage efficiency is managed via IPFS.
• Use of decentralization to ensure distributed data validation and storage.