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 | undefined): [ResourceType, string];
Parameters
Parameter | Type | Description |
---|---|---|
reference | Reference | undefined | A reference to a FHIR resource. |
Returns:
[ResourceType, string]
A tuple containing the ResourceType
and the ID of the resource or undefined
when undefined
or an invalid reference is passed.