core.parsereference
Home > @medplum/core > parseReference
parseReference() function
Parses a reference and returns a tuple of [ResourceType, ID].
Signature:
export declare function parseReference(reference: Reference): [ResourceType, string] | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
reference | Reference | A reference to a FHIR resource. |
Returns:
[ResourceType, string] | undefined
A tuple containing the ResourceType
and the ID of the resource or undefined
when undefined
or an invalid reference is passed.