Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_medications_history

Retrieve a patient's detailed medication history, including discontinued medications, to inform clinical workflows and decision-making using Google Cloud Healthcare API.

Instructions

Get patient's medication history including changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeDiscontinuedNo
patientIdYes

Implementation Reference

  • The main handler function that implements the tool logic by querying the FHIR server for MedicationStatement resources for the given patient, optionally filtered by date range, and formats the response.
    async getMedicationHistory(args: any) { const params = new URLSearchParams(); params.append('patient', `${args.patientId}`); if (args.dateFrom) params.append('date', `ge${args.dateFrom}`); if (args.dateTo) params.append('date', `le${args.dateTo}`); const response = await this.client.get(`/MedicationStatement?${params}`); return this.formatResponse(`fhir://Patient/${args.patientId}/medication-history`, response.data); }
  • Defines the tool's metadata including name, description, and input schema validation.
    { name: "get_medications_history", description: "Get patient's medication history including changes", inputSchema: { type: "object", properties: { patientId: { type: "string" }, includeDiscontinued: { type: "boolean" } }, required: ["patientId"] } },
  • Dispatches calls to the 'get_medications_history' tool to the appropriate FhirClient handler method.
    case "get_medications_history": return await this.fhirClient.getMedicationHistory(request.params.arguments);

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