Closed zdeveloper closed 3 weeks 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
}
}
}
}
example API response
{
"First Name": [
"YES NO. UNK DATE OF LABLE",
99.01431798934937
],
"Last Name": [
"***",
10.08920669555664
]
}
Please use the same annotation library as creating template flow to draw highlighted errors in the picture on the right.
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.
Show possible errors
Acceptance Criteria Values with low (below 75%) confidence:
[x] should be highlighted red as shown in the design in the table.
[x] should have the error highlighted in the document on the right side
[x] Possible errors should be added to the error counter as shown in design, hide the error counter if no errors are present
[x] The error state should persist until the value is edited
[x] the submit button should be disabled, until there are no errors
[x] show the confidence returned from the OCR API
[x] follow the attached design, use uswds components without customization
[x] the route to this page should be
/extract/review
[x] the back button should go back to the
/extract/upload
[x] the x button should route to
/
[x] Dont worry about the overall confidence score in this story
Additional context https://www.figma.com/design/1FW8ZSDV90q2wpRPOADE9r/MDE?node-id=578-15021&t=4WgdjNNPNLFE2grD-4