Skip to main content

Obtaining a Report

This endpoint allows you to retrieve a medical report through an API using the GET method. Prior authentication is required.

Authentication

Before using this endpoint, you must obtain an authentication token. Follow the instructions described in the API authentication section. You must include the token in the Authorization header of your requests with the format Bearer <YOUR_ACCESS_TOKEN>.

Endpoint

Make a GET request to the following endpoint, replacing :providerId and :appointmentId with the appropriate values:

/health/analysis/audio/provider/:providerId/appointment/:appointmentId

Path Parameters

  • providerId (number, required): The ID of the Health Provider.
  • appointmentId (number, required): The ID of the appointment.

Error Codes

The following are some of the common error codes you might encounter:

  • 400 Bad Request: The request was malformed, likely due to invalid or incorrectly formatted IDs.
  • 401 Unauthorized: Authentication failed. Ensure you have a valid access token and are including it in the Authorization header.
  • 404 Not Found: No report was found with the provided providerId and appointmentId.
  • 500 Internal Server Error: An unexpected error occurred on the server.

Example of a Successful Response (200 OK)

{
"success": true,
"code": 200,
"reportId": 1473,
"appointmentId": "1076",
"doctorName": "JAVIER MARTINEZ",
"doctorId": "112",
"providerId": 10,
"datetime": "2024-09-06T17:08:46.506Z",
"reportContent": {
"report": {} || "", // Can be an empty object or an empty string
"summary": "A 75-year-old male patient presents for consultation regarding a slow-growing parotid tumor that was diagnosed several years ago. The patient has a history of high cholesterol, a placed cardiac stent, and occasional arrhythmia. The doctor explains that the tumor is benign and that the reason for removal is to avoid future complications due to its size and location near the facial nerve. The doctor recommends a follow-up MRI at the end of the year to assess tumor growth and discuss the possibility of surgery. The patient requests recommendations for experienced parotid surgeons, both in the public and private sectors, and the doctor provides some names."
},
"reportMetadata": {}
}