import { FhirPractitionerDisplay } from '../../../../components/FhirPractitionerDisplay/FhirPractitionerDisplay'; import { usePractitionerServiceContext, useStaffPermissionServiceContext } from '../../../../services'; import UserEditPractitionerProfilePage from './UserEditPractitionerProfilePage/UserEditPractitionerProfilePage'; // The Profile tab. staff:manage edits; staff:view reads the same facts with no form and no acts, // because the edit page assumes the authority to save and must not be handed to a viewer. const StaffRecordProfile = () => { const { canManage } = useStaffPermissionServiceContext(); const { practitionerState } = usePractitionerServiceContext(); if (canManage('staff')) return ; if (!practitionerState?.practitioner) return null; return ( ); }; export default StaffRecordProfile;