File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/components/BedStatsWidget Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { Bundle, Location } from '@medplum/fhirtypes';
55import { useMedplum , useSubscription } from '@medplum/react' ;
66import { 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 ) ;
You can’t perform that action at this time.
0 commit comments