Inspiration
Clinical trial recruitment faces significant challenges around accessibility and trust. We observed that the current system often acts as a gatekeeper, limiting participation and resulting in a lack of diversity among trial participants. Researchers struggle to identify and reach patients with specific demographics or medical profiles, while patients remain skeptical about how their sensitive medical data will be used and whether they'll be fairly compensated for their contribution. Building on principles similar to our Synapse project, we recognized an opportunity to democratize clinical trial enrollment through a decentralized approach that empowers patients, ensures transparency, and incentivizes diverse participation.
What it does
PharmaTrace is a decentralized marketplace that connects patients with relevant clinical trials while maintaining data privacy and fair compensation. Patients upload their anonymized medical records, which our NLP engine analyzes to extract key information like age, ethnicity, and medical history. The system then automatically matches patients with active clinical trials suited to their profile. When a match is found, smart contracts handle the informed consent process digitally and offer tokenized micro-incentives for participation. This ensures researchers receive high-quality, verified data from a diverse participant pool, while patients maintain control over their information and receive transparent compensation for their valuable contribution to medical research.
How we built it
We constructed PharmaTrace using a multi-layered technical stack. For the NLP engine, we leveraged spaCy and Hugging Face's Medical BERT models to perform Named Entity Recognition (NER) on uploaded medical PDFs, extracting relevant conditions and demographic information. Our data infrastructure combines Redis for rapid querying of trial parameters with Supabase for secure user management. The blockchain layer uses Solidity smart contracts to automate consent management and compensation, with Chainlink Oracles verifying patient completion of surveys and trial milestones. The user-facing application is built with React.js and styled using Tailwind CSS to create an intuitive, accessible interface for both patients and researchers.
Challenges we ran into
We faced several significant hurdles during development, starting with HIPAA compliance and data privacy—anonymizing patient records while extracting meaningful information required careful security implementation. Integrating the Gemini API for medical data extraction proved challenging, as we had to carefully craft prompts to consistently parse unstructured PDFs and handle varying medical terminology and document formats. Blockchain integration added complexity around managing gas fees while keeping micro-incentives economically viable, and synchronizing Chainlink Oracles with off-chain patient data created technical difficulties. We also struggled with building user trust, as convincing patients to upload sensitive medical information required robust security features and transparent communication. Finally, scalability issues emerged when processing multiple PDFs simultaneously, pushing our Redis infrastructure to its limits and forcing us to optimize our database architecture and API rate limiting strategies.
Accomplishments that we're proud of
We're incredibly proud of building a fully functional medical data extraction pipeline using the Gemini API that accurately identifies medical conditions and demographics from unstructured PDFs with impressive accuracy. Successfully implementing HIPAA-compliant data anonymization while maintaining data utility was a major achievement that required deep research into privacy-preserving techniques. We're especially excited about our seamless smart contract integration—automating informed consent and tokenized incentives through Solidity contracts that work in real-time with Chainlink Oracles verifying patient milestones. Creating an intuitive user interface that makes complex blockchain and medical matching technology accessible to non-technical patients was a design challenge we're proud to have solved. Perhaps most importantly, we built a system that has the potential to democratize clinical trial access and increase participant diversity, directly addressing the inequities we set out to solve. Seeing all these complex components—the Gemini API, blockchain, databases, and frontend—work together harmoniously to create a platform that could genuinely improve healthcare research feels like our greatest accomplishment.
What I learned
Through building breakingOdds, we gained invaluable experience in healthcare data privacy regulations and the intricacies of HIPAA compliance when handling sensitive medical information. We learned how to effectively leverage the Gemini API for complex document parsing, discovering best practices for prompt engineering to extract structured data from unstructured medical records. Working with blockchain technology taught us about smart contract development, gas optimization, and the practical challenges of integrating decentralized systems with traditional databases. We also deepened our understanding of full-stack development, from managing Redis for high-performance querying to building user-friendly interfaces that make complex technology accessible. Perhaps most importantly, we learned that solving real-world healthcare problems requires balancing technical innovation with user trust, regulatory compliance, and ethical considerations around patient data and equitable access to medical research.
What's next for breakingOdds
What's next for PharmaTrace Moving forward, we plan to partner with research institutions and pharmaceutical companies to onboard real clinical trials and begin pilot testing with actual patients. We aim to enhance our matching algorithms by incorporating genetic markers and lifestyle factors for more precise trial recommendations. Integration with EHR systems is a priority to streamline data uploading and reduce friction for users. We're also exploring ways to improve our tokenomics model to create sustainable incentives that fairly compensate patients while remaining cost-effective for researchers. Long-term, we envision expanding breakingOdds into a broader decentralized health data marketplace where patients maintain full ownership of their medical information and can selectively share it with various stakeholders while receiving fair compensation, ultimately increasing diversity in medical research and accelerating treatment development for all populations.
Built With
- cloud
- deployment
- dotenv-?-github
- express-?-mongodb-atlas
- javascript/typescript
- mongoose-?-rest-apis
- npm
- python-?-react
- tailwind-css-?-node.js
- vite