## MedplumClient.notifyResourceModified() method

Notifies listeners that a resource was modified outside of the standard CRUD methods, and invalidates the relevant cached values.

The client emits the `resourceModified` event automatically for `createResource`, `updateResource`, `patchResource`, `deleteResource`, and related methods. Use this method to announce modifications the client cannot classify itself, such as custom operations, GraphQL mutations, or out-of-band changes:

```typescript
await medplum.post(medplum.fhirUrl('Appointment', '$book'), parameters);

medplum.notifyResourceModified({ resourceType: 'Appointment', operation: 'create' });

medplum.notifyResourceModified({ resourceType: 'Slot', operation: 'update' });
```

Cached searches for the resource type are invalidated. If `event.resource` is provided for a non-delete operation, it becomes the cached read value; otherwise, if `event.id` is provided, the cached read is invalidated.

**Signature:**

```typescript
notifyResourceModified(event: ResourceModifiedEvent): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| event | [ResourceModifiedEvent](/content/docs/sdk/core.resourcemodifiedevent) | The resource modification to announce. |

**Returns:**

void

- [MedplumClient.notifyResourceModified() method](/content/docs/sdk/core.medplumclient.notifyresourcemodified#medplumclientnotifyresourcemodified-method/index.html)
- [Parameters](/content/docs/sdk/core.medplumclient.notifyresourcemodified#parameters/index.html)
