# Healthcare Assistance Automation via Soika AI Agent

### 1.Objective

To automate patient–hospital interactions using Soika AI Agents — from patient onboarding and medical data analysis to doctor scheduling, surgery slot management, and medication reminders — ensuring human clinician oversight, compliance, and safety.

### 2.Overview

The Smart Healthcare AI Agent acts as a digital hospital assistant that interacts with patients, guardians, and clinicians via chat, web portal, or WhatsApp.

It manages:

* Patient registration & consent
* Lab/X-ray report analysis
* Doctor referrals and appointment booking
* Operation Theatre (OT) scheduling
* Guardian medication reminders
* Automated email/SMS notifications

### 3.Flow Summary:

1. AI Agent collects patient identity & consent. Record Patients data and medical history.
2. Patient or staff uploads lab reports (PDF/image).
3. Agent extracts/reads reports (OCR), interprets values, and generates clinician-ready report explanation + suggested next steps.
4. Agent proposes surgical OT schedule slots based on doctor availability, OT availability, urgency, and prep time — recommends which specialist to refer.
5. Agent schedules notifications for guardian about medication times and sends reminders (SMS/WhatsApp/Email).

### 4.Step by Step Instructions

#### **A. AI Agent Creation** <a href="#a.-ai-agent-creation" id="a.-ai-agent-creation"></a>

**Step 1**

Login with username and password in Soika Mockingjay platform

**Step 2**

Give a **Natural Language Prompt to Soika** to create a General Agent -Click on New Chat(Right Panel).

Example: "Create a General Agent which is a Healthcare AI Agent\
Your purpose is to automate patient interaction, lab report analysis, surgery scheduling, and follow-up reminders — while ensuring safety, privacy, and clinician oversight."

**Step 3**

Soika will start creating the agent with Agent Name and Agent ID. Soika creates a Agent :Social Media Post Agent

**Step 4**

Choose your LLM Model for Social Media Post Agent in **Edit AI-> AI Model-> llama3.3**

<figure><img src="/files/k3AO3aTPF9BnPau3UHL1" alt=""><figcaption><p>Creation of AI Agent</p></figcaption></figure>

<figure><img src="/files/tuLfKwofq8uMGBXLZbkT" alt=""><figcaption><p>Agent Created with Agent ID and Capabilities</p></figcaption></figure>

#### **B. Tool Integration (Email + Base row)**

| Steps  | Instructions                                                                                                           |
| ------ | ---------------------------------------------------------------------------------------------------------------------- |
| Step 4 | Connect the AI Agent with the Default Tools under the Edit AI -->Tools-->default Tools Section  -->  Email  Tools      |
| Step 5 | Connect the AI Agent with the Default Tools under the Edit AI -->Tools-->default Tools Section  -->  Base Row DB Tools |

#### **C. Creation of Database in Base row DB**

* Create a Table  as mentioned below with the  API URL [Grid - Email\_Analyzer | Baserow](https://baserow.io/database/246855/table/585845/1090589)
* **Create a Table on the baserow\.io**:  <https://baserow.io/database/246844/table/585819/1090538>(**e.g. Table I**)
* **For Authorization in Soika Default Tools  Use API URL**: <https://api.baserow.io>

Image III, IV

#### **D . Enable & Manage Tools**

Go to `Tools → Default Tools` and enable:

* Email -   Enable the Function -Send Email
* Base row -Enable the Function-Get Rows
* Slack

| Steps                          | Instuctions                                                                                                                                     |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Step 7 :Enable and Mange Tools | <p></p><p>Once Authorized, Enabled the tools with the help of Tools-> Tools Manager - Default -Toggle the button. Example : Email, Base row</p> |

<figure><img src="/files/nCBU423lXGuTZdcRVPbS" alt=""><figcaption><p>Enable the functions w.r.t Email, Slack, Base Row DB</p></figcaption></figure>

#### Example of System Instructions

You are an intelligent Healthcare AI Agent. Your purpose is to automate patient interaction, lab report analysis, surgery scheduling, and follow-up reminders Your behavior: Patient/Guardian: “Hi.” AI: Welcome to Smart HealthCare AI Assistant! Core Functional Capabilities:

1. User Identification You will ask for the Patient's details such as:: Patient Name, Patient ID (if it is an existing Patient )date of Birth and contact details
   * Verify if the patient exists in the database in the Base row DB tool with Table ID 721407
   * If not, create a new record in the Table ID 721459 with Patient Name, Patient ID and contact details. -Generate a Patient ID example P4654 and update in the Base Row table in the Table with Table Name : New Patient Record and Table ID : 721459.

* Confirm consent to analyze medical data.&#x20;

2.**Referral Recommendation**

* Based on abnormal results, symptoms, or existing conditions, suggest the patient with Doctor name and availability. Collect all the details from the Base row Table with Table Name : Doctor Details with Table ID 721460
* Example: low hemoglobin → Hematologist; high creatinine → Nephrologist; chest pain → Cardiologist
* Store recommendation in the patient’s record and await clinician confirmation.
* Confirm the appointment of the doctor without asking for Patient Name, Patient ID&#x20;

3.**Smart Surgical Operation Theatre (OT) Scheduling** You ask the patient weather it would like to get the details of the OT Schedule, If yes, proceed with the below

* Access doctor and OT availability calendars from the Base row DB Table with Table ID 721419
* Match required Procedure of Operation, Urgency, date, estimated time
* Output details: Procedure of Operation, Urgency, date, estimated time
* Always mark schedules as *tentative* until approved by the doctor. -Give the user details in the chat

&#x20;4.**Sending Email to the user** -Before sending email confirm the Patient Name . Once confirmed send an email from the Send Email tool with all the details of the doctor's appointment. If the user asks for Medication Remainder, share the details in email from the Table Medication reminder schedule with Table ID 721437 . -Send email to the user with below example Example : “Hello \[Guardian Name], please give \[Patient Name] \[Medicine Name] now. Next dose at \[Time].”

* Allow guardian to confirm dose taken (“Reply DONE”) and log confirmation. "Hello \[Guardian Name] , you appointment with doctor \[Doctor name] has been confirmed on the date/time" Example User Prompts:
* “Upload my lab report and explain the results.”
* “Schedule a surgery for next week with a general surgeon.”
* “Which doctor should my mother visit for high creatinine?”
* “Remind me when to give medicines to Aarav.”
* “Show me all lab abnormalities detected this week.”

### Example of Agent performing various functionalities

<figure><img src="/files/KOkVNpoMwjUaLEA7PMAn" alt=""><figcaption><p>New PATIENT ID created</p></figcaption></figure>

<figure><img src="/files/mVLBCPrhB8KBILtjJUDY" alt=""><figcaption><p>Give user the appointment schedule based on the Inquiry</p></figcaption></figure>

<figure><img src="/files/2TdBNRHn5s0YBQ2U0opM" alt=""><figcaption><p>Notification shared to the Patient and Attendant</p></figcaption></figure>

<figure><img src="/files/WEIBGnR5GgmDrfn5AsgD" alt=""><figcaption><p>Remainder for Patient medications</p></figcaption></figure>

<figure><img src="/files/rC4ALxCJHwAtlh5QCQ1t" alt=""><figcaption><p>Email Confirming Patient Appointment</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://soika-labs.gitbook.io/soika-mockingjay/use-cases/healthcare-assistance-automation-via-soika-ai-agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
