## getReferenceString() function

Returns a reference string for a resource.

**Signature:**

```typescript
export declare function getReferenceString(input: (Reference & {
    reference: string;
}) | WithId<Resource>): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| input | (Reference & { reference: string; }) \| [WithId](/content/docs/sdk/core.withid) <Resource> | The FHIR resource or reference. |

**Returns:**

string

A reference string of the form resourceType/id.
