Skip to main content
Glama
clinicalimpression.ts1.5 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import type { ClinicalImpression } from '@medplum/fhirtypes'; import { mapFhirToCcdaDate } from '../../datetime'; import { OID_LOINC_CODE_SYSTEM, OID_NOTE_ACTIVITY } from '../../oids'; import { LOINC_NOTES_SECTION, mapCodeableConceptToCcdaCode } from '../../systems'; import type { CcdaEntry } from '../../types'; import type { FhirToCcdaConverter } from '../convert'; import { createTextFromExtensions, mapIdentifiers } from '../utils'; export function createClinicalImpressionEntry( converter: FhirToCcdaConverter, resource: ClinicalImpression ): CcdaEntry | undefined { return { act: [ { '@_classCode': 'ACT', '@_moodCode': 'EVN', templateId: [{ '@_root': OID_NOTE_ACTIVITY, '@_extension': '2016-11-01' }], id: mapIdentifiers(resource.id, resource.identifier), code: mapCodeableConceptToCcdaCode(resource.code) ?? { '@_code': LOINC_NOTES_SECTION, '@_codeSystem': OID_LOINC_CODE_SYSTEM, '@_codeSystemName': 'LOINC', '@_displayName': 'Note', }, text: resource.summary ? { '#text': resource.summary } : createTextFromExtensions(resource.extension), statusCode: { '@_code': 'completed' }, effectiveTime: [{ '@_value': mapFhirToCcdaDate(resource.date) }], author: converter.mapAuthor(resource.assessor, resource.date), }, ], }; }

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