Overview
Create or update notes for a specific appointment in MediSync. This endpoint creates new notes if none exist for the appointment, or updates existing notes if they are already present. When notes are successfully saved, the appointment status is automatically updated to “finished”.Automatic Status Update: When notes are created or updated, the associated appointment status is automatically set to “finished” and a real-time update is emitted to connected clients.
Authentication
Path Parameters
The appointment ID to create notes for
Query Parameters
The user ID of the healthcare provider creating the notes
Body Parameters
The clinical notes content for the appointment
Optional summary of the notes. If not provided, defaults to empty string. If notes already exist and summary is not provided in the request, the existing summary is preserved.
Response
Indicates if the operation was successful
The created or updated notes object
Error message if the operation failed
Example Response
Behavior Notes
- Create vs Update: If notes already exist for the appointment, they will be updated with the new content. If no notes exist, new notes will be created.
- Summary Handling: If summary is provided in the request, it will be set. If not provided and notes already exist, the existing summary is preserved. For new notes, summary defaults to empty string.
- Automatic Workflow: When notes are successfully saved, the appointment status is automatically updated to “finished”
- Real-time Updates: An
appointmentUpdatedevent is emitted to connected WebSocket clients when the appointment status is updated - Error Handling: If the appointment is not found after notes are saved, an error is returned but the notes operation is still considered complete
Status Codes
- 200 - Notes created or updated successfully
- 400 - Invalid request data or operation failed
- 404 - Appointment not found (returned if appointment missing after notes are saved)