O3 Framework / setSessionLocation
setSessionLocation(
locationUuid,abortController):Promise<any>
Defined in: packages/framework/esm-api/src/current-user.ts:351
Sets the session location for the current user. The session location represents the physical location where the user is working (e.g., a clinic or ward). This triggers a server request to update the session and refreshes the local session store.
string
The UUID of the location to set as the session location.
AbortController
An AbortController to allow cancellation of the request.
Promise<any>
A Promise that resolves with the updated SessionStore.
import { setSessionLocation } from '@openmrs/esm-api';
const abortController = new AbortController();
await setSessionLocation('location-uuid-here', abortController);