Skip to main content
Glama
SearchControlField.test.ts906 B
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { getFieldDefinitions } from './SearchControlField'; describe('getFieldDefinitions', () => { test('prefix field names do not match in searchParam expressions', () => { const fieldDefs = getFieldDefinitions({ resourceType: 'Patient', fields: ['id', 'identifier'], }); expect(fieldDefs.length).toBe(2); const idField = fieldDefs.find((field) => field.name === 'id'); const identifierField = fieldDefs.find((field) => field.name === 'identifier'); expect(idField?.searchParams?.length).toBe(1); expect(idField?.searchParams?.find((sp) => sp.code === '_id')).toBeDefined(); expect(identifierField?.searchParams?.length).toBe(1); expect(identifierField?.searchParams?.find((sp) => sp.code === 'identifier')).toBeDefined(); }); });

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