Repository: metriport/metriport
Pull request #3905: ENG-353 | PATCH | add patient.transfer to docs
Author: login: lucasdellabella
Created: 2025-05-27T19:05:32Z | Merged: 2025-05-27T21:29:21Z

metriport/metriport-internal#1040

Ref: ENG-353
Signed-off-by: Lucas Della Bella <dellabella.lucas@gmail.com>

### Dependencies

None

### Description

- Adds patient.transfer webhook event to docs
- Ran prettier over the file as well, so minor reformatting

<img width="372" alt="image" src="https://github.com/user-attachments/assets/31ca6668-e20a-42de-aa7f-66b9f42834d1" />

<img width="385" alt="image" src="https://github.com/user-attachments/assets/1c4b5e7f-f098-47fb-8b93-af2712843d93" />

### Testing

Verified working locally

### Release Plan

- [ ] Merge this
- [ ] Backmerge

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Documentation**
  - Added documentation for a new realtime patient notification event: `patient.transfer`, including event schema, payload details, and example JSON.
  - Updated `patient.admit` and `patient.discharge` event schemas to include a required `url` field for downloading FHIR bundles.
  - Improved formatting and updated example code to handle the new `patient.transfer` event.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/docs/medical-api/handling-data/realtime-patient-notifications.mdx b/docs/medical-api/handling-data/realtime-patient-notifications.mdx
index e16b463c51..e8933d70d7 100644
--- a/docs/medical-api/handling-data/realtime-patient-notifications.mdx
+++ b/docs/medical-api/handling-data/realtime-patient-notifications.mdx
@@ -36,7 +36,8 @@ Each realtime notification we send via webhook has a payload that includes key i
 If you want to access the clinical data, you need only download the json from the url. To work with the data, we recommend you understand [The Encounter Model](#the-encounter-model) below.
 
 <Info>
-  The URL remains valid and available for download for 600 seconds (10 minutes).
+  The URL remains valid and available for download for 600
+  seconds (10 minutes).
 </Info>
 
 ### The Encounter Model
@@ -65,7 +66,7 @@ Each of these patient journeys is represented via FHIR data - a FHIR [Encounter]
         "display": "Memorial Hospital"
       }
     }
-  ],
+  ]
   // And much more
 }
 ```
@@ -91,10 +92,9 @@ To provide comprehensive data about the Encounter, we serve a FHIR [Bundle](http
 }
 ```
 
-
 The first item in every bundle for a Metriport's Patient Notification is the root Encounter. Every item thereafter is a resource referenced by the Encounter. The bundle acts as a container for all resources, ensuring you have a standalone package of clinical data.
 
-If you're unfamiliar with FHIR, please read our [FHIR Overview](/medical-api/fhir/overview).
+If you're unfamiliar with FHIR, please read our [FHIR Overview](medical-api/fhir/overview).
 
 ### Handling Patient Notifications
 
@@ -112,6 +112,10 @@ if (event.meta.type === "patient.admit") {
   const payload = event.payload as PatientAdmitPayload;
   // process admit message
 }
+if (event.meta.type === "patient.transfer") {
+  const payload = event.payload as PatientTransferPayload;
+  // process transfer message
+}
 if (event.meta.type === "patient.discharge") {
   const payload = event.payload as PatientDischargePayload;
   // process discharge message
@@ -144,12 +148,16 @@ A Patient Admit event is emitted when a patient undergoes the admission process,
 
 <ResponseField name="payload" type="PatientAdmitPayload" required>
   <Expandable title="payload properties">
+    <ResponseField name="url" type="string" required>
+      The URL to download the FHIR bundle containing the FHIR data representing the comprehensive. It's valid for 10 minutes.
+    </ResponseField>
+
     <ResponseField name="patientId" type="string" required>
       The metriport patient id for this patient.
     </ResponseField>
 
     <ResponseField name="externalId" type="string" optional>
-      Your first party identifier assigned to this patient, if any. You can call [GET Patient](/medical-api/api-reference/patient/get-patient) to check whether a patient has an external id.
+      Your first party identifier assigned to this patient, if any. You can call [GET Patient](medical-api/api-reference/patient/get-patient) to check whether a patient has an external id.
     </ResponseField>
 
     <ResponseField name="whenSourceSent" type="string" required>
@@ -210,6 +218,160 @@ A Patient Admit event is emitted when a patient undergoes the admission process,
 }
 ```
 
+### `patient.transfer`
+
+A Patient Transfer event indicates that a patient has been moved from one location to another within a healthcare system. This could represent a transfer between departments, units, or facilities.
+
+#### Schema
+
+<ResponseField name="meta" required>
+  Metadata about the message.
+
+  <Expandable title="meta properties">
+    <ResponseField name="messageId" type="string" required>
+      A unique identifier for this webhook message. Use this only for debugging purposes.
+    </ResponseField>
+    <ResponseField name="when" type="string" required>
+      An ISO-8601 datetime of when this webhook was sent.
+    </ResponseField>
+    <ResponseField name="type" type="string" required>
+      The type of the patient webhook data message. For a transfer, it will be `patient.transfer`.
+    </ResponseField>
+  </Expandable>
+</ResponseField>
+
+<ResponseField name="payload" type="PatientTransferPayload" required>
+  <Expandable title="payload properties">
+    <ResponseField name="url" type="string" required>
+      The URL to download the FHIR bundle containing the FHIR data representing the comprehensive encounter. It's valid for 10 minutes.
+    </ResponseField>
+
+    <ResponseField name="patientId" type="string" required>
+      The metriport patient id for this patient.
+    </ResponseField>
+
+    <ResponseField name="externalId" type="string" optional>
+      Your first party identifier assigned to this patient, if any. You can call [GET Patient](medical-api/api-reference/patient/get-patient) to check whether a patient has an external id.
+    </ResponseField>
+
+    <ResponseField name="whenSourceSent" type="string" required>
+      Specifies when this data was initially shared with Metriport.
+    </ResponseField>
+
+    <ResponseField name="additionalIds" type="object" required>
+      An array of objects describing the Documents that can be retrieved for the Patient - will only be present for `document-download` messages.
+
+      <Expandable title="object properties">
+        <ResponseField name="athenahealth" type="string[]">
+          Athena patient ID. If more than one patient in Athena maps to a Metriport patient, they
+          will all be included.
+        </ResponseField>
+
+        <ResponseField name="canvas" type="string[]">
+          Canvas patient ID. If more than one patient in Canvas maps to a Metriport patient, they
+          will all be included.
+        </ResponseField>
+
+        <ResponseField name="elation" type="string[]">
+          Elation Patient ID. If more than one patient in Elation maps to a Metriport patient, they
+          will all be included.
+        </ResponseField>
+
+        <ResponseField name="healthie" type="string[]">
+          Healthie Patient ID. If more than one patient in Healthie maps to a Metriport patient, they
+          will all be included.
+        </ResponseField>
+      </Expandable>
+    </ResponseField>
+
+    <ResponseField name="admitTimestamp" type="string">
+      When the patient for this encounter was officially admitted for care.
+    </ResponseField>
+
+    <ResponseField name="transfers" type="array" required>
+      An array of transfer records, each representing a single transfer of the patient from one location to another.
+
+      <Expandable title="array item properties">
+        <ResponseField name="timestamp" type="string">
+          When this specific transfer occurred.
+        </ResponseField>
+
+        <ResponseField name="sourceLocation" type="object">
+          Information about the location the patient was transferred from.
+
+          <Expandable title="object properties">
+            <ResponseField name="name" type="string">
+              The name of the source location.
+            </ResponseField>
+            <ResponseField name="type" type="string">
+              The type of the source location (e.g., department, unit, facility).
+            </ResponseField>
+          </Expandable>
+        </ResponseField>
+
+        <ResponseField name="destinationLocation" type="object">
+          Information about the location the patient was transferred to.
+
+          <Expandable title="object properties">
+            <ResponseField name="name" type="string">
+              The name of the destination location.
+            </ResponseField>
+            <ResponseField name="type" type="string">
+              The type of the destination location (e.g., department, unit, facility).
+            </ResponseField>
+          </Expandable>
+        </ResponseField>
+      </Expandable>
+    </ResponseField>
+
+  </Expandable>
+</ResponseField>
+
+#### Example payload
+
+```json
+{
+  "meta": {
+    "messageId": "1e82424a-1220-473d-a0d1-6e5fde15159e",
+    "when": "2025-01-30T20:30:01.000Z",
+    "type": "patient.transfer"
+  },
+  "payload": {
+    "url": "<presigned-download-url>",
+    "patientId": "metriport-patient-uuid",
+    "externalId": "your-first-party-id",
+    "additionalIds": {
+      "athenahealth": ["99992"]
+    },
+    "admitTimestamp": "2025-01-28T23:00:00.000Z",
+    "transfers": [
+      {
+        "timestamp": "2025-01-29T15:45:00.000Z",
+        "sourceLocation": {
+          "name": "Emergency Department",
+          "type": "department"
+        },
+        "destinationLocation": {
+          "name": "General Medical Ward",
+          "type": "unit"
+        }
+      },
+      {
+        "timestamp": "2025-01-30T20:30:00.000Z",
+        "sourceLocation": {
+          "name": "General Medical Ward",
+          "type": "unit"
+        },
+        "destinationLocation": {
+          "name": "Intensive Care Unit",
+          "type": "unit"
+        }
+      }
+    ]
+  }
+}
+```
+
 ### `patient.discharge`
 
 A Patient Discharge event indicates the end of a patient's stay in a healthcare facility. The patient now has the status "discharged" and an officially recorded discharge date.
@@ -234,12 +396,16 @@ A Patient Discharge event indicates the end of a patient's stay in a healthcare
 
 <ResponseField name="payload" type="PatientDischargePayload" required>
   <Expandable title="payload properties">
+    <ResponseField name="url" type="string" required>
+      The URL to download the FHIR bundle containing the FHIR data representing the comprehensive. It's valid for 10 minutes.
+    </ResponseField>
+    
     <ResponseField name="patientId" type="string" required>
       The metriport patient id for this patient.
     </ResponseField>
 
     <ResponseField name="externalId" type="string" optional>
-      Your first party identifier assigned to this patient, if any. You can call [GET Patient](/medical-api/api-reference/patient/get-patient) to check whether a patient has an external id.
+      Your first party identifier assigned to this patient, if any. You can call [GET Patient](medical-api/api-reference/patient/get-patient) to check whether a patient has an external id.
     </ResponseField>
 
     <ResponseField name="whenSourceSent" type="string" required>
@@ -280,10 +446,6 @@ A Patient Discharge event indicates the end of a patient's stay in a healthcare
       When the patient for this encounter was officially discharged by the provider.
     </ResponseField>
 
-    <ResponseField name="url" type="string">
-      The URL to download the FHIR bundle containing the FHIR data representing the comprehensive. It's valid for 10 minutes.
-    </ResponseField>
-
   </Expandable>
 </ResponseField>
 
@@ -312,5 +474,7 @@ A Patient Discharge event indicates the end of a patient's stay in a healthcare
 ## Additional Resources
 
 ### Full FHIR Encounter
-  The below is an example of a full FHIR encounter
-  <Snippet file="example-adt-encounter-json.mdx" />
\ No newline at end of file
+
+The below is an example of a full FHIR encounter
+
+<Snippet file="example-adt-encounter-json.mdx" />
diff --git a/packages/infra/lib/secrets-stack.ts b/packages/infra/lib/secrets-stack.ts
index c6f4b50471..49ad5b4a3b 100644
--- a/packages/infra/lib/secrets-stack.ts
+++ b/packages/infra/lib/secrets-stack.ts
@@ -78,6 +78,13 @@ export class SecretsStack extends Stack {
       logSecretInfo(this, secret, secretName);
     }
 
+    if (props.config.surescripts) {
+      for (const secretName of Object.values(props.config.surescripts.secrets)) {
+        const secret = makeSecret(secretName);
+        logSecretInfo(this, secret, secretName);
+      }
+    }
+
     if (!isSandbox(props.config)) {
       for (const secretName of Object.values(props.config.hl7Notification.secrets)) {
         const secret = makeSecret(secretName);


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>docs/medical-api/handling-data/realtime-patient-notifications.mdx (2)</summary><blockquote>

`151-153`: **Clarify the payload URL description.** The phrase “containing the FHIR data representing the comprehensive.” is incomplete. Consider rephrasing to something like:  
> “The URL to download the FHIR bundle containing the complete encounter data. It’s valid for 10 minutes.”

---

`399-401`: **Discharge payload URL description needs clarification.** Similar to the admit section, rephrase to “The URL to download the FHIR bundle containing the complete encounter data. It’s valid for 10 minutes.” to avoid the incomplete phrase “representing the comprehensive.”

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 21a34a2bd2246539121c33aec72e767730d91a9e and 884f128523b0c62413310bc366d1ec68d6b5382b.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `docs/medical-api/handling-data/realtime-patient-notifications.mdx` (8 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: Analyze (javascript)

</details>

<details>
<summary>🔇 Additional comments (10)</summary><blockquote>

<details>
<summary>docs/medical-api/handling-data/realtime-patient-notifications.mdx (10)</summary>

`39-40`: **Clear explanation of URL expiration.** The Info block clearly states the URL validity window in both seconds and minutes, which is helpful for developers.

---

`69-69`: **JSON example formatting looks correct.** The closing bracket aligns properly with the opening of the `location` array.

---

`97-97`: **FHIR overview link is consistent.** The relative path to the FHIR overview section matches existing link conventions.

---

`160-160`: **External ID guidance is well explained.** The reference to the GET Patient endpoint helps users understand how to retrieve additional identifiers.

---

`221-224`: **New `patient.transfer` event section is clear.** The heading, description, and event context are concise and match existing patterns for other event types.

---

`225-226`: **Schema subheading follows project conventions.** The `#### Schema` header is consistent with other event sections.

---

`227-241`: **Meta schema is comprehensive.** All required fields (`messageId`, `when`, `type`) are documented correctly for `patient.transfer`.

---

`243-328`: **Payload schema aligns with event requirements.** The new `PatientTransferPayload` properties (`url`, `patientId`, `externalId`, `whenSourceSent`, `additionalIds`, `admitTimestamp`, and `transfers`) are all present and described consistently with other payload definitions.

---

`332-373`: **Transfer event example payload is accurate.** The JSON example properly demonstrates nested `transfers` records with timestamps and locations.

---

`408-408`: **External ID guidance is consistent.** The note on how to verify an external ID aligns with the admit and transfer payload sections.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-27T19:08:58Z
user: login: Goncharo
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-27T21:26:57Z

Review comments:
diff_hunk: @@ -112,6 +112,10 @@ if (event.meta.type === "patient.admit") {
   const payload = event.payload as PatientAdmitPayload;
   // process admit message
 }
+if (event.meta.type === "patient.transfer") {
+  const payload = event.payload as PatientTransferPayload;
+  // process discharge message
path: docs/medical-api/handling-data/realtime-patient-notifications.mdx
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Incorrect comment for transfer handler.** The comment on line 117 still reads `// process discharge message` but it should reference processing the transfer event (e.g., `// process transfer message`). 
```diff
- if (event.meta.type === "patient.transfer") {
-   const payload = event.payload as PatientTransferPayload;
-   // process discharge message
+ if (event.meta.type === "patient.transfer") {
+   const payload = event.payload as PatientTransferPayload;
+   // process transfer message
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
if (event.meta.type === "patient.transfer") {
  const payload = event.payload as PatientTransferPayload;
  // process transfer message
```

</details>

<!-- suggestion_end -->

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In docs/medical-api/handling-data/realtime-patient-notifications.mdx around
lines 115 to 117, the comment incorrectly states "// process discharge message"
for the patient transfer event handler. Update the comment to correctly reflect
the event being handled by changing it to "// process transfer message" to avoid
confusion.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit ffc381f
created_at: 2025-05-27T19:08:57Z
author_association: NONE
diff_hunk: @@ -312,5 +474,8 @@
 ## Additional Resources
 
 ### Full FHIR Encounter
-  The below is an example of a full FHIR encounter
-  <Snippet file="example-adt-encounter-json.mdx" />
+
+The below is an example of a full FHIR encounter
+
+{" "}
+<Snippet file="example-adt-encounter-json.mdx" />
path: docs/medical-api/handling-data/realtime-patient-notifications.mdx
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Remove stray JSX fragment.** The standalone `{" "}` on line 480 adds an unintended whitespace-only fragment. You can remove it to keep the MDX clean:  
```diff
- {" "}
```  



<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
The below is an example of a full FHIR encounter

<Snippet file="example-adt-encounter-json.mdx" />
```

</details>

<!-- suggestion_end -->

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In docs/medical-api/handling-data/realtime-patient-notifications.mdx at lines
478 to 481, remove the stray JSX fragment {" "} on line 480 as it adds an
unintended whitespace-only fragment. Simply delete this fragment to keep the MDX
content clean and avoid unnecessary whitespace.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit ffc381f
created_at: 2025-05-27T19:08:57Z
author_association: NONE

PR comments:
user: login: linear[bot]
created_at: 2025-05-27T19:05:34Z
body: <p><a href="https://linear.app/metriport/issue/ENG-353/add-patienttransfer-to-docs">ENG-353 Add patient.transfer to docs</a></p>
author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-05-27T19:05:39Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The documentation for realtime patient notifications was updated to introduce a new `patient.transfer` event type, detailing its schema and payload. The `patient.admit` and `patient.discharge` event schemas were revised to include a required `url` field. Example code and formatting throughout the document were also updated.

## Changes

| File(s)                                                        | Change Summary                                                                                                 |
|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
| docs/medical-api/handling-data/realtime-patient-notifications.mdx | Added documentation for `patient.transfer` event, updated `patient.admit` and `patient.discharge` schemas to require `url`, revised example code to handle new event, and made formatting improvements. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant WebhookSource as Healthcare System
    participant APIConsumer as API Consumer

    WebhookSource->>APIConsumer: Send patient.admit event (with url)
    WebhookSource->>APIConsumer: Send patient.discharge event (with url)
    WebhookSource->>APIConsumer: Send patient.transfer event (with url)

    APIConsumer->>WebhookSource: (Optional) Download FHIR bundle from url
```

## Possibly related PRs

- metriport/metriport#3767: Initial documentation for realtime patient notifications including `patient.admit` and `patient.discharge` events, serving as the foundation expanded by this PR.

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 884f128523b0c62413310bc366d1ec68d6b5382b and ffc381f86c785f813da8f9344b72ebff681c6122.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `docs/medical-api/handling-data/realtime-patient-notifications.mdx` (8 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* docs/medical-api/handling-data/realtime-patient-notifications.mdx

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: check-pr / lint-build-test
* GitHub Check: Analyze (javascript)

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcSHFcLzpIACIAUQA5AHEwAGYAVhTIAB9rAEFoAGEACWz0Wnpuanh2DVwqDEQAM0ow/EhafAZEaMgAdzRkBwFmdRp6OUhsRBavbAYBpR8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UJ2+WPaSX9opUOlcBhR1kSiCUpsmjtG6O3AYu4TpQhQhlZAVxppdkWLprSBmpzDpRvovAxdASojDWrdSzFb7sUzybdaKq0QeLeV8gJTuHUTKEFIOZRxUl+q2TQPZRwbViwuXUioNQHkdIwb0goVg6gAD69tEAUf8BIaonpaAUaLo8LyPlSMAA4OP/kaD+AATBxtIfGUgCAOAwAAbHx/8P4UgpD/AIBgKRxPidoD+UQ4mOO0HEwIDIHG+MCDYwYUjjRGiKY4z+RoHHxMMAAOyCcszJsMHHGh7BSP+f8AgbN8exCZjTP4JP8b44Zoz/EyNnyo5C2jxIGN0Ao4JfQQA=== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=metriport/metriport&utm_content=3905):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-27T19:05:58Z
body: ⚠️ This PR is titled PATCH or RELEASE but its not targeting the `master` branch. Please update the base branch to `master` or update the PR title.
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-27T19:07:34Z
body: ⚠️ This PR is titled PATCH or RELEASE but its not targeting the `master` branch. Please update the base branch to `master` or update the PR title.
author_association: NONE