@openmrs/esm-patient-common-lib 11.3.1-pre.9455 → 11.3.1-pre.9458

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-common-lib",
3
- "version": "11.3.1-pre.9455",
3
+ "version": "11.3.1-pre.9458",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Library for common patient chart components",
6
6
  "browser": "dist/openmrs-esm-patient-common-lib.js",
@@ -1,6 +1,6 @@
1
- import { restBaseUrl } from '@openmrs/esm-framework';
2
1
  import { useCallback } from 'react';
3
2
  import { useSWRConfig } from 'swr';
3
+ import { restBaseUrl } from '@openmrs/esm-framework';
4
4
 
5
5
  /**
6
6
  * Returns a function which refreshes the patient orders cache. Uses SWR's mutate function.
@@ -36,8 +36,12 @@ export function usePatientOrders(
36
36
 
37
37
  const mutateOrders = useCallback(
38
38
  () =>
39
- mutate((key) => typeof key === 'string' && key.startsWith(`${restBaseUrl}/order?patient=${patientUuid}`), data),
40
- [data, mutate, patientUuid],
39
+ mutate(
40
+ (key) => typeof key === 'string' && key.startsWith(`${restBaseUrl}/order?patient=${patientUuid}`),
41
+ undefined,
42
+ { revalidate: true },
43
+ ),
44
+ [mutate, patientUuid],
41
45
  );
42
46
 
43
47
  const orders = useMemo(