Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_medications

Retrieve medication orders for a specific patient, filtered by status, using the MCP Server for Google Cloud Healthcare API. Supports active, completed, stopped, or on-hold medication statuses.

Instructions

Get medication orders for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patientIdYes
statusNo

Implementation Reference

  • The main handler function that executes the tool logic by querying the FHIR server for MedicationRequest resources filtered by patient ID and optional status.
    async getPatientMedications(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.status) params.append('status', args.status);
    
      const response = await this.client.get(`/MedicationRequest?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/medications`, response.data);
    }
  • Defines the tool's input schema, description, and registration in the TOOL_DEFINITIONS array used for listing tools.
    {
      name: "get_patient_medications",
      description: "Get medication orders for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          status: {
            type: "string",
            enum: ["active", "completed", "stopped", "on-hold"]
          }
        },
        required: ["patientId"]
      }
    },
  • Registers the tool handler by dispatching calls to the FhirClient.getPatientMedications method in the main tool call switch statement.
    case "get_patient_medications":
      return await this.fhirClient.getPatientMedications(request.params.arguments);

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kartha-AI/google-cloud-healthcare-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server