You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/PrivateData.dart
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,6 @@ final GenerativeModel GeminiModel = GenerativeModel(
5
5
apiKey:GeminiApiKey,
6
6
);
7
7
8
-
const analyzeReportPrompt =
9
-
"Analyze the following medical report in detail. Summarize the key findings, focusing on any abnormal test results that may require further investigation or medical attention. Identify any patterns or trends in the data that could indicate potential health concerns. Additionally, highlight any specific instructions, recommendations, or advice to the patient for follow-up care or lifestyle changes. Be thorough and ensure nothing important is overlooked.";
10
-
11
8
constString ocrPrompt ='''
12
9
You are analyzing a haematology report image. Extract all test names and their corresponding values, ensuring the values match the units used in the provided sample report. For scientific notation (e.g., \`14.00 x 10^9/uL\`), convert it to its full numeric form (e.g., \`14000000000\`).
13
10
@@ -77,7 +74,7 @@ P-LCR: 19.4
77
74
PCT: 0.26
78
75
''';
79
76
80
-
const st="Haemoglobin";
77
+
const st="Haemoglobin";
81
78
82
79
constString generalPrompt ='''
83
80
You are analyzing a medical diagnostic report image. Extract all test names and their corresponding values (consider only these test which gives numerical value). For scientific notation (e.g., \`14.00 x 10^9/uL\`), convert it to its full numeric form (e.g., \`14000000000\`).
@@ -94,7 +91,7 @@ $st: 11.8
94
91
95
92
''';
96
93
97
-
String matchChecker='''
94
+
String matchChecker='''
98
95
Here are two comma-separated string:
99
96
100
97
Predefined Test Names: [insert your predefined names here]
Provide the mappings for all user-input test names in the specified format. dont give any additional text.
22
22
23
23
''';
24
-
return prompt;
25
-
}
26
-
}
24
+
return prompt;
25
+
}
26
+
27
+
staticStringanalyzeReportPrompt() {
28
+
String prompt =
29
+
"Analyze the following medical report in detail. Summarize the key findings, focusing on any abnormal test results that may require further investigation or medical attention. Identify any patterns or trends in the data that could indicate potential health concerns. Additionally, highlight any specific instructions, recommendations, or advice to the patient for follow-up care or lifestyle changes. Be thorough and ensure nothing important is overlooked.";
30
+
return prompt;
31
+
}
32
+
33
+
staticStringocrPrompt() {
34
+
String prompt ='''
35
+
You are analyzing a haematology report image. Extract all test names and their corresponding values, ensuring the values match the units used in the provided sample report. For scientific notation (e.g., \`14.00 x 10^9/uL\`), convert it to its full numeric form (e.g., \`14000000000\`).
36
+
37
+
**Predefined Test Names and Examples**:
38
+
- Haemoglobin
39
+
- ESR
40
+
- Total WBC Count
41
+
- Total RBC Count (Map from: "RBC" or "Total RBC")
42
+
- Platelet Count (Map from: "Platelet" or "Total Platelet Count")
43
+
- Neutrophils
44
+
- Lymphocytes
45
+
- Monocytes
46
+
- Eosinophils
47
+
- Basophils
48
+
- HCT/PCV
49
+
- MCV
50
+
- MCH
51
+
- MCHC
52
+
- RDW-CV
53
+
- RDW-SD
54
+
- MPV
55
+
- PDW
56
+
- P-LCR
57
+
- PCT
58
+
59
+
**Guidelines**:
60
+
1. Extract numeric values from the report and match them to the correct predefined test names.
61
+
2. Convert all values to the predefined units. If the input uses different units (e.g., g/ml vs g/dl), calculate and provide the value in the required unit. Use standard conversion formulas when needed.
4. Convert values when necessary and exclude unit symbols in the output. For scientific notation (e.g., `4 x 10^12`), convert the value to its full numeric form (e.g., `4000000000000`).
76
+
5. Ignore any extra information such as comments or reference ranges.
77
+
6. If a value is missing for a test, output " ".
78
+
7. Ensure the output matches the exact format and structure shown in the **Sample Output** section.
0 commit comments