-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) O3-4015 - Ward App - unassign bed from patient when they are tr…
…ansferred
- Loading branch information
Showing
4 changed files
with
110 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework'; | ||
import { type BedDetail } from '../types'; | ||
import useSWR from 'swr'; | ||
|
||
export function useAssignedBedByPatient(patientUuid: string) { | ||
const url = `${restBaseUrl}/beds?patientUuid=${patientUuid}`; | ||
|
||
return useSWR<{ data: { results: Array<BedDetail> } }, Error>(url, openmrsFetch); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters