瀏覽代碼

Specialize system for MYR currency

Dr-Swopt 1 周之前
父節點
當前提交
798f8929da

+ 1 - 4
ai-data-entry-ui/src/app/components/claim-form/claim-form.component.html

@@ -52,10 +52,7 @@
         <label for="total_amount">Total Amount</label>
         <div class="amount-input">
           <input id="total_amount" type="number" formControlName="total_amount" step="0.01">
-          <select formControlName="currency">
-            <option value="USD">USD</option>
-            <option value="SGD">SGD</option>
-          </select>
+          <span class="currency-label">MYR</span>
         </div>
         <div class="confidence-badge" *ngIf="extractionResponse">
           AI Confidence: {{ (extractionResponse.confidence_score * 100).toFixed(0) }}%

+ 1 - 1
ai-data-entry-ui/src/app/components/claim-form/claim-form.component.ts

@@ -28,7 +28,7 @@ export class ClaimFormComponent implements OnInit {
       provider_name: ['', Validators.required],
       visit_date: ['', Validators.required],
       total_amount: [0, [Validators.required, Validators.min(0.01)]],
-      currency: ['USD']
+      currency: ['MYR']
     });
   }
 

+ 3 - 1
src/services/openai_service.py

@@ -41,8 +41,10 @@ async def extract_receipt_data(image_content: bytes, user_name: str, department:
     
     # 2. Refined Prompt
     prompt = (
-        f"You are an HR data entry assistant. Extract the requested fields from the provided medical receipt image. "
+        f"You are an HR data entry assistant helping an employee in Malaysia. "
+        f"Extract the requested fields from the provided medical receipt image. "
         f"The employee submitting this is {user_name} from {department}. "
+        f"IMPORTANT: The currency is always Ringgit Malaysia (MYR). Extract the total amount and assume it is in MYR. "
         f"If the date is missing, look for a 'Payment Date' as a fallback. "
         f"Analyze the receipt for authenticity. If the total amount appears altered or if the provider name is missing, "
         f"set `needs_manual_review` to `true` and provide a low `confidence_score`."