Intro
Having an application that provides major convenience in anything about health information seems to still be absent in current days. What MedReferral does is an attempt to compile all these information & actionable searchability into one application providing user a Convenience-as-a-Service application. The features implemented are just a few of the many possible services this application can provide later on in production.
Target Group:
- All users who seek any information regarding healthcare, whether its finding medicines, finding clinics, doctors, etc.
- Doctors, clinics, products who desire gaining searchability.
Impact?
- Serves Malaysia's 33 million population with relevant informed data to better patients decision making & providing better searchability and connectivity between doctors, medicines, and etc. to genuine patients.
MedReferral - Project Overview
Inspiration
MedReferral was inspired by the critical gap in healthcare navigation where patients struggle to find appropriate medical care and medications efficiently. The traditional approach of searching doctors by broad specialties like "cardiology" or "orthopedics" often leads to mismatched specialist-patient relationships, resulting in delayed or suboptimal treatment. Additionally, patients face significant challenges navigating the complex pharmaceutical landscape, where identical medications exist under numerous brand names with varying availability and pricing across different pharmacies.
What it does
MedReferral is a comprehensive healthcare navigation platform that provides three core functionalities:
Interactive Facilities Finder: Locates hospitals, clinics, pharmacies, doctors, and dentists across Malaysia using real-time mapping with advanced filtering by facility type, specialty, and location. The system features geolocation support and distance calculations to help users find the nearest appropriate care.
Advanced Medicine Discovery: Provides access to Malaysia's complete NPRA pharmaceutical database with intelligent multi-field search capabilities. Users can search by product name, registration number, company, or active ingredient, with advanced filtering by status, MDC code, registration date, and therapeutic category.
Smart Product Analysis: Enables side-by-side comparison of medicines with customizable scoring criteria, real-time pricing integration from Watsons Malaysia pharmacy, and saved product management for tracking favorites and price changes over time.
How we built it
Backend Architecture: Built with Node.js and Express.js, featuring a RESTful API with SQLite database using Better-SQLite3 for optimal performance. The system incorporates real-time web scraping using Puppeteer with stealth capabilities for Watsons Malaysia pharmacy integration, with intelligent caching via Node-cache to reduce external API calls.
Frontend Implementation: Developed with React 19 and TypeScript for type safety, using Vite for fast development and optimized builds. The interactive mapping utilizes Leaflet and React-Leaflet with MarkerCluster for displaying healthcare facilities, while Lucide React provides modern UI icons.
Database Design: Implemented a normalized SQLite schema with comprehensive indexing for fast queries. The database stores over 10,000 Malaysian pharmaceutical products from official NPRA data, with automated import, validation, and backup systems ensuring data integrity.
Data Integration: Established robust data pipelines that automatically download and process pharmaceutical products from Malaysia's official government data source, with comprehensive logging and error handling for reliable data synchronization.
Challenges we ran into
Web Scraping Complexity: Implementing reliable web scraping for Watsons Malaysia required sophisticated techniques including stealth plugins, rate limiting, and intelligent caching to handle anti-bot measures while maintaining data freshness.
Database Performance: Processing and optimizing the 10,000+ record pharmaceutical database required careful schema design with proper indexing strategies to ensure sub-second response times across all search operations.
Real-time Data Integration: Balancing the need for current pricing and availability data with rate limits and potential blocks from external pharmacy websites required implementing sophisticated caching and fallback strategies.
Cross-platform Compatibility: Ensuring consistent functionality across different operating systems and browsers required extensive testing and careful handling of platform-specific APIs, particularly for geolocation and mapping features.
Accomplishments that we're proud of
Complete National Coverage: Successfully built Malaysia's most comprehensive healthcare database, integrating official NPRA pharmaceutical data with interactive mapping of medical facilities nationwide, providing unparalleled healthcare accessibility.
Intelligent Search System: Developed sophisticated multi-field search with advanced filtering capabilities that delivers highly relevant results in milliseconds, significantly improving the user's ability to find specific medications and healthcare providers.
Real-time Price Intelligence: Implemented successful real-time pricing integration that provides current medicine costs and availability from Watsons Malaysia, helping users make informed decisions about their healthcare expenses.
Professional Healthcare Interface: Created an intuitive, professional-grade user interface with responsive design that makes complex healthcare navigation accessible to users of all technical abilities while maintaining HIPAA-level data privacy standards.
What we learned
Healthcare Data Complexity: Gained deep understanding of the pharmaceutical industry's complexity, including brand-generic relationships, registration processes, and the critical importance of accurate, up-to-date medical information for patient safety.
Performance Optimization: Mastered database optimization techniques for large-scale healthcare data, learning how to balance normalization with performance requirements for real-time search applications.
Web Scraping Ethics: Developed expertise in ethical web scraping practices, implementing respectful data collection methods that balance user needs with website terms of service and rate limitations.
User-Centered Healthcare Design: Learned the importance of designing healthcare applications that address real patient pain points, focusing on clarity, accessibility, and reducing the anxiety associated with medical decision-making.
What's next for MedReferral
AI-Powered Symptom Analysis: Implement machine learning algorithms to analyze patient symptoms and suggest appropriate specialists, moving beyond traditional specialty-based matching to provide more personalized healthcare recommendations.
Prescription Image Recognition: Develop OCR capabilities to automatically extract medication information from prescription photos, enabling instant identification of generic equivalents and alternative treatments.
Expansion to Southeast Asia: Scale the platform to include pharmaceutical and healthcare facility data from neighboring countries, creating a regional healthcare navigation network for improved medical tourism and cross-border care.
Enhanced Safety Features: Implement comprehensive drug interaction checking and allergy alerts, creating an intelligent safety layer that warns users about potential medication conflicts and provides clear explanations in simple language.
Log in or sign up for Devpost to join the conversation.