An AI-powered medical record processing system that extracts chronological timelines and medical entities from clinical documents.
- Python 3.8+
- Node.js 16+
- npm or yarn
python -m venv legalai
source legalai/bin/activate # On Windows: legalai\Scripts\activatepip install -r requirements.txt# Navigate to the backend API directory
cd backend/demo/ner
# Start the Flask API server
python medical_ner_api.pyThe API will start at: http://localhost:5002
GET /api/health- Health checkPOST /api/upload- Upload medical record (.txt file)POST /api/process/<file_id>- Process uploaded file and extract timeline
cd frontendnpm installnpm run devThe frontend will start at: http://localhost:5173
- Start Backend: Run the Flask API (
python medical_ner_api.py) - Start Frontend: Run the React app (
npm run dev) - Upload Document: Upload a .txt medical record file
- View Results: See the extracted medical timeline with:
- Date
- Fact Text (cleaned medical events)
- Page Citation