curl --request POST \
--url https://{your-prod-endpoint}/v1/codify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-doctor: <x-doctor>' \
--data '
{
"medical_note": "Patient presents with Type 2 Diabetes Mellitus. Current medications: Metformin 500mg BID, Glipizide 5mg QD. Blood glucose levels stable. No complications noted. Patient reports good compliance with medications and diet. HbA1c: 6.8%.",
"model": "balanced"
}
'{
"final_code_assessments": [
{
"code": "E11.9",
"description": "Type 2 diabetes mellitus without complications",
"justification": "The note documents Type 2 Diabetes without mention of decompensation or complications; corresponds to E11.9 (DM2 without complications). The stable blood glucose levels and HbA1c of 6.8% indicate controlled diabetes with no evidence of complications.",
"confidence_percent": 95.2
},
{
"code": "Z79.84",
"description": "Long term (current) use of oral hypoglycemic drugs",
"justification": "The patient uses metformin and glipizide chronically; both are oral antidiabetic drugs, supporting long term use of oral hypoglycemic drugs.",
"confidence_percent": 98.1
}
],
"discarded_code_assessments": [
{
"code": "E11.65",
"description": "Type 2 diabetes mellitus with hyperglycemia",
"justification": "Discarded because blood glucose levels are stable and controlled (120-140 mg/dL fasting), not indicating hyperglycemia.",
"confidence_percent": 12.3
}
],
"run_id": "1ef8e0d4-7890-6b3c-8f90-abcdef123456"
}{
"success": false,
"error": "Bad Request",
"details": "medical_note is required"
}{
"success": false,
"error": "Unauthorized",
"details": "Missing or invalid authentication token"
}{
"success": false,
"error": "Payload Too Large",
"details": "Request payload exceeds the maximum allowed size"
}{
"success": false,
"error": "Unprocessable Entity",
"details": "Invalid JSON Schema Draft-07"
}{
"success": false,
"error": "Too Many Requests",
"details": "Too many requests, please try again later"
}{
"success": false,
"error": "Internal Server Error",
"details": "An unexpected error occurred during codification"
}{
"success": false,
"error": "Service Unavailable",
"details": "Service temporarily unavailable"
}{
"success": false,
"error": "Gateway Timeout",
"details": "Request timed out after 10 minutes"
}Extract ICD-10 codes from clinical notes
Processes clinical notes (text or PDF) and returns ICD-10 code assessments with confidence scores, detailed justifications, and discarded codes analysis. Supports optional AI model selection and tracking headers.
curl --request POST \
--url https://{your-prod-endpoint}/v1/codify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-doctor: <x-doctor>' \
--data '
{
"medical_note": "Patient presents with Type 2 Diabetes Mellitus. Current medications: Metformin 500mg BID, Glipizide 5mg QD. Blood glucose levels stable. No complications noted. Patient reports good compliance with medications and diet. HbA1c: 6.8%.",
"model": "balanced"
}
'{
"final_code_assessments": [
{
"code": "E11.9",
"description": "Type 2 diabetes mellitus without complications",
"justification": "The note documents Type 2 Diabetes without mention of decompensation or complications; corresponds to E11.9 (DM2 without complications). The stable blood glucose levels and HbA1c of 6.8% indicate controlled diabetes with no evidence of complications.",
"confidence_percent": 95.2
},
{
"code": "Z79.84",
"description": "Long term (current) use of oral hypoglycemic drugs",
"justification": "The patient uses metformin and glipizide chronically; both are oral antidiabetic drugs, supporting long term use of oral hypoglycemic drugs.",
"confidence_percent": 98.1
}
],
"discarded_code_assessments": [
{
"code": "E11.65",
"description": "Type 2 diabetes mellitus with hyperglycemia",
"justification": "Discarded because blood glucose levels are stable and controlled (120-140 mg/dL fasting), not indicating hyperglycemia.",
"confidence_percent": 12.3
}
],
"run_id": "1ef8e0d4-7890-6b3c-8f90-abcdef123456"
}{
"success": false,
"error": "Bad Request",
"details": "medical_note is required"
}{
"success": false,
"error": "Unauthorized",
"details": "Missing or invalid authentication token"
}{
"success": false,
"error": "Payload Too Large",
"details": "Request payload exceeds the maximum allowed size"
}{
"success": false,
"error": "Unprocessable Entity",
"details": "Invalid JSON Schema Draft-07"
}{
"success": false,
"error": "Too Many Requests",
"details": "Too many requests, please try again later"
}{
"success": false,
"error": "Internal Server Error",
"details": "An unexpected error occurred during codification"
}{
"success": false,
"error": "Service Unavailable",
"details": "Service temporarily unavailable"
}{
"success": false,
"error": "Gateway Timeout",
"details": "Request timed out after 10 minutes"
}Autorizaciones
Bearer token for API authentication
Encabezados
Doctor identifier for tracking and auditing
Patient identifier for tracking and auditing
Cuerpo
(REQUIRED) Clinical text to process for ICD-10 coding (max 50KB)
"Patient with Type 2 Diabetes..."
(OPTIONAL) PDF file object with base64 encoded data for additional context (max 5MB decoded)
Show child attributes
Show child attributes
Optional AI model quality level selection
fast, balanced, high-quality "balanced"
Respuesta
Successfully extracted ICD-10 codes
Array of approved ICD-10 code assessments
Show child attributes
Show child attributes
Array of considered but rejected code assessments
Show child attributes
Show child attributes
Unique identifier (UUID) for this codification run
"1ef8e0d4-7890-6b3c-8f90-abcdef123456"