Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_observations

Retrieve patient observations such as vitals and lab results using LOINC or SNOMED codes, specified date ranges, and status filters through the MCP Server for Google Cloud Healthcare API.

Instructions

Get observations (vitals, labs) for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoLOINC or SNOMED code
dateFromNoYYYY-MM-DD
dateToNoYYYY-MM-DD
patientIdYes
statusNo

Implementation Reference

  • The handler function that executes the tool logic: constructs FHIR search parameters for Observation resources filtered by patient and optional criteria, fetches from server, and formats response.
    async getPatientObservations(args: any) { const params = new URLSearchParams(); params.append('patient', `${args.patientId}`); if (args.code) params.append('code', args.code); if (args.status) params.append('status', args.status); if (args.dateFrom) params.append('date', `ge${args.dateFrom}`); if (args.dateTo) params.append('date', `le${args.dateTo}`); const response = await this.client.get(`/Observation?${params}`); return this.formatResponse(`fhir://Patient/${args.patientId}/observations`, response.data); }
  • Input schema definition and metadata for the get_patient_observations tool.
    { name: "get_patient_observations", description: "Get observations (vitals, labs) for a patient", inputSchema: { type: "object", properties: { patientId: { type: "string" }, code: { type: "string", description: "LOINC or SNOMED code" }, dateFrom: { type: "string", description: "YYYY-MM-DD" }, dateTo: { type: "string", description: "YYYY-MM-DD" }, status: { type: "string", enum: ["registered", "preliminary", "final", "amended", "corrected", "cancelled"] } }, required: ["patientId"] } },
  • Registration of the tool handler in the MCP callTool request switch statement, dispatching to the FhirClient implementation.
    case "get_patient_observations": return await this.fhirClient.getPatientObservations(request.params.arguments);
  • The listTools handler that returns the TOOL_DEFINITIONS array containing this tool's registration.
    private handleList = async () => ({ tools: TOOL_DEFINITIONS });

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