An automated system for detecting gender mismatches in radiology reports using keyword-based pattern recognition. The system identifies when medical reports contain gender-specific terms that don't match the patient's gender, helping to improve quality assurance in radiology.
Live Application: https://gender-mismatch-detection.netlify.app
Try it with this sample:
- Report: "Patient has prostate enlargement"
- Gender: Female
- Age: 45
- Expected: High priority alert for "prostate" (male-specific term)
- Keyword-based Detection: Pre-defined libraries of male/female specific medical terms
- Age-based Logic: Different detection rules for pediatric vs adult patients
- Smart Exclusions: Filters out legitimate gender references in provider/communication contexts
- Priority Alerts: High/Medium priority classification for detected mismatches
- Real-time Processing: Fast detection with comprehensive reporting
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Netlify β β Supabase β
β (React) βββββΊβ Functions βββββΊβ PostgreSQL β
β β β (Serverless) β β Database β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Female patients: Flag ALL male-specific terms
- Male patients β₯8 years: Flag ALL female-specific terms + pregnancy terms
- Male patients <8 years: Flag only non-pregnancy female terms
- Unknown gender: Skip processing
- Frontend: React + Material-UI
- Backend: Netlify Functions (Node.js)
- Database: Supabase (PostgreSQL)
- Deployment: Netlify
- Authentication: Supabase Auth
- Node.js 18+
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/SiddharthaKostiRaga/gender-mismatch-detection.git cd gender-mismatch-detection -
Set up Supabase
- Create a new project at supabase.com
- Run the SQL schema from
database/schema.sql - Note your project URL and anon key
-
Set up environment variables
# Frontend (.env.local) REACT_APP_SUPABASE_URL=https://fpplmfsrhxkvnwunlfdl.supabase.co REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_key # Netlify Functions (in Netlify dashboard) SUPABASE_URL=https://fpplmfsrhxkvnwunlfdl.supabase.co SUPABASE_ANON_KEY=your_supabase_anon_key
-
Install dependencies
cd frontend npm install -
Run development server
npm start
gender-mismatch-detection/
βββ frontend/ # React application
β βββ src/
β β βββ components/ # React components
β β βββ services/ # API services
β β βββ utils/ # Utility functions
β β βββ App.js
β βββ public/
β βββ package.json
βββ functions/ # Netlify serverless functions
β βββ detect-mismatch.js
β βββ get-keywords.js
β βββ get-stats.js
βββ database/ # Database schema and migrations
β βββ schema.sql
βββ docs/ # Documentation
β βββ Phase1_Implementation_Guide.md
β βββ Supabase_Netlify_Implementation.md
βββ netlify.toml # Netlify configuration
βββ README.md
Detect gender mismatches in a radiology report.
Request:
{
"report_text": "Patient has prostate enlargement",
"patient_gender": "Female",
"patient_age": 45
}Response:
{
"mismatches": [
{
"keyword": "prostate",
"category": "body_part",
"priority": "High",
"context": "Patient has prostate enlargement"
}
],
"processing_time_ms": 150,
"total_keywords_checked": 45
}cd frontend
npm testcd frontend
npm run build# Start frontend development server
cd frontend
npm start
# Test Netlify functions locally
netlify dev- Production URL: https://gender-mismatch-detection.netlify.app
- Netlify Dashboard: https://app.netlify.com/projects/gender-mismatch-detection
- GitHub Repository: https://github.com/SiddharthaKostiRaga/gender-mismatch-detection
- Push to
mainbranch triggers automatic deployment - Preview deployments for pull requests
- Environment variables configured in Netlify dashboard
# Build frontend
cd frontend
npm run build
# Deploy to Netlify
netlify deploy --prod- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the GitHub repository
- Check the documentation in the
docs/folder - Review the implementation guides for detailed technical information
- β Keyword-based detection
- β Age-based logic
- β Exclusion rules
- β Priority alerts
- Custom keyword management
- Institution-specific libraries
- Advanced analytics
- AI-powered detection
- Natural language processing
- Machine learning integration