This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Attempts to extract a date value from the patient’s PDF document. This endpoint uses AI-powered extraction to find and extract the date value of a specific date variable from the patient’s uploaded PDF.
Path Parameters
The ID of the patient whose PDF will be analyzed
The ID of the date variable to extract from the PDF
Response
The unique identifier of the patient date variable
The name of the date variable
The extracted date value in ISO 8601 format (YYYY-MM-DD)
Any additional notes about the extracted date
The page number in the PDF where the date was found
The coordinates of the highlight in the PDF where the date was found
Example Response
{
"id" : 1 ,
"name" : "Next Appointment" ,
"value" : "2024-03-15" ,
"note" : "Extracted from visit notes" ,
"pdf_page" : 2 ,
"highlight" : {
"x1" : 100 ,
"y1" : 200 ,
"x2" : 300 ,
"y2" : 250
}
}
Error Responses
Invalid request or extraction failed. The response will include an error message explaining what went wrong.
Authentication required. Make sure you’ve included a valid API key in the request headers.
Patient or date variable not found. The specified patient ID or date variable ID does not exist.
Notes
The patient must have a PDF document uploaded before using this endpoint
The extraction process may take a few seconds to complete
The accuracy of extraction depends on the quality and format of the PDF document
If multiple dates are found, the most recent or most relevant date will be returned
ID of the patient whose PDF will be analyzed
ID of the date variable to extract from the PDF
Name of the model to use for scraping (e.g., 'gpt-4', 'gpt-4-mini')
Date value extracted successfully
Name of the date variable
Whether a date value was found
The extracted date value in ISO 8601 format (YYYY-MM-DD)
Page number where the date was found
X-coordinate of the top-left corner
Y-coordinate of the top-left corner
X-coordinate of the bottom-right corner
Y-coordinate of the bottom-right corner