Skip to main content
Glama
QuestionnairePreview.tsx1.02 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { Alert, Anchor } from '@mantine/core'; import type { ResourceType } from '@medplum/fhirtypes'; import { Document, QuestionnaireForm } from '@medplum/react'; import { IconAlertCircle } from '@tabler/icons-react'; import type { JSX } from 'react'; export interface QuestionnairePreviewProps { readonly resourceType: ResourceType; readonly id: string; } export function QuestionnairePreview(props: QuestionnairePreviewProps): JSX.Element { const { resourceType, id } = props; return ( <Document> <Alert icon={<IconAlertCircle size={16} />} mb="xl"> This is just a preview! Access your form here: <br /> <Anchor href={`/forms/${id}`}>{`/forms/${id}`}</Anchor> </Alert> <QuestionnaireForm questionnaire={{ reference: resourceType + '/' + id }} onSubmit={() => alert('You submitted the preview')} /> </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