O3 Framework / getAttachmentByUuid
getAttachmentByUuid(
attachmentUuid,abortController):Promise<FetchResponse<any>>
Defined in: packages/framework/esm-emr-api/src/attachments.ts:23
Fetches a single attachment by its UUID from the OpenMRS server.
string
The UUID of the attachment to fetch.
AbortController
An AbortController to allow cancellation of the request.
Promise<FetchResponse<any>>
A Promise that resolves with the FetchResponse containing the attachment data.
import { getAttachmentByUuid } from '@openmrs/esm-framework';
const abortController = new AbortController();
const response = await getAttachmentByUuid('attachment-uuid', abortController);
console.log(response.data);