Muhammadidrees commited on
Commit
7983926
·
verified ·
1 Parent(s): 7f605a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -22
app.py CHANGED
@@ -22,29 +22,39 @@ def analyze(
22
 
23
  # System-style instruction (cleaned: no estimates, no longevity scores)
24
  system_prompt = (
25
- """Output MUST strictly follow this structured format:
26
-
27
- 1. Executive Summary
28
- - Top Priority Issues
29
- - Key Strengths
30
-
31
- 2. System-Specific Analysis
32
- - Blood Health (MCV, RDW, Lymphocytes, WBC)
33
- - Protein & Liver Health (Albumin, ALP)
34
- - Kidney Health (Creatinine µmol/L)
35
- - Metabolic Health (Glucose mmol/L, CRP)
36
- - Other relevant systems
37
-
38
- 3. Personalized Action Plan
39
- - Medical (tests/consults)
40
- - Nutrition (diet & supplements)
41
- - Lifestyle (hydration, exercise, sleep)
42
- - Testing (follow-up labs: ferritin, Vitamin D, GGT)
43
-
44
- 4. Interaction Alerts
45
- - How biomarkers interact (e.g., anemia ↔ infection cycle, ALP with bone/liver origin)
 
 
 
 
 
 
 
 
 
 
46
  """
47
- )
48
 
49
  # Construct profile input
50
  patient_input = f"""
 
22
 
23
  # System-style instruction (cleaned: no estimates, no longevity scores)
24
  system_prompt = (
25
+ """You are a professional AI Medical Assistant.
26
+ You are analyzing patient demographics and Levine biomarker panel values.
27
+ Output MUST strictly follow this structured format — no extra commentary, no estimates, no deviations:
28
+
29
+ 1. Executive Summary
30
+ - Top Priority Issues
31
+ - Key Strengths
32
+
33
+ 2. System-Specific Analysis
34
+ - Blood Health (MCV, RDW, Lymphocytes, WBC)
35
+ - Protein & Liver Health (Albumin, ALP)
36
+ - Kidney Health (Creatinine µmol/L)
37
+ - Metabolic Health (Glucose mmol/L, lnCRP)
38
+ - Other relevant systems
39
+
40
+ 3. Personalized Action Plan
41
+ - Medical (tests/consults)
42
+ - Nutrition (diet & supplements)
43
+ - Lifestyle (hydration, exercise, sleep)
44
+ - Testing (follow-up labs: ferritin, Vitamin D, GGT)
45
+
46
+ 4. Interaction Alerts
47
+ - How biomarkers interact (e.g., anemia ↔ infection cycle, ALP with bone/liver origin)
48
+
49
+ 6. Tabular Mapping (Biomarker → Value → Status → AI-Inferred Insight → Client-Friendly Message)
50
+
51
+ 7. Enhanced AI Insights & Longitudinal Risk
52
+ - Subclinical nutrient predictions (Iron, B12, Folate, Copper)
53
+ - Elevated ALP interpretation (bone vs liver origin)
54
+ - WBC & lymphocyte trends for immunity
55
+ - Predictive longevity risk profile
56
  """
57
+ )
58
 
59
  # Construct profile input
60
  patient_input = f"""