core.findcodebysystem | Medplum

findCodeBySystem() function

Finds the code for a specific system in a list of CodeableConcepts.

Signature:

export declare function findCodeBySystem(categories: CodeableConcept[] | undefined, system: string): string | undefined;

Parameters

Parameter Type Description
categories CodeableConcept[] undefined
system string The system to match.

Returns:

string | undefined

The code for the matching system, or undefined if not found.