Skip to main content
Glama
ExportPage.tsx1.02 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { Alert } from '@mantine/core'; import type { ResourceType } from '@medplum/fhirtypes'; import { Document, PatientExportForm, useResource } from '@medplum/react'; import { IconAlertCircle } from '@tabler/icons-react'; import type { JSX } from 'react'; import { useParams } from 'react-router'; export function ExportPage(): JSX.Element | null { const { resourceType, id } = useParams() as { resourceType: ResourceType; id: string }; const resource = useResource({ reference: resourceType + '/' + id }); if (!resource) { return null; } return ( <Document maw={700}> {resource.resourceType === 'Patient' ? ( <PatientExportForm patient={resource} /> ) : ( <Alert icon={<IconAlertCircle size={16} />} title="Unsupported export type" color="red"> This page is only supported for Patient resources </Alert> )} </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