1 line
9.8 KiB
JSON
1 line
9.8 KiB
JSON
{"repo": "adicadi/hackathon-2026", "files": {"README.md": {"dddba77d6a1cb0eaac93b729a64f7990ebc1b82e": {"t": 1785596420.8315759, "n": 9255, "h": "9edaf2d911cac8a9", "c": "# CliniFlow\n\nAI-powered unified hospital management platform for modern clinics. Covers the full patient journey from admission through discharge — consultation, inpatient care, diagnostics, and document generation — with a dual AI provider layer (Anthropic Claude / Google Gemini) powering every clinical workflow.\n\n## Screenshots\n\n### Dashboard\n\n\n### Analytics\n\n\n---\n\n## Quick Start\n\n```bash\n# 1. Install dependencies\nnpm install\n\n# 2. Set up environment\ncp .env.local.example .env.local\n# Edit .env.local — add your API keys (see AI Provider section below)\n\n# 3. Initialize database (SQLite for local dev)\nnpm run db:generate\nnpm run db:push\nnpm run db:seed\n\n# 4. Start dev server\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) and sign in with:\n\n| Email | Role |\n|-------|------|\n| `dr.mueller@hospital-os.de` | Doctor |\n| `admin@hospital-os.de` | Admin |\n\n_(Any password works in demo mode)_\n\n---\n\n## Platform Modules\n\n### Patients\n- Create and manage patient profiles with full demographics (name, DOB, gender, blood type, insurance type/ID, contact details)\n- Allergy tracking with visual badge display\n- Patient number auto-generation\n- Medical history timeline with source type tagging (PDF import, HL7/FHIR, manual entry)\n- Import records via PDF upload or paste-in text — AI extracts and structures the content\n- AI Pre-Consult Brief: one-click summary of the patient's complete history, active problems, medications, allergies, imaging summary, and clinical flags\n\n### Consultations\n- Schedule consultations (in-person, video, telemedicine, follow-up)\n- Live AI Scribe: real-time transcription → structured SOAP note (Subjective, Objective, Assessment, Plan)\n- Order blood/lab tests directly from consultation (panel-grouped: Blood Count, Metabolic, Lipids, Liver, Kidney, Thyroid, Cardiac, Coagulation, Inflammation, Iron, Vitamins, Microbiology)\n- Order imaging studies (X-Ray, MRI, CT, Ultrasound, PET) from consultation\n- Admit patient to inpatient ward from consultation\n- Schedule follow-ups from consultation\n\n### Blood & Imaging Tests\n- Unified view of all imaging orders and blood test orders across the hospital\n- Split into **Pending** (PENDING / IN_PROGRESS) and **Previous** (COMPLETED / CANCELLED) sections\n- Imaging: inline scan image thumbnails with full-screen lightbox viewer (prev/next navigation)\n- Imaging: upload MRI/X-ray/CT scan files per order (drag-and-drop or file picker)\n- Imaging: AI analysis — reads modality, body part, clinical indication, and radiologist report → returns findings, possible diagnoses with confidence scores, anomaly flags, and recommendations\n- Blood tests: view ordered test panels, results table with value/unit/reference range/abnormal flags (HIGH, LOW, CRITICAL)\n\n### Inpatient Ward\n- Live ward overview — all currently admitted patients with ward, bed, and latest vitals\n- Record vitals per patient (temperature, heart rate, BP systolic/diastolic, SpO₂)\n- Write and view progress notes — saved notes appear immediately in the timeline\n- Quick link to generate discharge documents for any admitted patient\n\n### Discharge Documents\n- AI-generated discharge letters (Arztbrief), prescriptions, referral letters, sick notes, specialist reports, DRV pension reports\n- Form pre-fills automatically from inpatient stay data: admission/discharge dates, ward, admission reason, doctor name, diagnoses from history, treatment summary from SOAP notes or progress notes\n- AI Auto-fill follow-up instructions: generates patient-specific post-discharge care instructions based on diagnoses, treatment, medications, and progress notes\n- Editable document textarea — review and amend before finalising\n- **Save as PDF**: opens browser print dialog with a formatted print-ready layout (serif font, proper margins, patient name header)\n- **Send to Patient**: Email and WhatsApp send buttons (integration-ready placeholder with toast feedback)\n- AI Peer Review: DRV-compliant scoring with overall score, ICD coding accuracy, documentation completeness, DRV standards compliance, issues list, and recommendations\n\n### Follow-up\n- Schedule follow-ups linked to patients and consultations\n- Types: Appointment, Lab Check, Medication Review, Outcome Tracking, Recall\n- Status tracking: Pending, Completed, Missed, Rescheduled\n\n### Analytics\n- Dashboard KPIs: total patients, today's consultations, inpatients, pending discharges, pending imaging, pending follow-ups\n- DRV compliance rate tracking\n- Consultation volume and outcome metrics\n\n### Admin\n- AI provider configuration (switch between Anthropic Claude and Google Gemini at runtime)\n- User management\n\n---\n\n## AI Features\n\n| Feature | Trigger | What it does |\n|---------|---------|-------------|\n| **AI Scribe** | \"Scribe\" button in consultation | Transcribes dictation into a structured SOAP note (Subjective / Objective / Assessment / Plan) |\n| **AI Doc Extraction** | Paste text in patient import | Extracts diagnoses, medications, allergies, procedures, and a structured summary from free-text clinical documents |\n| **PDF Import + AI Extraction** | Upload PDF in patient import | Reads PDF text via `pdf-parse`, passes to AI for structured history extraction, saves to patient record |\n| **AI Pre-Consult Brief** | \"Generate full AI brief\" on patient profile | Synthesises patient history, active problems, medications, allergies, imaging, and clinical flags into a clinician-ready brief |\n| **AI Imaging Analysis** | \"Run AI Analysis\" on imaging order | Analyses modality, body part, indication, and optional radiologist report → findings, differential diagnoses with confidence %, anomaly detection, urgent flags, recommendations |\n| **AI Discharge Generator** | Submit discharge form | Generates a full Arztbrief-style discharge letter in German clinical format based on admission data, diagnoses, treatment, and medications |\n| **AI Follow-up Instructions** | \"AI Auto-fill\" in discharge form | Generates patient-specific post-discharge follow-up instructions from diagnoses, treatment summary, progress notes, and medications |\n| **AI Peer Review** | \"AI Peer Review\" on discharge document | Scores the document for DRV compliance: ICD coding accuracy, documentation completeness, DRV standards adherence; returns issues and improvement recommendations |\n\nAll AI features work with **either** Anthropic Claude Sonnet 4.6 or Google Gemini 2.5 Flash — same system prompts, same response shape.\n\n---\n\n## Switching AI Provider\n\nSet in `.env.local` and restart the dev server:\n\n```bash\n# Anthropic Claude (default)\nAI_PROVIDER=anthropic\nANTHROPIC_API_KEY=sk-ant-...\n\n# Google Gemini\nAI_PROVIDER=gemini\nGEMINI_API_KEY=AIza...\n```\n\nThe active provider label is shown in every AI panel. You can also switch live from **Admin → AI Provider Configuration**.\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Framework | Next.js 14.2 (App Router) + TypeScript |\n| AI — Primary | Anthropic Claude Sonnet 4.6 (`@anthropic-ai/sdk`) |\n| AI — Alternative | Google Gemini 2.5 Flash (`@google/generative-ai`) |\n| Database ORM | Prisma with SQLite (dev) / PostgreSQL (prod) |\n| Auth | NextAuth.js v5 beta (JWT, Credentials provider) |\n| UI Components | Tailwind CSS, Radix UI primitives, Lucide icons |\n| PDF parsing | `pdf-parse` (server-side, CJS) |\n| Validation | Zod |\n| Date utilities | `date-fns` |\n\n---\n\n## Project Structure\n\n```\nsrc/\n├── app/\n│ ├── (platform)/ # All authenticated pages\n│ │ ├── dashboard/\n│ │ ├── patients/ # List, profile, new, import, pre-consult\n│ │ ├── consultations/ # List, detail (scribe + orders), new\n│ │ ├── imaging/ # Blood & Imaging Tests tab view\n│ │ ├── inpatient/ # Ward overview, vitals, progress notes\n│ │ ├── discharge/ # Document list, new (AI form), detail (peer review)\n│ │ ├── followup/\n│ │ ├── analytics/\n│ │ └── admin/\n│ └── api/\n│ ├── ai/ # scribe, doc-extraction, pdf-upload, pre-consult,\n│ │ │ # discharge-followup, provider\n│ ├── patients/\n│ ├── consultations/\n│ ├── imaging/ # Orders, upload (multipart), analyze\n│ ├── lab/ # Lab orders and results\n│ ├── inpatient/ # Stays, vitals, progress notes\n│ ├── discharge/ # Documents, peer-review\n│ ├── followup/\n│ └── users/\n├── components/\n│ ├── layout/ # Sidebar, header\n│ ├── patient/ # PatientImagingSection, PatientInpatientSection,\n│ │ # AdmitPatientModal\n│ └── ui/ # Card, Button, Badge, AIPanel, …\n├── lib/\n│ ├── ai-provider.ts # Unified AI abstraction layer\n│ ├── anthropic.ts\n│ ├── gemini.ts\n│ ├── auth.ts\n│ └── db.ts\n└── services/ai/ # Business-logic wrappers for each AI feature\n ├── scribe.ts\n ├── doc-extraction.ts\n ├── imaging-analysis.ts\n ├── pre-consult-summary.ts\n ├── discharge-generator.ts\n └── peer-review.ts\n```\n\n---\n\n## Not Included (by design)\n\nBilling and insurance coding — ICD/DRG auto-coding, invoice generation, and payment reconciliation — are excluded per project scope.\n"}}}} |