## addProfileToResource() function

Adds the supplied profileUrl to the resource.meta.profile if it is not already specified.

**Signature:**
```typescript
export declare function addProfileToResource<T extends Resource = Resource>(resource: T, profileUrl: string): T;
```

## Parameters

| Parameter  | Type   | Description                     |
|------------|--------|---------------------------------|
| resource   | T      | A FHIR resource                 |
| profileUrl | string | The profile URL to add          |

**Returns:**

T

The resource

- [addProfileToResource() function](/content/docs/sdk/core.addprofiletoresource#addprofiletoresource-function/index.html)
- [Parameters](/content/docs/sdk/core.addprofiletoresource#parameters/index.html)
