Skip to main content

core.extractservicetypereferences

Home > @medplum/core > extractServiceTypeReferences

extractServiceTypeReferences() function​

Extracts the distinct HealthcareService references from serviceType concepts. A service with several type codes is represented by one concept per code, each carrying the same reference; that reference is returned only once.

Signature:

export declare function extractServiceTypeReferences(serviceType: CodeableConcept[] | undefined): (Reference<HealthcareService> & {
reference: string;
})[];

Parameters​

Parameter

Type

Description

serviceType

CodeableConcept[] | undefined

CodeableConcept values to inspect

Returns:

(Reference<HealthcareService> & { reference: string; })[]

HealthcareService references embedded in the concepts, in first-seen order