AI-Assisted Preconception Care & Clinical Screening
A conversational pre-consultation assistant designed to help patients organize their information before meeting a healthcare professional.
Live URL: https://maatrisakhi.onrender.com/
Demo: https://youtu.be/oe1OXRG6B8c?si=8Ibr8IpfuBgEiKTu
This application is strictly grounded in the official medical guidelines of the Federation of Obstetric and Gynaecological Societies of India (FOGSI):
- Preconception Care E-Booklet, Book 1: "Preconception: Building the Foundation for a Healthy Mother & a Healthy Future"
- Editor-in-Chief: Dr. Bhaskar Pal (President, FOGSI)
- Editors: Dr. Suvarna Khadilkar, Dr. Priti Kumar, Dr. Poonam Goyal (Chairperson, Safe Motherhood Committee)
- FOGSI Preconception Care โ Complete Clinician Checklist
- 12 structured clinical protocols covering pregnancy intention, medical disorders, previous obstetric complications, medications, genetic carrier risks, immunization, environmental toxins, lifestyle, and mental health.
- Pre-Consultation Assistant Only: The application does NOT diagnose medical conditions, prescribe drugs, or substitute for a qualified doctor.
- Topics Flagged for Clinician Review: Uses neutral reminders with status indicators (๐ข No issue reported, ๐ก Review with clinician, ๐ด Important clinician attention) rather than synthetic, alarmist "risk scores".
- Medication Review Without Hazardous Discontinuation: Never independently tells a patient to stop medicines (particularly psychotropic, antihypertensive, or anti-epileptic drugs), avoiding dangerous withdrawal relapses.
- Evidence-Based Folic Acid Recommendations: Explains FOGSI preconception folic acid guidelines:
- Low Risk: 400โ800 ฮผg/day starting at least 1 month before conception.
- Higher Risk (Diabetes, Epilepsy, prior Neural Tube Defect): 4โ5 mg/day starting 1โ3 months before conception.
- One Question at a Time Conversational Experience:
- Clean, friendly digital health assistant avoiding overwhelming hospital forms.
- Large, accessible Green YES (
#16a34a), Red NO (#dc2626), and Slate NOT SURE (#475569) buttons.
- Voice-First & Text-To-Speech:
- Web Speech API integration (
SpeechRecognition) for hands-free answering in native languages. - Built-in Text-To-Speech (
SpeechSynthesis) with play/stop controls and an auto-read toggle.
- Web Speech API integration (
- 8 Indian Languages Supported:
- English, เคนเคฟเคเคฆเฅ (Hindi), เฐคเฑเฐฒเฑเฐเฑ (Telugu), เฎคเฎฎเฎฟเฎดเฏ (Tamil), เฒเฒจเณเฒจเฒก (Kannada), เดฎเดฒเดฏเดพเดณเด (Malayalam), เฆฌเฆพเฆเฆฒเฆพ (Bengali), เคฎเคฐเคพเค เฅ (Marathi).
- Medical terms annotated with parenthetical English names for clinical clarity.
- Smart Branching Logic:
- Adaptive follow-up questions triggered only when relevant (e.g. asking for HbA1c and duration only if diabetes is reported; skipping obstetric complications if nulliparous).
- Preconception Consultation Summary & Clinician Dashboard:
- Categorized pre-visit summary ready before the patient enters the consultation chamber.
- Rule-based flags highlighting critical clinical review items.
- Direct FOGSI booklet page and checklist citations.
- Doctor's consultation notes and sign-off checkbox ("Checklist completed and discussed with the couple").
- Print & PDF export layout optimized for hospital records.
- One-Click Realistic Demo Patient:
- Instant simulation of a patient case (Ananya Sharma, 28, planning conception, mild hypothyroidism on levothyroxine, not yet taking folic acid, partner smoking) to test the entire end-to-end workflow in seconds.
- One-Click Mother Demo Account (Pregnancy + Child flows):
- Email:
mother@maatri.sakhiยท Password:mother123(same convention as the doctor demo:doctor@maatri.sakhi/doctor123). - Pre-seeded with consent given + a week-38 pregnancy (high BP + gestational diabetes + doctor limits, visit in 7 days) so both trackers and the Child Health Card creation flow are immediately explorable. Works online (Postgres) and offline (local demo store).
- The doctor login screen has a matching one-click demo (
doctor@maatri.sakhi/doctor123).
- Email:
Phase 1: Storage, Login, Consent - Database infrastructure implemented:
- PostgreSQL database with 4 new tables (mothers, pregnancies, entries, visits)
- JSON schema validation for all data
- DPDP Act 2023 consent compliance
- Medical thresholds marked as "placeholders, to be confirmed by clinicians"
- Render.com PostgreSQL deployment ready
Phase 2-11: Mode Switch & Pregnancy Features - Not yet implemented.
- New "I'm pregnant" mode will run alongside existing "Planning a pregnancy" flow
- Uses separate database tables to maintain zero impact on existing preconception data
- All 8 languages and voice support will carry over
- Existing preconception app flow completely unchanged
Safety: FOGSI guidelines only, pre-consultation only, no diagnoses, no prescriptions, never advise stopping medication. Out-of-range readings show "Contact your doctor" only.
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/alwaysalearner1234/MaatriSakhi.git
cd MaatriSakhi
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173/ in your browser.
npm run build
npm run previewMaatriSakhi/
โโโ public/
โโโ src/
โ โโโ components/
โ โ โโโ AboutModal.jsx # FOGSI guidelines & safety modal
โ โ โโโ ChatInterface.jsx # Conversational chatbot with voice/TTS
โ โ โโโ DoctorDashboard.jsx # Clinician pre-visit summary & review flags
โ โ โโโ LanguageSelector.jsx # 8-language selection cards
โ โ โโโ PatientReview.jsx # Pre-submission review & answer editing
โ โ โโโ WelcomeScreen.jsx # Reassuring welcome & safety disclaimer
โ โโโ data/
โ โ โโโ demoData.js # Realistic simulated patient profiles
โ โ โโโ fogsiQuestions.js # Structured FOGSI questions & flag logic
โ โ โโโ translations.js # Multi-language dictionaries
โ โโโ utils/
โ โ โโโ speechUtils.js # Web Speech API recognition & TTS synthesis
โ โโโ App.jsx # Core application coordinator
โ โโโ index.css # Responsive FOGSI clinical design system
โ โโโ main.jsx
โโโ index.html
โโโ package.json
โโโ vite.config.js
- Render.com account
- Supabase project (free tier OK)
- Go to Supabase dashboard โ Settings โ Database
- Note the "Connection string" for the "Postgres pooler (session mode)"
- It will look like:
postgresql://postgres:password@db.xxx.supabase.co:6543/postgres
- Go to Render dashboard โ New Web Service
- Select "Deploy from a Git Repository"
- Repository: your MaatriSakhi repo
- Build Command:
pip install -r requirements.txt - Start Command:
uvicorn api:app --host 0.0.0.0 --port $PORT - Service Type: Web Service
Add these to the Web Service:
DATABASE_URL=postgresql://postgres:password@db.xxx.supabase.co:6543/postgres?sslmode=require
SECRET_KEY=your-super-secret-key-for-jwt-tokens
NODE_ENV=production
ALLOWED_ORIGINS=http://localhost:5173Create requirements.txt at the project root:
fastapi
uvicorn[standard]
asyncpg
bcrypt
PyJWT
pydantic
- Push code to git
- Render will auto-detect and build
- The Static Site serves the React frontend on port 80
- The Python Web Service runs the API on port
$PORT
- Frontend:
https://maatrisakhi.onrender.com/(React SPA) - API:
https://your-service-name.onrender.com/docs(FastAPI auto-docs) - Health:
https://your-service-name.onrender.com/health
Designed for clinical workflow assistance. The tool collects information for healthcare consultations and does not replace medical advice, clinical diagnosis, or patient-physician evaluation.
