Skip to main content
Glama
ResourcePropertyDisplay.stories.tsx1.77 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { PropertyType } from '@medplum/core'; import type { Attachment } from '@medplum/fhirtypes'; import { HomerSimpson } from '@medplum/mock'; import type { Meta } from '@storybook/react'; import type { JSX } from 'react'; import { Document } from '../Document/Document'; import { ResourcePropertyDisplay } from './ResourcePropertyDisplay'; export default { title: 'Medplum/ResourcePropertyDisplay', component: ResourcePropertyDisplay, } as Meta; export const Name = (): JSX.Element => ( <Document> <ResourcePropertyDisplay value={HomerSimpson.name} property={{ path: 'Patient.name', description: '', min: 0, max: Infinity, isArray: true, type: [{ code: 'HumanName' }], }} propertyType={PropertyType.HumanName} /> </Document> ); export const Address = (): JSX.Element => ( <Document> <ResourcePropertyDisplay value={HomerSimpson.address} property={{ path: 'Patient.address', description: '', min: 0, max: Infinity, isArray: true, type: [{ code: 'Address' }], }} propertyType={PropertyType.Address} /> </Document> ); export const AttachmentProperty = (): JSX.Element => ( <Document> <ResourcePropertyDisplay value={[ { url: 'http://example.com/foo.txt', } as Attachment, ]} property={{ path: 'Patient.photo', description: '', min: 0, max: Infinity, isArray: true, type: [{ code: 'Attachment' }], }} propertyType={PropertyType.Attachment} /> </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