CDCgov / ReportVision

Intelligent Data Workflow Automation
Apache License 2.0
1 stars 2 forks source link

[V1] Extract: Highlight Low Confidence Extractions on Review Page #229

Closed zdeveloper closed 3 weeks ago

zdeveloper commented 1 month ago

Show possible errors

Acceptance Criteria Values with low (below 75%) confidence:

Additional context https://www.figma.com/design/1FW8ZSDV90q2wpRPOADE9r/MDE?node-id=578-15021&t=4WgdjNNPNLFE2grD-4

zdeveloper commented 1 month ago

from @arinkulshi the response structure saved into the app local state

{
  "submission": {
    "template_name": "Invoice_Template_01",
    "template_image": "data:image/png;base64,....",  // Base64-encoded template image string
    "file_name": "invoice_123.png",
    "file_image": "data:image/png;base64,....",  // Base64-encoded file image string
    "results": {
      "nbs_patient_id": {
        "text": "SIENNA HAMPTON",
        "confidence": 98.75
      },
      "nbs_cas_id": {
        "text": "123555",
        "confidence": 95.42
      },
      "nbs_date_of_birth": {
        "text": "01/01/1990",
        "confidence": 97.10
      }
    }
  }
}
zdeveloper commented 1 month ago

example API response

{
    "First Name": [
        "YES NO. UNK DATE OF LABLE",
        99.01431798934937
    ],
    "Last Name": [
        "***",
        10.08920669555664
    ]
}
zdeveloper commented 1 month ago

Please use the same annotation library as creating template flow to draw highlighted errors in the picture on the right.

schreiaj commented 1 month ago

The bulk of this duplicates #198 - the primary difference is that this one talks about highlighting the extracted stuff on the image, that's the only piece remaining.