crystal-pharmacy

byMr V K

FINAL PROMPT (ADVANCED): AI-Powered Pharmacy + Lab Management System (India) Design and develop a complete AI-powered Pharmacy Stock, Billing, and Lab Management System for retail pharmacies, clinics, and diagnostic labs in India, following Indian Pharmacopoeia standards and PCI guidelines. The system must include AI automation, full backend integration, medical database, lab testing module, billing system, and enterprise-level security. --- 1. Core System Requirements Build a full-stack application with: - Web + Mobile compatibility - Fully developed backend for every feature - Real-time database synchronization - Secure cloud infrastructure --- 2. Authentication & User System - Login / Signup system - Sign in with Google (Social Login) - Role-based access: - Owner - Pharmacist - Staff - Show user profile (top-right corner of dashboard) --- 3. UI/UX Design - Clean, modern UI (like Tata 1mg / PharmEasy) - Dark Mode + Light Mode toggle - Fast navigation with bottom menu: Home | Stock | Billing | Scan | Symptoms | Lab | Settings --- 4. AI Medicine Recognition System Allow stock entry using: - Camera scan (AI OCR) - Image upload (gallery) - Barcode scan - QR code scan - Manual entry Extract automatically: - Brand Name - Generic Name - Batch Number - MFG Date - EXP Date - Manufacturer Name - MRP - Drug Schedule Allow editing after detection. --- 5. AI Purchase Bill Scanner Scan distributor bills (camera / upload): Extract and add multiple medicines at once: - Medicine name - Batch - Quantity - MRP - EXP Date Auto-update stock. --- 6. Pharmacy Drug Database (20,000+ Medicines) Include: - 20,000+ medicines - 3,000+ salts - 2,000+ manufacturers Each drug must have: - Brand name - Generic (salt) - Manufacturer - Strength - Dosage form - Schedule category --- Drug Details Page When tapped: - Show ethical (branded) medicines - Show generic alternatives - Show same salt options - Show manufacturer info - Show usage, side effects --- 7. Drug Schedule Classification (Highlighted) Highlight: - Schedule H - Schedule H1 - Schedule X - NRx - OTC Use color indicators in stock & billing. --- 8. Stock Management System Features: - Multi-entry methods (AI, manual, barcode) - Batch-wise tracking - Expiry tracking - Manufacturer tracking --- Alerts - Expiry alerts (90/60/30 days) - Expired drugs column - Low stock column --- 9. Advanced Filtering Filters: - MFG date - EXP date - Schedule - Batch - Supplier - Low stock - Expired / near expiry --- 10. Billing System Features: - Fast search - Barcode billing - Batch selection - Expiry validation - GST calculation - Discount --- Billing Requirements - Enter: - Patient Name - 10-digit Mobile Number - Generate invoice - Options: - Print bill - Download PDF --- 11. Reports & Export System All data must be downloadable from Settings menu: - Stock data → Excel (.xls) - Billing data → PDF / Excel - Reports → Exportable --- 12. Interactive Dashboard Dashboard must include: - Real-time analytics - Date-range selector - Exportable reports Show: - Total stock - Sales - Low stock - Expiry alerts --- 13. Symptom → Medicine AI Add “Symptoms” button (bottom menu) User selects symptoms: - Fever - Headache - Body pain - Cold - Cough - Allergy - Acidity - Vomiting - etc. AI suggests medicines. Display warning: "This is only a suggestion. Consult a doctor." --- 14. Lab Test Management System Create a complete lab module. --- Lab Test Features - Preloaded tests: - CBC - SGOT - SGPT - Lipid Profile - Blood Sugar - Add / Edit / Delete tests - Add new test button --- Test Structure Each test includes: - Predefined parameters (auto-fetched): Example CBC: - WBC - RBC - Platelets - Hemoglobin - Reference ranges (editable) --- Patient Entry Before test: - Patient Name - Age - Sex - Referred By - Date (auto-filled) --- Test Input Methods 1. Manual entry 2. AI scanning system: - Camera capture - Image upload AI extracts test values automatically. --- 15. Backend Architecture (VERY IMPORTANT) Every feature must be connected to backend. --- Backend Stack - Node.js / FastAPI - PostgreSQL database - Redis caching - Cloud storage --- Backend Must Handle - Authentication - Stock management - Billing - Lab data - AI processing - Reports - Export system --- API Design Create APIs for: - Medicine database - Stock CRUD - Billing - Lab tests - AI OCR processing - Reports --- 16. Security System - JWT authentication - Role-based access - Encrypted database - API security - Backup system - Activity logs --- 17. Advanced AI Modules Include: - AI medicine scanner - AI bill scanner (multi-drug detection) - AI lab report reader - AI symptom → medicine suggestion - AI prescription reader (doctor handwriting recognition) --- 18. Deliverables Required The system must include: - ✔ Ready-to-download 20,000+ medicine dataset (CSV/SQL) - ✔ Full backend API code - ✔ Complete UI wireframe (Tata 1mg level) - ✔ AI prescription reader module --- FINAL GOAL Build a complete intelligent healthcare platform that integrates: - Pharmacy management - Billing system - Lab diagnostics - AI automation - Medical database - Secure backend system This system should be production-ready, scalable, and compliant with Indian healthcare standards.

LoginStockBillingReports
Login

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 6

System Requirements Document (SRD)

Project Name: crystal-pharmacy

1. Introduction

The crystal-pharmacy project is an AI-powered Pharmacy Stock, Billing, and Lab Management System designed for retail pharmacies, clinics, and diagnostic labs in India. This system adheres to Indian Pharmacopoeia standards and PCI guidelines, ensuring compliance with local healthcare regulations.

The platform integrates advanced AI automation, a comprehensive backend, a vast medical database, and enterprise-level security to streamline pharmacy and lab operations. It is tailored to meet the unique needs of the Indian healthcare sector, including multi-language support, GST compliance, and robust role-based access control.

Page 2 of 6

2. System Overview

The crystal-pharmacy system is a full-stack application that provides:

  • Web and Mobile Compatibility: Accessible via web browsers and mobile apps for Android and iOS.
  • AI-Powered Features: Automates stock entry, billing, and lab test management using AI-driven tools.
  • Comprehensive Medical Database: Includes 20,000+ medicines, 3,000+ salts, and 2,000+ manufacturers.
  • Lab Management Module: Supports diagnostic labs with preloaded tests, patient management, and AI-enhanced data entry.
  • Secure Backend: Ensures data integrity, role-based access, and compliance with Indian healthcare standards.
  • Real-Time Analytics: Provides actionable insights through an interactive dashboard.

This system is designed to enhance operational efficiency, reduce manual errors, and provide a seamless user experience for pharmacy owners, staff, and customers.

3. Functional Requirements

As User:

  • I should be able to log in or sign up using email or Google.
  • I should be able to view my profile in the dashboard.
  • I should be able to toggle between light and dark modes.
  • I should be able to search for medicines quickly.
  • I should be able to view medicine details, including brand name, generic alternatives, and manufacturer info.
  • I should be able to generate and download invoices in PDF format.
Page 3 of 6

As Admin:

  • I should be able to manage stock using AI tools like barcode scanning, QR code scanning, and manual entry.
  • I should be able to track expiry dates and receive alerts for near-expiry and expired medicines.
  • I should be able to add, edit, or delete lab tests and their parameters.
  • I should be able to generate reports for stock, billing, and lab tests.
  • I should be able to manage user roles and permissions.

As Pharmacist:

  • I should be able to scan distributor bills and auto-update stock.
  • I should be able to filter stock by expiry date, manufacturer, and low stock.
  • I should be able to process billing with GST calculations and discounts.

4. User Personas

1. Owner

  • Role: Pharmacy or clinic owner.
  • Needs: Comprehensive analytics, stock management, and role-based access control.

2. Pharmacist

  • Role: Handles daily operations like stock entry and billing.
  • Needs: Fast and accurate tools for stock updates and billing.

3. Staff

  • Role: Assists in lab management and customer service.
  • Needs: Easy-to-use interfaces for lab test entry and patient management.
Page 4 of 6

5. Visuals Colors and Theme

Color Palette:

  • Background: #F4F9F9 (Soft Mint White)
  • Surface: #FFFFFF (Pure White)
  • Text: #2C3E50 (Deep Navy Blue)
  • Accent: #1ABC9C (Emerald Green)
  • Muted: #BDC3C7 (Light Gray)

This palette reflects a clean, professional, and calming aesthetic suitable for healthcare applications.

6. Signature Design Concept

Dynamic Medicine Shelf Homepage

The homepage will feature an interactive 3D medicine shelf. Users can "browse" the shelf by swiping or scrolling, with each medicine appearing as a clickable card. When a card is clicked, it flips to reveal detailed information about the medicine, including brand name, generic alternatives, and manufacturer details.

Key Features:

  • 3D Animation: Smooth transitions as users scroll through the shelf.
  • Micro-Interactions: Cards will slightly "tilt" when hovered over, providing a tactile feel.
  • Color Transitions: The background will subtly shift between shades of emerald green and soft mint white as users interact with the shelf.
  • AI Integration: A search bar at the top allows users to type symptoms or scan barcodes, instantly highlighting relevant medicines on the shelf.

This design will make the homepage visually engaging and intuitive, leaving a lasting impression on users.

Page 5 of 6

7. Non-Functional Requirements

  • Performance: The system must handle up to 10,000 concurrent users with minimal latency.
  • Scalability: Must support future expansion, including additional AI modules or database entries.
  • Security: Implement JWT authentication, encrypted databases, and secure APIs.
  • Compliance: Adhere to Indian healthcare standards, including PCI and GST regulations.

8. Tech Stack

Frontend:

  • React for Web
  • React Native for Mobile

Backend:

  • Python
  • FastAPI

Database:

  • MySQL (with Alembic for migrations)

AI Models:

  • GPT 5.4 for user-friendly responses
  • Claude 4.6 Opas for coding-related tasks
  • Google Nano Banana for image generation
Page 6 of 6

AI Tools:

  • Litellm for LLM Routing
  • Langchain

Orchestration:

  • Docker
  • Kubernetes

9. Assumptions and Constraints

  • The system will primarily serve users in India, so it must support INR currency and Indian time zones.
  • Internet connectivity is required for real-time database synchronization and AI processing.
  • The system will not include an AI prescription reader module.

10. Glossary

  • AI OCR: Optical Character Recognition powered by Artificial Intelligence.
  • PCI: Pharmacy Council of India.
  • GST: Goods and Services Tax, applicable in India.
  • JWT: JSON Web Token, used for secure authentication.
  • MFG Date: Manufacturing Date.
  • EXP Date: Expiry Date.
Login design preview
Login: Sign In
Dashboard: View Analytics
Dashboard: View Alerts
Stock: Manage Inventory
Reports: Export Data
Settings: Manage Roles