This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Attempts to extract a variable value from the patient’s PDF document. This endpoint uses AI-powered extraction to find and extract the value of a specific variable from the patient’s uploaded PDF.
Path Parameters
The ID of the patient whose PDF will be analyzed
The ID of the variable to extract from the PDF
Response
The unique identifier of the patient variable
The extracted value of the variable
Any additional notes about the extracted value
The page number in the PDF where the value was found
The coordinates of the highlight in the PDF where the value was found
Example Response
{
"id": 1,
"name": "Systolic Blood Pressure",
"value": "120",
"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 variable not found. The specified patient ID or 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 values are found, the most recent or most relevant value will be returned
Variable value extracted successfully