import React from 'react'; import { useDefineAppContext } from '@openmrs/esm-framework'; import { useWardPatientGrouping } from '../../hooks/useWardPatientGrouping'; import { type MaternalWardViewContext, WardMetricType, type WardViewContext } from '../../types'; import { useMotherChildrenRelationshipsByPatient } from './maternal-ward-view.resource'; import MaternalWardBeds from './maternal-ward-beds.component'; import MaternalWardPatientCardHeader from './maternal-ward-patient-card-header.component'; import MaternalWardPendingPatients from './maternal-ward-pending-patients.component'; import MaternalWardUnassignedPatients from './maternal-ward-unassigned-patients.component'; import Ward from '../ward.component'; import WardViewHeader from '../../ward-view-header/ward-view-header.component'; import WardMetrics from '../../ward-view-header/ward-metrics.component'; const MaternalWardView = () => { const wardPatientGroupDetails = useWardPatientGrouping(); useDefineAppContext('ward-view-context', { wardPatientGroupDetails, WardPatientHeader: MaternalWardPatientCardHeader, }); const { allWardPatientUuids, isLoading } = wardPatientGroupDetails; const motherChildRelationships = useMotherChildrenRelationshipsByPatient(Array.from(allWardPatientUuids), !isLoading); useDefineAppContext('maternal-ward-view-context', { motherChildRelationships, }); const wardBeds = ; const wardMetrics = ( ); const wardUnassignedPatients = ; const wardPendingPatients = ; return ( <> ); }; export default MaternalWardView;