Skip to content

Commit b41c90f

Browse files
committed
remove last hard coded id
1 parent 367079d commit b41c90f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/BedStatsWidget/BedStatsWidget.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Bundle, Location } from '@medplum/fhirtypes';
55
import { useMedplum, useSubscription } from '@medplum/react';
66
import { useCallback, useEffect, useMemo, useState } from 'react';
77

8-
const parentOrgId = 'ba836894-122f-42d0-874b-83ea9557e4f3';
8+
const parentOrgName = 'SampleMed';
99

1010
// We pulled this out because it prevents the object from being recreated on every re-render
1111
// It also makes us hit the fast path for `deepEquals` of object reference equality within the useSubscription hook
@@ -36,7 +36,7 @@ export function BedStatsWidget(): JSX.Element {
3636
const result = await medplum.graphql(
3737
`
3838
{
39-
Location(id: "${parentOrgId}") {
39+
LocationList(name: "${parentOrgName}") {
4040
id
4141
name
4242
LocationList(_reference: partof, physical_type: "lvl") {
@@ -74,7 +74,7 @@ export function BedStatsWidget(): JSX.Element {
7474
);
7575

7676
const locations = [] as Location[];
77-
for (const level of result.data.Location.LocationList) {
77+
for (const level of result.data.LocationList[0].LocationList) {
7878
locations.push({ ...level });
7979
}
8080
setLocations(locations);

0 commit comments

Comments
 (0)