Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PharmaLedger

A Centralized Blockchain-Enabled Anti-Counterfeit Pharmaceutical Tracking Platform for India

PharmaLedger is a pioneering blockchain-based web platform designed to combat the rampant counterfeit medicine crisis in India through real-time tracking, verification, and transparency across the entire pharmaceutical supply chain. It empowers manufacturers, pharmacies, and citizens to collaboratively ensure medicine authenticity, safety, and accountability by creating a unified, trustworthy ecosystem for pharmaceutical distribution.


Table of Contents


The Problem

India faces a critical healthcare crisis stemming from the proliferation of counterfeit medicines in the pharmaceutical supply chain. The counterfeit medicine industry is extensive and deeply embedded, posing severe risks to public health and safety across the nation.

Key Challenges:

  • Counterfeit medicines constitute a serious and growing public health crisis in India.
  • Between 12% to 25% of pharmaceuticals in India are estimated to be fake or substandard.
  • Counterfeit and substandard drugs have surged by nearly 50% since the COVID-19 pandemic, now making up around 15% of all medicines sold.
  • These fake medicines can be ineffective, harmful, or fatal, leading to treatment failures and increased antimicrobial resistance.
  • Lack of Centralization: No unified platform exists for tracking and detecting counterfeit medicines across India's fragmented pharmaceutical distribution network.
  • Consumer Vulnerability: Citizens cannot easily verify the authenticity of medicines they purchase, leading to consumption of potentially harmful counterfeit products.
  • Pharmacy Accountability: Pharmacies have no systematic way to verify the authenticity of batches they receive, risking unintentional distribution of counterfeit medications.
  • Manufacturer Credibility: Genuine manufacturers struggle to differentiate themselves and build trust with consumers in a market flooded with fakes.
  • Supply Chain Opacity: The journey of a medicine from manufacturer to consumer lacks transparency, making it impossible to trace or identify where counterfeits enter the system.
  • Regulatory Enforcement: Enforcement is often reactive with insufficient penalties, allowing counterfeit drug production and distribution to persist.
  • Economic Impact: This problem imposes heavy economic losses on legitimate pharmaceutical manufacturers and healthcare systems across India.

The Solution

PharmaLedger addresses these challenges through a comprehensive, three-tier digital ecosystem that brings transparency, accountability, and trust to pharmaceutical distribution using blockchain technology.

How PharmaLedger Works:

1. Manufacturer Registration & Verification Manufacturers register on the platform by providing genuine credentials (company name, manufacturing license number, issuing authority, expiry date, address, and other details). PharmaLedger team members manually verify this data against the State FDA database. Upon verification, manufacturers receive unique ID and password credentials to access their personalized dashboard.

2. Batch Data Upload & Management Verified manufacturers upload batch data in CSV format containing mandatory fields (batch number, medicine name, expiration date, production date, quantity, etc.). The backend processes these uploads and stores the data in a centralized MySQL database. As the platform scales, manufacturers gain the ability to organize and manage their batch data within the platform, functioning as a cloud-based repository for their pharmaceutical inventory.

3. Pharmacy Verification & Status Tracking Pharmacies register and undergo similar FDA verification. Upon receiving medicine shipments, pharmacies upload Excel files containing batch numbers. The backend automatically scans each batch number against the database and generates a status-marked Excel sheet with color-coded indicators:

  • Green: Authentic and within expiration date
  • Red: Counterfeit or not found in database
  • Orange: Expired or approaching expiration

The system dynamically links each scanned batch to the pharmacy name, creating an auditable trail of the medicine's distribution journey.

4. Citizen Authentication & Barcode Scanning Citizens access a simple, intuitive homepage where they can verify medicine authenticity through two methods:

  • Manually entering the batch number
  • Scanning the barcode on the medicine package

The system instantly displays whether the medicine is authentic, counterfeit, or expired, empowering consumers to make safe purchasing and consumption decisions.

Key Benefits:

  • Trust & Transparency: A centralized, blockchain-backed, government-aligned system builds credibility and public confidence.
  • Accountability: Every stakeholder—from manufacturer to pharmacy to consumer—can trace and verify the medicine's authenticity.
  • Brand Enhancement: Manufacturers and pharmacies build positive brand image by participating in a recognized anti-counterfeit ecosystem.
  • Public Health Impact: Reduces counterfeit medicine circulation, improving treatment outcomes and public safety across India.

Why PharmaLedger (Show Stopper)

Unique Selling Points:

  • Blockchain-Powered Trust: Leveraging immutable blockchain technology makes PharmaLedger a highly secure and transparent platform, eliminating reliance on any single centralized authority.
  • End-to-End Medicine Traceability: Unique batch-level tracking connects manufacturers, pharmacies, and citizens, creating a full, auditable supply chain trail.
  • Real-Time, Accessible Verification: Instant barcode scanning and batch number checks empower consumers to verify medicine authenticity before purchase or consumption.
  • Regulatory Alignment & FDA Integration: Manual and automated verification processes ensure registrations and batch data are cross-checked against official State FDA records, enforcing authenticity at the source.
  • Brand & Market Confidence: Manufacturers and pharmacies build trust and enhanced reputation by participating in a recognized, government-aligned system.
  • Scalable Cloud Architecture: Designed to serve the entire Indian pharmaceutical ecosystem with potential for future integration with healthcare stakeholders and international expansion.
  • Proven to Reduce Counterfeit Circulation: By empowering all stakeholders with accurate, verifiable data, PharmaLedger directly disrupts counterfeit distribution networks.

Feasibility

PharmaLedger is not only visionary but also practically implementable given current technologies, industry trends, and stakeholder readiness.

Feasibility Factors:

  • Technological Readiness: Blockchain platforms and cloud databases required for PharmaLedger are mature, widely adopted, and can be integrated seamlessly with existing pharmaceutical IT systems.
  • Regulatory Support: Aligns with ongoing government initiatives to combat counterfeit drugs and digitize healthcare, increasing institutional buy-in and compliance enforcement.
  • Industry Collaboration: PharmaLedger is backed by a consortium of leading pharmaceutical companies and healthcare organizations, facilitating data sharing and standardization.
  • User Accessibility: Web and mobile-friendly interfaces ensure easy adoption by manufacturers, pharmacies, and citizens across diverse technological literacy levels.
  • Cost-Efficiency: Reduces losses from counterfeit medicines and fraud, offering significant ROI to stakeholders through improved supply chain integrity and consumer trust.
  • Proof of Concept: Existing pilot implementations and blockchain-based healthcare projects demonstrate practical viability and effectiveness.

Scalability

PharmaLedger is designed to be highly scalable, suitable for the vast and diverse pharmaceutical ecosystem of India and beyond.

Technical Scalability:

  • Cloud-native and modular architecture allows dynamic resource allocation to handle increasing users, batch data, and transactions.
  • Permissioned blockchain frameworks ensure secure, fast consensus even as data volume grows.
  • Automated CSV/Excel batch processing pipelines minimize manual bottlenecks enabling rapid onboarding of manufacturers and pharmacies.

Operational Scalability:

  • The system supports hierarchical user management and role-based access to efficiently handle thousands of manufacturers, pharmacies, and citizen users.
  • Integration with state FDA databases and growing regulator partnerships streamlines verification for new participants.

Contextual Scalability:

  • The platform is adaptable across diverse regional languages, regulatory requirements, and healthcare practices found across India's states.
  • Scalable enough to incorporate additional stakeholders like distributors, hospitals, or international collaborators.

Market Scalability:

  • Demonstrates a clear relative advantage over existing manual and fragmented anti-counterfeit efforts, facilitating broad adoption.
  • Built on proven and mature technologies with support from leading pharmaceutical industry partners ensuring credibility and user trust.

Future Proofing:

  • Designed to support emerging features like real-time analytics, mobile apps, AI-based counterfeit detection, and blockchain integration upgrades, ensuring long-term scalability and relevance.

Features

Manufacturer Features:

  • Secure registration with FDA credential verification
  • CSV batch data upload with mandatory field validation
  • Automated batch processing and database storage
  • Cloud-based batch data organization and management
  • Dashboard for tracking uploaded batches and distribution status
  • Brand image enhancement through participation in centralized system

Pharmacy Features:

  • Secure registration with FDA verification
  • Excel file upload for batch authenticity verification
  • Automated status column generation (authentic, counterfeit, expired)
  • Download status-marked Excel sheets for inventory management
  • Manual batch number lookup for random verification
  • Dynamic pharmacy attribution to batches for supply chain traceability
  • Pharmacy reputation building through verified participation

Citizen Features:

  • Simple, intuitive homepage interface
  • Manual batch number entry for verification
  • Barcode scanning capability for quick authentication checks
  • Real-time medicine status (authentic, counterfeit, expired)
  • No registration required; direct access for public safety

System Features:

  • Centralized MySQL database for batch and registration data
  • Automated CSV/Excel processing with validation
  • Real-time status tracking and updates
  • Complete supply chain audit trail
  • Scalable cloud architecture for nationwide expansion
  • Blockchain-based immutable ledger for data integrity

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    PharmaLedger Platform                    │
├─────────────────────────────────────────────────────────────┤
│                      Frontend (Web UI)                       │
│  - Registration Pages  - Dashboards  - Citizen Interface    │
├─────────────────────────────────────────────────────────────┤
│                   Backend (Python/Flask)                     │
│  - CSV/Excel Processing  - Authentication  - Verification   │
├─────────────────────────────────────────────────────────────┤
│          Blockchain Layer (Immutable Ledger)                │
│     - Transaction Recording  - Data Integrity Validation    │
├─────────────────────────────────────────────────────────────┤
│                    MySQL Database                            │
│  - Manufacturer Data  - Pharmacy Data  - Batch Records       │
├─────────────────────────────────────────────────────────────┤
│              State FDA Verification (Manual)                 │
│              PharmaLedger Team Validation                    │
└─────────────────────────────────────────────────────────────┘

Getting Started

Prerequisites

  • MySQL 5.7 or higher
  • Python 3.x with Flask
  • Web server (Apache/Nginx)
  • Modern web browser for user interface
  • Blockchain framework (permissioned blockchain)

Installation

  1. Clone the Repository

    git clone https://github.com/pharmaledger/pharmaledger.git
    cd pharmaledger
  2. Set Up MySQL Database

    • Create a new database for PharmaLedger
    • Configure database credentials in the backend config file
    • Run database initialization scripts
  3. Install Backend Dependencies

    pip install -r requirements.txt
  4. Configure Backend

    • Update database connection string with MySQL credentials
    • Set up Flask environment variables
    • Configure file upload paths for CSV/Excel processing
    • Initialize blockchain node configuration
  5. Deploy Frontend

    • Deploy HTML/CSS/JavaScript files to web server
    • Update backend API endpoints in frontend configuration
  6. Establish FDA Verification Workflow

    • Set up a process for PharmaLedger team to verify registrations
    • Document State FDA mapping procedures
  7. Start the Application

    python app.py

Usage

For Manufacturers

  1. Visit the registration page and submit genuine credentials
  2. Wait for PharmaLedger team verification (mapping with State FDA)
  3. Receive unique ID and password via email/SMS
  4. Log in to manufacturer dashboard
  5. Upload batch data in CSV format with required fields
  6. Monitor batch status and distribution through dashboard
  7. Organize batch data within platform for inventory management

For Pharmacies

  1. Complete registration with genuine pharmacy credentials
  2. Await FDA verification and credentialing
  3. Log in to pharmacy dashboard
  4. Upload received medicine batch Excel files
  5. Download status-marked Excel with authentic/counterfeit/expired indicators
  6. Manually verify individual batches using batch number lookup
  7. Track pharmacy attribution to batches for supply chain visibility

For Citizens

  1. Visit PharmaLedger homepage
  2. Choose verification method:
    • Enter batch number manually, OR
    • Scan barcode on medicine package
  3. Instantly view medicine status (authentic/counterfeit/expired)
  4. Make informed purchasing and consumption decisions

Technologies

Component Technology
Backend Python, Flask
Database MySQL with SQLAlchemy ORM
Blockchain Permissioned Blockchain Framework
Frontend HTML5, CSS3, JavaScript
Data Formats CSV (upload), Excel (processing)
Server Apache/Nginx
Authentication Username/Password with role-based access

Stakeholder Roles

Stakeholder Access Level Primary Functions
Manufacturer Full dashboard access Register company, upload batches, manage data, view analytics
Pharmacy Full dashboard access Register store, verify batches, download reports, track status
Citizen Public homepage only Check batch authenticity, scan barcodes, verify medicine status
PharmaLedger Team Admin panel access Verify registrations, map FDA data, manage platform
Government/FDA Read-only analytics Monitor system integrity, verify stakeholders

Future Enhancements

  • Real-time Analytics Dashboard: Detailed insights into counterfeit patterns and supply chain trends
  • Mobile Application: Native iOS/Android apps for pharmacies and consumers
  • Advanced Blockchain Integration: Full immutable ledger for additional supply chain security
  • API Integration: Direct integration with pharmacy management systems and ERP software
  • QR Code Generation: Automated QR code generation for manufacturer batches
  • Government Recognition: Formal government certification and regulatory alignment
  • Ecosystem Expansion: Integration with additional healthcare stakeholders (hospitals, distributors, wholesalers)
  • AI-Powered Detection: Machine learning models to detect suspicious patterns and flag potential counterfeits
  • Multi-language Support: Regional language interfaces for broader accessibility
  • International Expansion: Support for cross-border pharmaceutical tracking

Contributing

We welcome contributions from developers, healthcare professionals, and passionate individuals committed to solving India's counterfeit medicine problem.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -m 'Add YourFeature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Open a Pull Request with clear description of changes

Contribution Guidelines

  • Follow PEP 8 for Python code
  • Use meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure backward compatibility

License

This project is licensed under the MIT License. See LICENSE file for details.


Contact

Project Lead: Pranesh Jha Email: Praneshjha1038@gmail.com Website: www.pharmaledger.in
GitHub: https://github.com/CureCode_Pharmaledger

For questions, suggestions, or partnership inquiries, please reach out through any of the channels above.


Acknowledgments

  • All manufacturers and pharmacies supporting this initiative
  • State FDA authorities for regulatory guidance
  • Citizens committed to safe medicine consumption
  • Contributors and supporters of transparent pharmaceutical systems
  • Industry partners and blockchain technology providers

Together, we're building a safer, more transparent pharmaceutical future for India. Join PharmaLedger today.

About

PharmaLedger is a digital platform fighting counterfeit drugs by tracking each medicine batch from manufacturer to consumer. Using unique batch IDs and QR codes, it lets stakeholders verify and record movements. Consumers can scan the QR code on packaging to instantly confirm the product’s authenticity and origin.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages