Skip to content

Commit fed5a2c

Browse files
Shyaam KarodiyaShyaam Karodiya
authored andcommitted
Updated demo video in Readme
1 parent 627c879 commit fed5a2c

5 files changed

Lines changed: 79 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ Built using local LLM inference with Ollama and Qwen 2.5, the system provides ex
1919
![Qwen2.5](https://img.shields.io/badge/Qwen_2.5-7A42F4?style=for-the-badge)
2020
![Pydantic](https://img.shields.io/badge/Pydantic-E92063?style=for-the-badge&logo=pydantic&logoColor=white)
2121

22-
**[🎥 Watch the Live Demo Video Here](YOUR_VIDEO_LINK_HERE)**
22+
## Demo Video
23+
24+
[![Watch Demo](assets/screenshots/dashboard.png)](assets/videos/Aegion-recording.mov)
2325

2426
---
2527

assets/videos/Aegion-recording.mov

46.5 MB
Binary file not shown.

frontend/src/components/form/MedicineTagInput.jsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ export default function MedicineTagInput({
77
onChange,
88
label = 'Medicines to Prescribe',
99
placeholder = 'Search medicines…',
10-
allowCustom = false
10+
allowCustom = false,
11+
searchFn = null
1112
}) {
1213
const [query, setQuery] = useState('')
1314
const [suggestions, setSuggestions] = useState([])
@@ -18,15 +19,17 @@ export default function MedicineTagInput({
1819

1920
useEffect(() => {
2021
if (query.length >= 1) {
21-
const results = searchMedicines(query, value)
22+
const fn = searchFn ?? searchMedicines
23+
const results = fn(query, value)
2224
setSuggestions(results)
2325
setHighlightIdx(0)
24-
setOpen(results.length > 0)
26+
// Keep the dropdown open even with no suggestions when allowCustom is true
27+
setOpen(results.length > 0 || allowCustom)
2528
} else {
2629
setSuggestions([])
2730
setOpen(false)
2831
}
29-
}, [query, value])
32+
}, [query, value, allowCustom, searchFn])
3033

3134
const addMedicine = (med) => {
3235
if (!value.includes(med)) {
@@ -145,6 +148,16 @@ export default function MedicineTagInput({
145148
{highlightMatch(med, query)}
146149
</button>
147150
))}
151+
{/* Custom entry hint — shown when no exact match exists in the list */}
152+
{allowCustom && query.trim() && !suggestions.some(m => m.toLowerCase() === query.trim().toLowerCase()) && (
153+
<button
154+
onMouseDown={(e) => { e.preventDefault(); addMedicine(query.trim()) }}
155+
className="w-full text-left px-3 py-2 text-sm text-txt-3 hover:bg-surface-2 border-t border-border/50 flex items-center gap-2 italic"
156+
>
157+
<span className="text-accent font-semibold not-italic">+</span>
158+
Add &ldquo;{query.trim()}&rdquo; as custom
159+
</button>
160+
)}
148161
</div>
149162
)}
150163
</div>

frontend/src/components/form/PrescriptionForm.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { User, Scan, Weight, Heart } from 'lucide-react'
22
import MedicineTagInput from './MedicineTagInput'
3-
import TagInput from './TagInput'
3+
import { searchConditions } from '../../constants/conditions'
44

55
export default function PrescriptionForm({ formData, setFormData, onAnalyze, loading }) {
66
const update = (field, value) => setFormData(prev => ({ ...prev, [field]: value }))
@@ -44,6 +44,7 @@ export default function PrescriptionForm({ formData, setFormData, onAnalyze, loa
4444
<MedicineTagInput
4545
value={formData.medicines}
4646
onChange={(v) => update('medicines', v)}
47+
allowCustom={true}
4748
/>
4849

4950
{/* Patient Details — Two Column */}
@@ -91,11 +92,13 @@ export default function PrescriptionForm({ formData, setFormData, onAnalyze, loa
9192
/>
9293

9394
{/* Conditions */}
94-
<TagInput
95+
<MedicineTagInput
9596
label="Conditions"
9697
value={formData.patient_history.conditions}
9798
onChange={(v) => updateHistory('conditions', v)}
98-
placeholder="e.g. Diabetes"
99+
placeholder="Search conditions…"
100+
allowCustom={true}
101+
searchFn={searchConditions}
99102
/>
100103

101104
{/* Submit */}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Common medical conditions for autocomplete — curated for clinical relevance
2+
export const CONDITIONS = [
3+
// Cardiovascular
4+
'Hypertension', 'Heart Failure', 'Coronary Artery Disease', 'Atrial Fibrillation', 'Angina',
5+
'Myocardial Infarction', 'Peripheral Artery Disease', 'Deep Vein Thrombosis', 'Pulmonary Embolism',
6+
'Cardiomyopathy', 'Arrhythmia', 'Bradycardia', 'Tachycardia',
7+
// Metabolic & Endocrine
8+
'Type 1 Diabetes', 'Type 2 Diabetes', 'Hypothyroidism', 'Hyperthyroidism', 'Obesity',
9+
'Hyperlipidemia', 'Hyperuricemia', 'Metabolic Syndrome', 'Cushing Syndrome', 'Addison Disease',
10+
// Respiratory
11+
'Asthma', 'COPD', 'Pneumonia', 'Pulmonary Fibrosis', 'Sleep Apnea', 'Bronchitis',
12+
'Tuberculosis', 'Pleural Effusion', 'Lung Cancer', 'Emphysema',
13+
// Renal & Urological
14+
'Chronic Kidney Disease', 'Acute Kidney Injury', 'Urinary Tract Infection', 'Nephrolithiasis',
15+
'Nephrotic Syndrome', 'Benign Prostatic Hyperplasia', 'Glomerulonephritis',
16+
// Gastrointestinal
17+
'GERD', 'Peptic Ulcer Disease', 'Crohn Disease', 'Ulcerative Colitis', 'Irritable Bowel Syndrome',
18+
'Cirrhosis', 'Hepatitis B', 'Hepatitis C', 'Pancreatitis', 'Celiac Disease', 'Cholecystitis',
19+
// Neurological
20+
'Epilepsy', 'Migraine', 'Stroke', 'Parkinson Disease', 'Alzheimer Disease', 'Multiple Sclerosis',
21+
'Peripheral Neuropathy', 'Dementia', 'Transient Ischemic Attack',
22+
// Psychiatric
23+
'Depression', 'Anxiety Disorder', 'Bipolar Disorder', 'Schizophrenia', 'PTSD', 'OCD', 'ADHD',
24+
'Insomnia', 'Panic Disorder',
25+
// Musculoskeletal
26+
'Rheumatoid Arthritis', 'Osteoarthritis', 'Osteoporosis', 'Gout', 'Fibromyalgia',
27+
'Ankylosing Spondylitis', 'Systemic Lupus Erythematosus',
28+
// Haematological
29+
'Anaemia', 'Iron Deficiency Anaemia', 'Sickle Cell Disease', 'Thalassemia', 'Thrombocytopenia',
30+
'Leukaemia', 'Lymphoma',
31+
// Dermatological
32+
'Psoriasis', 'Eczema', 'Acne', 'Rosacea', 'Urticaria',
33+
// Oncological
34+
'Breast Cancer', 'Prostate Cancer', 'Colorectal Cancer', 'Cervical Cancer', 'Liver Cancer',
35+
// Infectious
36+
'HIV / AIDS', 'Malaria', 'Dengue Fever', 'Typhoid', 'COVID-19',
37+
]
38+
39+
export function searchConditions(query, exclude = []) {
40+
if (!query || query.length < 1) return []
41+
const q = query.toLowerCase()
42+
return CONDITIONS
43+
.filter(c => !exclude.includes(c))
44+
.filter(c => c.toLowerCase().includes(q))
45+
.sort((a, b) => {
46+
const aStarts = a.toLowerCase().startsWith(q)
47+
const bStarts = b.toLowerCase().startsWith(q)
48+
if (aStarts && !bStarts) return -1
49+
if (!aStarts && bStarts) return 1
50+
return a.localeCompare(b)
51+
})
52+
.slice(0, 8)
53+
}

0 commit comments

Comments
 (0)