Skip to main content

core.isresourcetype

Home > @medplum/core > isResourceType

isResourceType() function

Returns true if the given string is a valid FHIR resource type.

Signature:

export declare function isResourceType(resourceType: string): boolean;

Parameters

Parameter

Type

Description

resourceType

string

The candidate resource type string.

Returns:

boolean

True if the resource type is a valid FHIR resource type.

Example

isResourceType('Patient'); // true
isResourceType('XYZ'); // false