Skip to main content

Overview

Update the AI-generated diagnosis prediction for notes associated with a specific appointment in MediSync. This endpoint allows manual modification of diagnosis predictions, enabling healthcare providers to correct or refine AI-generated diagnostic assessments.
Manual Diagnosis Update: This endpoint allows healthcare providers to manually update or correct AI-generated diagnosis predictions. The status is automatically set to “generated” and error is cleared when updating.

Authentication

curl -X PUT \
  'https://api.medisync.com/notes/diagnosis/apt_abc123?uid=doc_xyz789' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "main_diagnosis": "Viral upper respiratory infection",
    "icd_code": "J06.9",
    "reason": "Updated diagnosis based on clinical assessment and patient follow-up"
  }'

Path Parameters

id
string
required
The appointment ID to update the diagnosis prediction for

Query Parameters

uid
string
required
The user ID of the healthcare provider updating the diagnosis prediction

Body Parameters

main_diagnosis
string
The primary diagnosis (will preserve existing value if not provided)
icd_code
string
The ICD-10 code for the diagnosis (will preserve existing value if not provided)
reason
string
Clinical reasoning and explanation for the diagnosis (will preserve existing value if not provided)

Response

success
boolean
Indicates if the operation was successful
data
object
Object containing the updated diagnosis prediction
error
string
Error message if the operation failed

Example Response

{
  "success": true,
  "data": {
    "diagnosis_prediction": {
      "status": "generated",
      "main_diagnosis": "Viral upper respiratory infection",
      "icd_code": "J06.9",
      "reason": "Updated diagnosis based on clinical assessment and patient follow-up",
      "error": null
    }
  }
}

Behavior Notes

  • Partial Updates: All body parameters are optional. Only provided fields will be updated, others retain their existing values
  • Automatic Status Setting: The status is automatically set to “generated” when updating any diagnosis fields
  • Error Clearing: The error field is automatically set to null when successfully updating diagnosis fields
  • Initialization: If no diagnosis_prediction object exists, it will be created during the update
  • Field Preservation: Any diagnosis fields not provided in the request will preserve their current values

Status Codes

  • 200 - Diagnosis prediction updated successfully
  • 400 - Invalid request data or database error
  • 404 - Notes not found for the specified appointment