O3 Framework / updateVisit
updateVisit(
uuid,payload,abortController):Promise<FetchResponse<Visit>>
Defined in: packages/framework/esm-emr-api/src/visit-utils.ts:162
Updates an existing visit by sending a POST request to the OpenMRS REST API.
string
The UUID of the visit to update.
The visit data to update, such as stop datetime or attributes.
AbortController
An AbortController to allow cancellation of the request.
Promise<FetchResponse<Visit>>
A Promise that resolves with the FetchResponse containing the updated Visit.
import { updateVisit } from '@openmrs/esm-framework';
const abortController = new AbortController();
const response = await updateVisit('visit-uuid', {
stopDatetime: new Date().toISOString()
}, abortController);