Skip to main content
Glama
MedicationPage.tsx1.07 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { Title } from '@mantine/core'; import { getDisplayString } from '@medplum/core'; import type { MedicationKnowledge } from '@medplum/fhirtypes'; import { Document, Loading, ResourceTable, useMedplum } from '@medplum/react'; import { useEffect, useState } from 'react'; import type { JSX } from 'react'; import { useParams } from 'react-router'; export function MedicationPage(): JSX.Element { const medplum = useMedplum(); const { id } = useParams(); const [medicationKnowledge, setMedicationKnowledge] = useState<MedicationKnowledge>(); useEffect(() => { if (id) { medplum.readResource('MedicationKnowledge', id).then(setMedicationKnowledge).catch(console.error); } }, [id, medplum]); if (!medicationKnowledge) { return <Loading />; } return ( <Document> <Title>{getDisplayString(medicationKnowledge)}</Title> <ResourceTable key={id} value={medicationKnowledge} /> </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