From a9c82798d9ccba2cac30bd3c1cda6762cb894c61 Mon Sep 17 00:00:00 2001 From: hadijahkyampeire Date: Tue, 16 Jul 2024 18:25:38 +0300 Subject: [PATCH] add support for sorting by encounterDatetime --- src/encounters/encounters.resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/encounters/encounters.resource.ts b/src/encounters/encounters.resource.ts index 9516457..45887f8 100644 --- a/src/encounters/encounters.resource.ts +++ b/src/encounters/encounters.resource.ts @@ -126,7 +126,7 @@ export function useInfiniteEncounters(patientUuid: string) { return null; } - let url = `${restBaseUrl}/encounter?patient=${patientUuid}&v=${encounterRepresentation}&limit=${pageSize}&totalCount=true`; + let url = `${restBaseUrl}/encounter?patient=${patientUuid}&v=${encounterRepresentation}&order=desc&limit=${pageSize}`; if (pageIndex) { url += `&startIndex=${pageIndex * pageSize}`;