Patient Service Agent

Agent Description:

The Patient Service Agent is a healthcare data coordination assistant designed to streamline the appointment-to-specialist workflow. It extracts appointment information, identifies the appropriate department based on symptoms, and checks doctor availability to ensure efficient patient allocation.

Purpose and Components
  • Purpose: To manage patient appointments by extracting structured data from APIs, mapping symptoms to medical specialists, and assigning available doctors based on schedules.
  • Components:
    • An appointment reader that formats incoming patient appointment data.
    • A specialist assignment engine that matches symptoms to departments and allocates a suitable doctor based on availability.
Supported Capabilities
  • Retrieving patient appointment data from API sources.
  • Parsing and formatting appointment data into human-readable tables.
  • Mapping symptoms to medical specialties using predefined mappings.
  • Checking real-time doctor availability and assigning doctors accordingly.
  • Returning a final, complete patient-to-doctor assignment report.
LLM Used
  • Google Vertex
    Note: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.

Sub-Agents

1. Patient Appointment Reader

  • Role: Data Extractor.
  • Scope: Connect to healthcare appointment APIs and prepare data for downstream processing.

  • Description: This subagent fetches patient appointment details using a GET API call. It processes the incoming JSON data and structures it into a clear tabular format with the following columns:
    • Patient Name
    • Age
    • Symptoms
    • Appointment Date

    The result is a readable table that forms the foundation for symptom-specialist mapping and doctor allocation.

  • Tool Used:GET Request Tool

2. Specialist Assignment Agent

  • Role: Data Reader.
  • Scope: Use symptom mapping and doctor availability data to guide specialist assignment.
  • Description: This subagent receives the appointment table and uses two referenced PDFs for decision-making:
    • Symptom-to-Specialist Mapping PDF — Defines how symptoms correspond to medical specialties.
    • Doctor Availability Schedule PDF — Lists available doctors by department and date.
    • For each patient, the agent:
      • Determines the appropriate department based on symptoms.
      • Identifies an available doctor in that department on the requested appointment date.
      • Includes room/location if listed.
  • The output is a complete appointment assignment record for each patient.
  • Tool Used: PDF Reader Tool
Tools Used
  • GET Request Tool – For accessing real-time patient appointment data.
  • PDF Reader Tool – For processing symptom-specialist mapping and doctor availability schedules.
Note: For details on modifying the Tools, refer Tools Library section.
Agent Workflow Behavior Summary
  • The Patient Appointment Reader retrieves and formats patient appointment data into a structured table using API responses.
  • The Specialist Assignment Agent consults the mapping rules and doctor availability schedules to match each patient to the correct department and assign an available doctor.
  • The result is a full report that includes the patient's name, assigned department, doctor, appointment date, and room/location (if applicable), making it ready for administrative use.
Sample Questions:
  • Which patients reported cardiac-related symptoms?
  • List the departments involved in the current week’s appointments
  • Is there a dermatologist available on August 16?