Skip to content

Instantly share code, notes, and snippets.

View amosmachora's full-sized avatar
🏠
Working from home

Amos Machora amosmachora

🏠
Working from home
View GitHub Profile
@amosmachora
amosmachora / laboratory-resource.ts
Created October 3, 2024 12:07
Session approach to storing and updating date ranges
import { openmrsFetch, restBaseUrl, useConfig } from '@openmrs/esm-framework';
import { Order } from '@openmrs/esm-patient-common-lib';
import { useMemo } from 'react';
import useSWR from 'swr';
import { useSessionStorage } from './hooks/use-session-storage';
import { FulfillerStatus, GroupedOrders } from './types';
/**
* Custom hook for retrieving laboratory orders based on the specified status.
*