77### API Functions
88
99- [ clearCurrentUser] ( API.md#clearcurrentuser )
10+ - [ createAttachment] ( API.md#createattachment )
11+ - [ deleteAttachmentPermanently] ( API.md#deleteattachmentpermanently )
1012- [ fetchCurrentPatient] ( API.md#fetchcurrentpatient )
13+ - [ getAttachmentByUuid] ( API.md#getattachmentbyuuid )
14+ - [ getAttachments] ( API.md#getattachments )
1115- [ getCurrentUser] ( API.md#getcurrentuser )
1216- [ getLocations] ( API.md#getlocations )
1317- [ getLoggedInUser] ( API.md#getloggedinuser )
159163### Other Functions
160164
161165- [ ExtensionSlot] ( API.md#extensionslot )
166+ - [ useAttachments] ( API.md#useattachments )
162167
163168### Store Functions
164169
737742
738743___
739744
745+ ### attachmentUrl
746+
747+ • ` Const ` ** attachmentUrl** : `` "/ws/rest/v1/attachment" ``
748+
749+ #### Defined in
750+
751+ [ packages/framework/esm-api/src/attachments.ts:5] ( https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/attachments.ts#L5 )
752+
753+ ___
754+
740755### defaultVisitCustomRepresentation
741756
742757• ` Const ` ** defaultVisitCustomRepresentation** : ` string `
935950
936951___
937952
953+ ### createAttachment
954+
955+ ▸ ** createAttachment** (` patientUuid ` , ` fileToUpload ` ): ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
956+
957+ #### Parameters
958+
959+ | Name | Type |
960+ | :------ | :------ |
961+ | ` patientUuid ` | ` string ` |
962+ | ` fileToUpload ` | [ ` UploadedFile ` ] ( interfaces/UploadedFile.md ) |
963+
964+ #### Returns
965+
966+ ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
967+
968+ #### Defined in
969+
970+ [ packages/framework/esm-api/src/attachments.ts:19] ( https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/attachments.ts#L19 )
971+
972+ ___
973+
974+ ### deleteAttachmentPermanently
975+
976+ ▸ ** deleteAttachmentPermanently** (` attachmentUuid ` , ` abortController ` ): ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
977+
978+ #### Parameters
979+
980+ | Name | Type |
981+ | :------ | :------ |
982+ | ` attachmentUuid ` | ` string ` |
983+ | ` abortController ` | ` AbortController ` |
984+
985+ #### Returns
986+
987+ ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
988+
989+ #### Defined in
990+
991+ [ packages/framework/esm-api/src/attachments.ts:37] ( https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/attachments.ts#L37 )
992+
993+ ___
994+
938995### fetchCurrentPatient
939996
940997▸ ** fetchCurrentPatient** (` patientUuid ` , ` fetchInit? ` , ` includeOfflinePatients? ` ): ` Promise ` <` fhir.Patient ` \| `` null `` \>
@@ -957,6 +1014,49 @@ ___
9571014
9581015___
9591016
1017+ ### getAttachmentByUuid
1018+
1019+ ▸ ** getAttachmentByUuid** (` attachmentUuid ` , ` abortController ` ): ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
1020+
1021+ #### Parameters
1022+
1023+ | Name | Type |
1024+ | :------ | :------ |
1025+ | ` attachmentUuid ` | ` string ` |
1026+ | ` abortController ` | ` AbortController ` |
1027+
1028+ #### Returns
1029+
1030+ ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
1031+
1032+ #### Defined in
1033+
1034+ [ packages/framework/esm-api/src/attachments.ts:7] ( https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/attachments.ts#L7 )
1035+
1036+ ___
1037+
1038+ ### getAttachments
1039+
1040+ ▸ ** getAttachments** (` patientUuid ` , ` includeEncounterless ` , ` abortController ` ): ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
1041+
1042+ #### Parameters
1043+
1044+ | Name | Type |
1045+ | :------ | :------ |
1046+ | ` patientUuid ` | ` string ` |
1047+ | ` includeEncounterless ` | ` boolean ` |
1048+ | ` abortController ` | ` AbortController ` |
1049+
1050+ #### Returns
1051+
1052+ ` Promise ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <` any ` \>\>
1053+
1054+ #### Defined in
1055+
1056+ [ packages/framework/esm-api/src/attachments.ts:13] ( https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-api/src/attachments.ts#L13 )
1057+
1058+ ___
1059+
9601060### getCurrentUser
9611061
9621062▸ ** getCurrentUser** (): ` Observable ` <[ ` Session ` ] ( interfaces/Session.md ) \>
@@ -3963,6 +4063,35 @@ Passing a function as children
39634063
39644064___
39654065
4066+ ### useAttachments
4067+
4068+ ▸ ** useAttachments** (` patientUuid ` , ` includeEncounterless ` ): ` Object `
4069+
4070+ #### Parameters
4071+
4072+ | Name | Type |
4073+ | :------ | :------ |
4074+ | ` patientUuid ` | ` string ` |
4075+ | ` includeEncounterless ` | ` boolean ` |
4076+
4077+ #### Returns
4078+
4079+ ` Object `
4080+
4081+ | Name | Type |
4082+ | :------ | :------ |
4083+ | ` data ` | [ ` AttachmentResponse ` ] ( interfaces/AttachmentResponse.md ) [ ] |
4084+ | ` error ` | ` any ` |
4085+ | ` isLoading ` | ` boolean ` |
4086+ | ` isValidating ` | ` boolean ` |
4087+ | ` mutate ` | ` KeyedMutator ` <[ ` FetchResponse ` ] ( interfaces/FetchResponse.md ) <{ ` results ` : [ ` AttachmentResponse ` ] ( interfaces/AttachmentResponse.md ) [ ] }\>\> |
4088+
4089+ #### Defined in
4090+
4091+ [ packages/framework/esm-react-utils/src/useAttachments.ts:5] ( https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-react-utils/src/useAttachments.ts#L5 )
4092+
4093+ ___
4094+
39664095## Store Functions
39674096
39684097### createGlobalStore
0 commit comments