Skip to content

rivirside/TrialrApp

Repository files navigation

Clinical Trials Search - Web Application

Search the ClinicalTrials.gov database easily and open access to life-changing health interventions!

A modern web application for searching clinical trials using the ClinicalTrials.gov API v2. This is a web-based version of the original TrialrApp iOS application, rebuilt to work with the latest API and be accessible on any device.

Features

  • Search Clinical Trials: Search by medical condition, intervention/treatment, and location
  • Study Details: View comprehensive study information including eligibility criteria, outcomes, and locations
  • Save Studies: Save interesting studies to review later
  • Share Studies: Share study information with others
  • Responsive Design: Works on desktop and mobile devices
  • Modern API: Uses ClinicalTrials.gov API v2 for up-to-date data

Usage

  1. Open the website at [your-github-pages-url] or run locally
  2. Use the search form to find clinical trials:
    • Enter a medical condition (e.g., "diabetes", "cancer")
    • Add intervention/treatment terms (e.g., "metformin", "chemotherapy")
    • Include location terms (city, state, or zip code)
    • Select recruitment status
    • Choose to include studies accepting healthy volunteers
  3. Browse results and click "View Details" to see comprehensive study information
  4. Save studies you're interested in for later review
  5. Share studies with the share button

Getting Started

Online (GitHub Pages)

The app is deployed at: [Your GitHub Pages URL]

Local Development

  1. Clone the repository:

    git clone https://github.com/your-username/TrialrApp.git
    cd TrialrApp
  2. Serve the files using a local web server:

    python3 -m http.server 8000
    # or use any other static file server
  3. Open http://localhost:8000 in your browser

API v2 Migration Notes

This application uses the modern ClinicalTrials.gov API v2. Some features from the original iOS app have been adapted:

Working Features

  • ✅ Condition search (query.cond)
  • ✅ Intervention search (query.intr)
  • ✅ General location search (query.term)
  • ✅ Recruitment status filtering
  • ✅ Healthy volunteers filtering
  • ✅ Study details retrieval
  • ✅ Pagination support

Currently Limited Features

  • ❌ Age-based filtering (API v2 parameter unclear)
  • ❌ Sex-based filtering (API v2 parameter unclear)
  • ❌ Precise location-based filtering (using general search instead)

Technical Details

  • API Base URL: https://clinicaltrials.gov/api/v2/studies
  • Framework: Vanilla JavaScript (no dependencies)
  • Storage: LocalStorage for saved studies
  • Rate Limiting: ~50 requests per minute per IP
  • CORS: API supports cross-origin requests

Files

  • index.html - Main application interface
  • styles.css - Styling and responsive design
  • script.js - JavaScript functionality and API integration
  • test.html - Simple API test page for debugging

Troubleshooting

If you encounter search issues:

  1. Check the browser console for error messages (F12 → Console)
  2. Try simpler search terms (single words work better)
  3. Use the test.html file to verify API connectivity
  4. Ensure you have an internet connection for API calls
  5. Try searching with just a condition first

Common Issues

Getting 0 results:

  • The API v2 has different parameter requirements
  • Location search now uses general search terms
  • Try broader search terms initially

API Errors:

  • Check browser console for specific error messages
  • Verify internet connection
  • API may have rate limiting in effect

GitHub Pages Deployment

  1. Push all files to your GitHub repository
  2. Go to repository Settings → Pages
  3. Select "Deploy from a branch" and choose your main branch
  4. The site will be available at https://username.github.io/repository-name

Contributing

We welcome contributions to improve the Clinical Trials Search app! If you would like to contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Priority Areas for Contribution

  • Fix age and sex filtering with correct API v2 parameters
  • Improve location-based search accuracy
  • Add more sophisticated filtering options
  • Implement study comparison features
  • Add export functionality

Migration from iOS App

This web application replaces the original iOS TrialrApp with these improvements:

  • Cross-platform: Works on any device with a web browser
  • Modern API: Uses ClinicalTrials.gov API v2
  • No App Store Required: Accessible directly via web browser
  • Always Updated: No need to update through app stores
  • Better Search: Enhanced search capabilities and results display

License

This project is licensed under the MIT License - see the original LICENSE file for details.

Acknowledgments

  • Original TrialrApp iOS application concept and design
  • ClinicalTrials.gov for providing the API and clinical trial data
  • The clinical research community for making trial information accessible

About

App to search the ClinicalTrials.gov database easily and open access to life-changing health interventions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors