Skip to main content
Glama
AuditEventPage.tsx1.22 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import type { SearchRequest } from '@medplum/core'; import { Operator } from '@medplum/core'; import type { ResourceType } from '@medplum/fhirtypes'; import { Document, SearchControl } from '@medplum/react'; import type { JSX } from 'react'; import { useState } from 'react'; import { useNavigate, useParams } from 'react-router'; export function AuditEventPage(): JSX.Element | null { const { resourceType, id } = useParams() as { resourceType: ResourceType; id: string }; const navigate = useNavigate(); const [search, setSearch] = useState<SearchRequest>({ resourceType: 'AuditEvent', filters: [{ code: 'entity', operator: Operator.EQUALS, value: `${resourceType}/${id}` }], fields: ['id', 'outcome', 'outcomeDesc', '_lastUpdated'], sortRules: [{ code: '-_lastUpdated' }], count: 20, }); return ( <Document> <SearchControl search={search} onClick={(e) => navigate(`/${e.resource.resourceType}/${e.resource.id}`)?.catch(console.error)} onChange={(e) => setSearch(e.definition)} hideFilters /> </Document> ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server