Skip to main content
Glama
careplan.ts1.17 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import type { CarePlan } from '@medplum/fhirtypes'; import { OID_INSTRUCTIONS } from '../../oids'; import { mapCodeableConceptToCcdaValue } from '../../systems'; import type { CcdaCode, CcdaEntry } from '../../types'; import type { FhirToCcdaConverter } from '../convert'; import { createTextFromExtensions, mapIdentifiers } from '../utils'; export function createPlanOfTreatmentCarePlanEntry( _converter: FhirToCcdaConverter, resource: CarePlan ): CcdaEntry | undefined { if (resource.status === 'completed') { return { act: [ { '@_classCode': 'ACT', '@_moodCode': 'INT', templateId: [{ '@_root': OID_INSTRUCTIONS }], id: mapIdentifiers(resource.id, resource.identifier), code: mapCodeableConceptToCcdaValue(resource.category?.[0]) as CcdaCode, text: resource.description ? { '#text': resource.description } : createTextFromExtensions(resource.extension), statusCode: { '@_code': resource.status }, }, ], }; } return undefined; }

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